Return error code for unsuported image arg in gen12lp

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2022-10-13 15:55:18 +00:00
committed by Compute-Runtime-Automation
parent 7195aa6f8e
commit bbc31e6aac
24 changed files with 625 additions and 129 deletions

View File

@@ -1583,6 +1583,12 @@ cl_int Kernel::setArgImageWithMipLevel(uint32_t argIndex,
auto pImage = castToObject<Image>(clMemObj);
if (pImage && argSize == sizeof(cl_mem *)) {
auto surfFormat = pImage->getSurfaceFormatInfo().surfaceFormat.GenxSurfaceFormat;
auto &hwHelper = HwHelper::get(getHardwareInfo().platform.eRenderCoreFamily);
if (arg.getExtendedTypeInfo().isMediaBlockImage && !hwHelper.isSurfaceFormatSupportedForMediaBlockOperation(surfFormat)) {
return CL_INVALID_ARG_VALUE;
}
if (pImage->peekSharingHandler()) {
usingSharedObjArgs = true;
}