mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Return error code for unsuported image arg in gen12lp
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7195aa6f8e
commit
bbc31e6aac
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user