Revert "SWDEV-441296 - Allign hipTexObjectCreate error handling to CUDA"

This reverts commit 2e7581a69a.

Changing the error code is considered as a breaking change,
so it should be done in major releases only.

The other reason for reverting the commit is that this change itself
is incorrect. Cuda behaves in the same way as hip when
pResDesc or pTexDesc are nullptr.

Change-Id: I3abee6b79279b81ab01c7f8466c7f8e3776c4109


[ROCm/clr commit: cfdc9dfc36]
此提交包含在:
Marko Arandjelovic
2024-09-18 05:09:41 -04:00
父節點 c4cab41cc2
當前提交 a261d1f49c
+2 -6
查看文件
@@ -1521,12 +1521,8 @@ hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject,
const HIP_RESOURCE_VIEW_DESC* pResViewDesc) {
HIP_INIT_API(hipTexObjectCreate, pTexObject, pResDesc, pTexDesc, pResViewDesc);
if (pTexObject == nullptr) {
HIP_RETURN(hipErrorNotInitialized);
}
if (pResDesc == nullptr || pTexDesc == nullptr) {
HIP_RETURN(hipErrorInvalidContext);
if ((pTexObject == nullptr) || (pResDesc == nullptr) || (pTexDesc == nullptr)) {
HIP_RETURN(hipErrorInvalidValue);
}
hipResourceDesc resDesc = hip::getResourceDesc(*pResDesc);