mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Add error code for get device info relative to images
if image are not supported Related-To: NEO-3931 Change-Id: I527da2dc857cd15dae6535dd389378511eb71b6d Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
318d9620ae
commit
1b072cf170
@@ -998,12 +998,14 @@ cl_int CL_API_CALL clGetSupportedImageFormats(cl_context context,
|
||||
"imageFormats", imageFormats,
|
||||
"numImageFormats", numImageFormats);
|
||||
auto pContext = castToObject<Context>(context);
|
||||
auto pPlatform = platform();
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
|
||||
if (pContext) {
|
||||
retVal = pContext->getSupportedImageFormats(pDevice, flags, imageType, numEntries,
|
||||
imageFormats, numImageFormats);
|
||||
auto pDevice = pContext->getDevice(0);
|
||||
if (pDevice->getHardwareInfo().capabilityTable.supportsImages) {
|
||||
retVal = pContext->getSupportedImageFormats(pDevice, flags, imageType, numEntries,
|
||||
imageFormats, numImageFormats);
|
||||
} else {
|
||||
retVal = CL_INVALID_VALUE;
|
||||
}
|
||||
} else {
|
||||
retVal = CL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user