SWDEV-286147 - Added image support check before using
Change-Id: I4b8ae854bf3488ef2418f0864a15b2fef0a889da
[ROCm/clr commit: 4c5c0419be]
This commit is contained in:
@@ -630,6 +630,11 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
if (device && !device->info().imageSupport_) {
|
||||
LogPrintfError("Image is not supported on device %p \n", device);
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
const amd::Image::Format imageFormat(*image_format);
|
||||
|
||||
*pitch = amd::alignUp(width * imageFormat.getElementSize(), device->info().imagePitchAlignment_);
|
||||
|
||||
Reference in New Issue
Block a user