Return 0 when Read-Write images are not supported

clGetDeviceInfo and clGetSupportedImageFormats return 0 when Read-Write
images are not supported

Related-To: NEO-4368

Change-Id: Iabeb3ca35fbdd1ab6eb8497dbcc94bb6876d8f42
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
Andrzej Swierczynski
2020-04-20 12:22:53 +02:00
committed by sys_ocldev
parent 290445f922
commit 4c616f8bef
5 changed files with 49 additions and 2 deletions

View File

@ -91,6 +91,15 @@ TEST_P(GetSupportedImageFormatsTest, retrieveImageFormats) {
EXPECT_NE(0u, imageFormatList[entry].image_channel_data_type);
}
retVal = pContext->getSupportedImageFormats(
&castToObject<ClDevice>(devices[0])->getDevice(),
CL_MEM_KERNEL_READ_AND_WRITE,
imageFormats,
numImageFormats,
imageFormatList,
nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
delete[] imageFormatList;
}