mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Accept OpenCL 3.0 in version parsing code and use where appropriate (#752)
* Accept OpenCL 3.0 in version parsing code and use where appropriate There were a number of tests against 2.2 that are clearer against 3.0. Fixes #751 Signed-off-by: Kévin Petit <kpet@free.fr> * Remove CL_EXPERIMENTAL guards Signed-off-by: Kévin Petit <kpet@free.fr> * formatting * Configure the headers for OpenCL 3.0 * more format fixes
This commit is contained in:
@@ -50,24 +50,27 @@ test_status InitCL(cl_device_id device) {
|
||||
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)) {
|
||||
int error;
|
||||
cl_bool isSupported;
|
||||
error = clGetDeviceInfo(device,
|
||||
CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT,
|
||||
sizeof(isSupported), &isSupported, NULL);
|
||||
if (error != CL_SUCCESS) {
|
||||
print_error(error, "Unable to query support for collective functions");
|
||||
return TEST_FAIL;
|
||||
if (version >= Version(3, 0))
|
||||
{
|
||||
int error;
|
||||
cl_bool isSupported;
|
||||
error = clGetDeviceInfo(
|
||||
device, CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT,
|
||||
sizeof(isSupported), &isSupported, NULL);
|
||||
if (error != CL_SUCCESS)
|
||||
{
|
||||
print_error(error,
|
||||
"Unable to query support for collective functions");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if (isSupported == CL_FALSE)
|
||||
{
|
||||
return TEST_SKIP;
|
||||
}
|
||||
}
|
||||
|
||||
if (isSupported == CL_FALSE) {
|
||||
return TEST_SKIP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user