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:
@@ -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
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir