mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 14:09:03 +00:00
Generic Address Space: Skip test on unsupported devices. (#708)
* Generic Address Space: Skip test on unsupported devices. Where a device does not have to support this test, skip it. * CI: Added USE_CL_EXPERIMENTAL to the CI build(s).
This commit is contained in:
@@ -70,11 +70,34 @@ const int test_num = ARRAY_SIZE( test_list );
|
||||
test_status InitCL(cl_device_id device) {
|
||||
auto version = get_device_cl_version(device);
|
||||
auto expected_min_version = Version(2, 0);
|
||||
|
||||
if (version < expected_min_version)
|
||||
{
|
||||
version_expected_info("Test", expected_min_version.to_string().c_str(), version.to_string().c_str());
|
||||
return TEST_SKIP;
|
||||
}
|
||||
|
||||
#ifdef CL_EXPERIMENTAL
|
||||
if (version > Version(2,2))
|
||||
{
|
||||
cl_int error;
|
||||
cl_bool support_generic;
|
||||
|
||||
error = clGetDeviceInfo(device, CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT,
|
||||
sizeof(support_generic), &support_generic, NULL);
|
||||
if (error != CL_SUCCESS)
|
||||
{
|
||||
print_error(error, "Unable to get generic address space support");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if (!support_generic)
|
||||
{
|
||||
return TEST_SKIP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user