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]
This commit is contained in:
Marko Arandjelovic
2024-09-18 05:09:41 -04:00
parent c4cab41cc2
commit a261d1f49c
+2 -6
View File
@@ -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);