SWDEV-465085 - replace asserts inside API calls

This change replaces some asserts, that were only available in debug
mode, with standard error handling.

Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
Change-Id: I112f9e56f921abd72daf0d11e4ecdcb7b1a9f9e6


[ROCm/clr commit: 019abdc3bd]
Tá an tiomantas seo le fáil i:
Sebastian Luzynski
2024-09-24 15:18:06 +00:00
tuismitheoir ae5bebeb5f
tiomantas f421f02546
D'athraigh 6 comhad le 22 breiseanna agus 13 scriosta
+4 -2
Féach ar an gComhad
@@ -194,7 +194,9 @@ hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsRe
HIP_RETURN(hipErrorInvalidValue);
}
// arrayIndex higher than zero not implmented
assert(arrayIndex == 0) ;
if (arrayIndex > 0) {
return hipErrorInvalidValue;
}
amd::Image * view = image->createView(amdContext, image->getImageFormat(), nullptr, mipLevel, 0);
hipArray* myarray = new hipArray();
@@ -770,4 +772,4 @@ hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource) {
HIP_RETURN(hipSuccess);
}
} // namespace hip
} // namespace hip