Return error when device does not support Intermediate Language Programs

clGetDeviceInfo, clGetProgramInfo, clCreateProgramWithIL and
clSetProgramSpecializationConstant return errors when Intermediate
Language Programs are not supported

Related-To: NEO-4368

Change-Id: I0bdc218c3cc57ea7ac698cd1db6c85687a8f9f4c
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
Andrzej Swierczynski
2020-04-22 14:03:42 +02:00
committed by sys_ocldev
parent b0ed3b2ab1
commit 0dfcfff89c
6 changed files with 49 additions and 0 deletions

View File

@ -21,3 +21,7 @@ bool TestChecks::supportsSvm(const ClDevice *pClDevice) {
bool TestChecks::supportsImages(const Context *pContext) {
return pContext->getDevice(0)->getSharedDeviceInfo().imageSupport;
}
bool TestChecks::supportsOcl21(const Context *pContext) {
return pContext->getDevice(0)->getEnabledClVersion() >= 21;
}

View File

@ -14,6 +14,7 @@ class Context;
namespace TestChecks {
bool supportsSvm(const ClDevice *pClDevice);
bool supportsImages(const Context *pContext);
bool supportsOcl21(const Context *pContext);
} // namespace TestChecks
} // namespace NEO
@ -24,3 +25,8 @@ bool supportsImages(const Context *pContext);
if (NEO::TestChecks::supportsImages(param) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_OCL_21_OR_SKIP(param) \
if (NEO::TestChecks::supportsOcl21(param) == false) { \
GTEST_SKIP(); \
}