Skip to content

Commit

Permalink
Added new tests for simultaneous use with mutable dispatch (KhronosGr…
Browse files Browse the repository at this point in the history
…oup#1912)

* Added new tests for simultaneous use with mutable dispatch

-cross queue simultaneous use
-in-order queue with simultaneous use

According to issue description KhronosGroup#1481

* Several corrections applied:

-reordered Skip conditions to check valid simultaneous_use_support flag
-removed unnecessary SetUpKernel call
-initialize kernel and memory buffers from BasicCommandBufferTest
instead BasicMutableCommandBufferTest

* Corrections for command buffer creation to request simultaneous property
  • Loading branch information
shajder authored Mar 19, 2024
1 parent 109c0a1 commit 8f3ef08
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(${MODULE_NAME}_SOURCES
mutable_command_info.cpp
mutable_command_image_arguments.cpp
mutable_command_arguments.cpp
mutable_command_out_of_order.cpp
mutable_command_simultaneous.cpp
mutable_command_global_size.cpp
mutable_command_local_size.cpp
mutable_command_global_offset.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ test_definition test_list[] = {
ADD_TEST(mutable_dispatch_image_2d_arguments),
ADD_TEST(mutable_dispatch_out_of_order),
ADD_TEST(mutable_dispatch_simultaneous_out_of_order),
ADD_TEST(mutable_dispatch_simultaneous_in_order),
ADD_TEST(mutable_dispatch_simultaneous_cross_queue),
ADD_TEST(mutable_dispatch_global_size),
ADD_TEST(mutable_dispatch_local_size),
ADD_TEST(mutable_dispatch_global_offset),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ struct BasicMutableCommandBufferTest : BasicCommandBufferTest
cl_int error = init_extension_functions();
test_error(error, "Unable to initialise extension functions");

cl_command_buffer_properties_khr prop = CL_COMMAND_BUFFER_MUTABLE_KHR;
if (simultaneous_use_support)
{
prop |= CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR;
}

const cl_command_buffer_properties_khr props[] = {
CL_COMMAND_BUFFER_FLAGS_KHR,
CL_COMMAND_BUFFER_MUTABLE_KHR,
prop,
0,
};

Expand Down
Loading

0 comments on commit 8f3ef08

Please sign in to comment.