fix negative_create_command_buffer_device_does_not_support_out_of_ord… (#2207)

…er_queue

Test should be skipped if device does not support out of order queue or
if device supports out of order command buffer.

Fix #2204
This commit is contained in:
Romaric Jodin
2025-01-07 18:33:29 +01:00
committed by GitHub
parent 435db66a3a
commit 86e0c236a1
3 changed files with 7 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ BasicCommandBufferTest::BasicCommandBufferTest(cl_device_id device,
cl_command_queue queue)
: CommandBufferTestBase(device), context(context), queue(nullptr),
num_elements(0), simultaneous_use_support(false),
out_of_order_support(false),
out_of_order_support(false), queue_out_of_order_support(false),
// try to use simultaneous path by default
simultaneous_use_requested(true),
// due to simultaneous cases extend buffer size
@@ -57,7 +57,8 @@ bool BasicCommandBufferTest::Skip()
sizeof(queue_properties), &queue_properties,
NULL);
test_error(error, "Unable to query CL_QUEUE_PROPERTIES");
queue_out_of_order_support =
queue_properties & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
// Query if device supports simultaneous use
cl_device_command_buffer_capabilities_khr capabilities;

View File

@@ -75,6 +75,7 @@ protected:
// Device support query results
bool simultaneous_use_support;
bool out_of_order_support;
bool queue_out_of_order_support;
bool device_side_enqueue_support;
// user request for simultaneous use

View File

@@ -289,8 +289,9 @@ struct CreateCommandBufferDeviceDoesNotSupportOutOfOderQueue
{
BasicCommandBufferTest::Skip();
// If device supports out of order queues test should be skipped
return out_of_order_support != 0;
// If device does not support out of order queue or if device supports
// out of order command buffer test should be skipped
return !queue_out_of_order_support || out_of_order_support;
}
clCommandQueueWrapper out_of_order_queue;