mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add missing CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE check in negative_set_default_device_command_queue (#2602)
Fixes #2566
This commit is contained in:
@@ -348,18 +348,27 @@ REGISTER_TEST_VERSION(negative_set_default_device_command_queue, Version(2, 1))
|
|||||||
return TEST_FAIL;
|
return TEST_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
cl_command_queue_properties queue_properties;
|
||||||
|
err =
|
||||||
|
clGetDeviceInfo(device, CL_DEVICE_QUEUE_PROPERTIES,
|
||||||
|
sizeof(queue_properties), &queue_properties, NULL);
|
||||||
|
test_error(err, "Unable to query CL_DEVICE_QUEUE_PROPERTIES");
|
||||||
|
if (queue_properties & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE)
|
||||||
{
|
{
|
||||||
constexpr cl_queue_properties props[] = {
|
constexpr cl_queue_properties props[] = {
|
||||||
CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0
|
CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0
|
||||||
};
|
};
|
||||||
clCommandQueueWrapper not_on_device_queue =
|
clCommandQueueWrapper not_on_device_queue =
|
||||||
clCreateCommandQueueWithProperties(context, device, props, &err);
|
clCreateCommandQueueWithProperties(context, device, props,
|
||||||
|
&err);
|
||||||
test_error_fail(err, "clCreateCommandQueueWithProperties failed");
|
test_error_fail(err, "clCreateCommandQueueWithProperties failed");
|
||||||
err = clSetDefaultDeviceCommandQueue(context, device,
|
err = clSetDefaultDeviceCommandQueue(context, device,
|
||||||
not_on_device_queue);
|
not_on_device_queue);
|
||||||
if (err != CL_INVALID_OPERATION && err != CL_INVALID_COMMAND_QUEUE)
|
if (err != CL_INVALID_OPERATION && err != CL_INVALID_COMMAND_QUEUE)
|
||||||
{
|
{
|
||||||
log_error("ERROR: %s! (Got %s, expected (%s) from %s:%d)\n",
|
log_error(
|
||||||
|
"ERROR: %s! (Got %s, expected (%s) from %s:%d)\n",
|
||||||
"clSetDefaultDeviceCommandQueue should return "
|
"clSetDefaultDeviceCommandQueue should return "
|
||||||
"CL_INVALID_OPERATION or CL_INVALID_COMMAND_QUEUE when: "
|
"CL_INVALID_OPERATION or CL_INVALID_COMMAND_QUEUE when: "
|
||||||
"\"command_queue is not a valid command-queue for "
|
"\"command_queue is not a valid command-queue for "
|
||||||
@@ -369,6 +378,7 @@ REGISTER_TEST_VERSION(negative_set_default_device_command_queue, Version(2, 1))
|
|||||||
__FILE__, __LINE__);
|
__FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TEST_PASS;
|
return TEST_PASS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user