diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp index b438751b05..6c83cd2166 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp @@ -165,8 +165,6 @@ struct MutableDispatchGlobalArguments : public MutableDispatchArgumentsTest cl_mutable_dispatch_arg_khr arg{ 1, sizeof(dst_buf_1), &dst_buf_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -180,12 +178,13 @@ struct MutableDispatchGlobalArguments : public MutableDispatchArgumentsTest nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, @@ -292,8 +291,6 @@ struct MutableDispatchLocalArguments : public MutableDispatchArgumentsTest cl_mutable_dispatch_arg_khr args[] = { arg_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -306,15 +303,17 @@ struct MutableDispatchLocalArguments : public MutableDispatchArgumentsTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; error = clFinish(queue); test_error(error, "clFinish failed."); - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = @@ -426,8 +425,6 @@ struct MutableDispatchPODArguments : public MutableDispatchArgumentsTest cl_mutable_dispatch_arg_khr args[] = { arg_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -440,15 +437,17 @@ struct MutableDispatchPODArguments : public MutableDispatchArgumentsTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; error = clFinish(queue); test_error(error, "clFinish failed."); - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueReadBuffer(queue, stream, CL_TRUE, 0, size_to_allocate, @@ -572,8 +571,6 @@ struct MutableDispatchNullArguments : public MutableDispatchArgumentsTest // Modify and execute the command buffer cl_mutable_dispatch_arg_khr arg{ 0, sizeof(cl_mem), nullptr }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -587,12 +584,13 @@ struct MutableDispatchNullArguments : public MutableDispatchArgumentsTest nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, @@ -773,19 +771,18 @@ struct MutableDispatchSVMArguments : public MutableDispatchArgumentsTest exec_info.param_value = &new_buffer; cl_mutable_dispatch_config_khr dispatch_config{}; - dispatch_config.type = CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR; - dispatch_config.command = command; dispatch_config.num_svm_args = 1; dispatch_config.arg_svm_list = &arg_svm; dispatch_config.num_exec_infos = 1; dispatch_config.exec_info_list = &exec_info; - cl_mutable_base_config_khr mutable_config{}; - mutable_config.type = CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR; - mutable_config.num_mutable_dispatch = 1; - mutable_config.mutable_dispatch_list = &dispatch_config; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_basic.h b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_basic.h index eee6a76ece..51938dce02 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_basic.h +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_basic.h @@ -80,6 +80,22 @@ struct BasicMutableCommandBufferTest : BasicCommandBufferTest "cl_khr_command_buffer_mutable_dispatch") == true; + if (extension_avaliable) { + // API breaking changes occur at revision 0.9.2, check implementation + // matches tested API + Version device_version = get_device_cl_version(device); + if ((device_version >= Version(3, 0)) + || is_extension_available(device, "cl_khr_extended_versioning")) { + + cl_version extension_version = + get_extension_version(device, "cl_khr_command_buffer_mutable_dispatch"); + + if (extension_version < CL_MAKE_VERSION(0, 9, 2)) { + extension_avaliable = false; + } + } + } + cl_mutable_dispatch_fields_khr mutable_capabilities; bool mutable_support = diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp index 80865e524d..411a9d6ae2 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp @@ -69,7 +69,7 @@ struct MutableCommandFullDispatch : InfoMutableCommandBufferTest available_caps &= ~CL_MUTABLE_DISPATCH_EXEC_INFO_KHR; // require at least one mutable capabillity - return (available_caps == 0) && InfoMutableCommandBufferTest::Skip(); + return (available_caps == 0) || InfoMutableCommandBufferTest::Skip(); } // setup kernel program specific for command buffer with full mutable @@ -336,8 +336,6 @@ struct MutableCommandFullDispatch : InfoMutableCommandBufferTest // Modify and execute the command buffer cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 0 /* num_args */, 0 /* num_svm_arg */, @@ -395,12 +393,13 @@ struct MutableCommandFullDispatch : InfoMutableCommandBufferTest dispatch_config.local_work_size = &group_size; } - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_offset.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_offset.cpp index 80bc015a33..e3944e1951 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_offset.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_offset.cpp @@ -88,8 +88,6 @@ struct MutableDispatchGlobalOffset : InfoMutableCommandBufferTest test_error(error, "clFinish failed."); cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 0 /* num_args */, 0 /* num_svm_arg */, @@ -102,12 +100,14 @@ struct MutableDispatchGlobalOffset : InfoMutableCommandBufferTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_size.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_size.cpp index 091f0c8d30..44cfd57ffb 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_size.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_global_size.cpp @@ -87,8 +87,6 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest test_error(error, "clFinish failed."); cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 0 /* num_args */, 0 /* num_svm_arg */, @@ -101,12 +99,14 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest &update_global_size /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp index d8036e17dd..9f8800e1c2 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp @@ -162,8 +162,6 @@ struct MutableDispatchImage1DArguments : public BasicMutableCommandBufferTest cl_mutable_dispatch_arg_khr args[] = { arg_2 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -176,11 +174,14 @@ struct MutableDispatchImage1DArguments : public BasicMutableCommandBufferTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, @@ -360,8 +361,6 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest cl_mutable_dispatch_arg_khr args[] = { arg_2 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -374,11 +373,14 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_iterative_arg_update.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_iterative_arg_update.cpp index dd6bf4c1f8..e7a8c03586 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_iterative_arg_update.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_iterative_arg_update.cpp @@ -152,8 +152,6 @@ struct IterativeArgUpdateDispatch : BasicMutableCommandBufferTest cl_mutable_dispatch_arg_khr args = { 0, sizeof(cl_int), &pattern_sec }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -167,12 +165,13 @@ struct IterativeArgUpdateDispatch : BasicMutableCommandBufferTest nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); // update parameter of previous mutable dispatch by using the same @@ -181,7 +180,8 @@ struct IterativeArgUpdateDispatch : BasicMutableCommandBufferTest args.arg_size = sizeof(new_out_mem); args.arg_value = &new_out_mem; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueFillBuffer(queue, new_out_mem, &pattern_pri, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_local_size.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_local_size.cpp index 22a9da6d5c..dbafbbaa89 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_local_size.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_local_size.cpp @@ -90,8 +90,6 @@ struct MutableDispatchLocalSize : public InfoMutableCommandBufferTest test_error(error, "clFinish failed."); cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 0 /* num_args */, 0 /* num_svm_arg */, @@ -104,12 +102,14 @@ struct MutableDispatchLocalSize : public InfoMutableCommandBufferTest &update_global_size /* global_work_size */, &update_local_size /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_multiple_dispatches.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_multiple_dispatches.cpp index 0911472003..5ea0772d1b 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_multiple_dispatches.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_multiple_dispatches.cpp @@ -164,20 +164,20 @@ struct MultipleCommandsDispatch : BasicMutableCommandBufferTest // modify two mutable parameters, each one with separate handle cl_mutable_dispatch_config_khr dispatch_config[] = { - { CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, nullptr, - command_pri, 1, 0, 0, 0, args_pri, nullptr, nullptr, nullptr, + { command_pri, 1, 0, 0, 0, args_pri, nullptr, nullptr, nullptr, nullptr, nullptr }, - { CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, nullptr, - command_sec, 1, 0, 0, 0, args_sec, nullptr, nullptr, nullptr, + { command_sec, 1, 0, 0, 0, args_sec, nullptr, nullptr, nullptr, nullptr, nullptr }, }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 2, - dispatch_config + cl_uint num_configs = 2; + cl_command_buffer_update_type_khr config_types[2] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[2] = { &dispatch_config[0], &dispatch_config[1] }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); // repeat execution of modified command buffer diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_overwrite_update.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_overwrite_update.cpp index 74b0c9f2ad..a3484e48e1 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_overwrite_update.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_overwrite_update.cpp @@ -157,8 +157,6 @@ struct OverwriteUpdateDispatch : BasicMutableCommandBufferTest &unused_mem } }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 2 /* num_args */, 0 /* num_svm_arg */, @@ -172,19 +170,21 @@ struct OverwriteUpdateDispatch : BasicMutableCommandBufferTest nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + const void *configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); // overwrite previous update of mutable arguments args[0].arg_value = &pattern_sec; args[1].arg_value = &new_out_mem; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueFillBuffer(queue, new_out_mem, &pattern_pri, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp index 42dd90c74a..81ce85c9bd 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp @@ -224,8 +224,6 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest cl_mutable_dispatch_arg_khr args[] = { arg_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -238,13 +236,14 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = - clUpdateMutableCommandsKHR(work_command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void* configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); error = clEnqueueCommandBufferKHR(0, nullptr, work_command_buffer, 0, @@ -343,8 +342,6 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest cl_mutable_dispatch_arg_khr args[] = { arg_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 1 /* num_args */, 0 /* num_svm_arg */, @@ -357,13 +354,14 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = - clUpdateMutableCommandsKHR(work_command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void* configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); // command buffer execution must wait for two wait-events @@ -552,8 +550,6 @@ struct CrossQueueSimultaneousMutableDispatchTest cl_mutable_dispatch_arg_khr args[] = { arg_0, arg_1 }; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 2 /* num_args */, 0 /* num_svm_arg */, @@ -566,12 +562,14 @@ struct CrossQueueSimultaneousMutableDispatchTest nullptr /* global_work_size */, nullptr /* local_work_size */ }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config - }; - error = clUpdateMutableCommandsKHR(command_buffer, &mutable_config); + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR + }; + const void* configs[1] = { &dispatch_config }; + error = clUpdateMutableCommandsKHR(command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); // enqueue command buffer to non-default queue diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp index f9bad81569..bea337e1fe 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp @@ -199,8 +199,6 @@ struct MutableDispatchWorkGroups : public BasicMutableCommandBufferTest { cl_int error; cl_mutable_dispatch_config_khr dispatch_config{ - CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR, - nullptr, command, 0, // num_args 0, // num_svm_arg @@ -214,13 +212,14 @@ struct MutableDispatchWorkGroups : public BasicMutableCommandBufferTest nullptr // local_work_size }; - cl_mutable_base_config_khr mutable_config{ - CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR, nullptr, 1, - &dispatch_config + cl_uint num_configs = 1; + cl_command_buffer_update_type_khr config_types[1] = { + CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR }; - + const void *configs[1] = { &dispatch_config }; error = - clUpdateMutableCommandsKHR(single_command_buffer, &mutable_config); + clUpdateMutableCommandsKHR(single_command_buffer, num_configs, + config_types, configs); test_error(error, "clUpdateMutableCommandsKHR failed"); clEventWrapper events[2];