mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Retain output memory objects for simultaneous command buffer tests (#2429)
Memory objects created in `EnqueueSimultaneousPass()` are used by kernels that don't execute until the user event is signaled. Without retaining these objects, they would be destroyed before the deferred kernel execution occurs.
This commit is contained in:
@@ -337,6 +337,8 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest
|
||||
* buffer_size_multiplier,
|
||||
nullptr, &error);
|
||||
test_error(error, "clCreateBuffer failed");
|
||||
// Retain new output memory object until the end of the test.
|
||||
retained_output_buffers.push_back(new_out_mem);
|
||||
|
||||
cl_mutable_dispatch_arg_khr arg_1{ 1, sizeof(new_out_mem),
|
||||
&new_out_mem };
|
||||
@@ -429,6 +431,8 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest
|
||||
clKernelWrapper kernel_fill;
|
||||
clProgramWrapper program_fill;
|
||||
|
||||
std::vector<clMemWrapper> retained_output_buffers;
|
||||
|
||||
const size_t test_global_work_size = 3 * sizeof(cl_int);
|
||||
const cl_int pattern_pri = 42;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user