SWDEV-441296 - Allign hipTexObjectCreate error handling to CUDA
Change-Id: I9ff01c22f14344e0e82e473104d6930e9fa5ff77
[ROCm/clr commit: 7d3c0c5e10]
This commit is contained in:
@@ -1513,8 +1513,12 @@ hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject,
|
||||
const HIP_RESOURCE_VIEW_DESC* pResViewDesc) {
|
||||
HIP_INIT_API(hipTexObjectCreate, pTexObject, pResDesc, pTexDesc, pResViewDesc);
|
||||
|
||||
if ((pTexObject == nullptr) || (pResDesc == nullptr) || (pTexDesc == nullptr)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
if (pTexObject == nullptr) {
|
||||
HIP_RETURN(hipErrorNotInitialized);
|
||||
}
|
||||
|
||||
if (pResDesc == nullptr || pTexDesc == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidContext);
|
||||
}
|
||||
|
||||
hipResourceDesc resDesc = hip::getResourceDesc(*pResDesc);
|
||||
|
||||
Reference in New Issue
Block a user