mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 07:09:03 +00:00
Fix verification if atomics 64bit extensions supported by device (#441)
This commit is contained in:
committed by
Kévin Petit
parent
0b9329a9d6
commit
e880869559
@@ -168,7 +168,7 @@ cl_int verify_linked_lists(Node* pNodes, size_t num_lists, int list_length)
|
||||
|
||||
// Note that we don't use the context provided by the test harness since it doesn't support multiple devices,
|
||||
// so we create are own context here that has all devices, we use the same platform that the harness used.
|
||||
cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeString, cl_context* context, cl_program *program, cl_command_queue *queues, cl_uint *num_devices, cl_device_svm_capabilities required_svm_caps)
|
||||
cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeString, cl_context* context, cl_program *program, cl_command_queue *queues, cl_uint *num_devices, cl_device_svm_capabilities required_svm_caps, std::vector<std::string> extensions_list)
|
||||
{
|
||||
cl_int error;
|
||||
|
||||
@@ -215,7 +215,17 @@ cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeSt
|
||||
log_error("clGetDeviceInfo returned an invalid cl_device_svm_capabilities value");
|
||||
return -1;
|
||||
}
|
||||
if((caps & required_svm_caps) == required_svm_caps)
|
||||
bool extensions_supported = true;
|
||||
for (auto extension : extensions_list)
|
||||
{
|
||||
if (!is_extension_available(devices[i], extension.c_str()))
|
||||
{
|
||||
log_error("Required extension not found - device id %d - %s\n", i, extension.c_str());
|
||||
extensions_supported = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if((caps & required_svm_caps) == required_svm_caps && extensions_supported)
|
||||
{
|
||||
capable_devices.push_back(devices[i]);
|
||||
++num_capable_devices;
|
||||
@@ -226,7 +236,7 @@ cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeSt
|
||||
if(num_capable_devices == 0)
|
||||
// if(svm_level > CL_DEVICE_COARSE_SVM && 0 == num_capable_devices)
|
||||
{
|
||||
log_info("Requested SVM level not supported by any device on this platform, test not executed.\n");
|
||||
log_info("Requested SVM level or required extensions not supported by any device on this platform, test not executed.\n");
|
||||
return 1; // 1 indicates do not execute, but counts as passing.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user