mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Minor fixes in mutable dispatch tests. (#1829)
* Minor fixes in mutable dispatch tests. * Fix size of newWrapper in MutableDispatchSVMArguments. * Fix errnoneus clCommandNDRangeKernelKHR call. Signed-off-by: John Kesapides <john.kesapides@arm.com> * * Set the row_pitch for imageInfo in MutableDispatchImage1DArguments and MutableDispatchImage2DArguments. The row_pitch is used by get_image_size() to calculate the size of the host pointers by generate_random_image_data. Signed-off-by: John Kesapides <john.kesapides@arm.com> --------- Signed-off-by: John Kesapides <john.kesapides@arm.com>
This commit is contained in:
@@ -664,8 +664,8 @@ struct MutableDispatchSVMArguments : public BasicMutableCommandBufferTest
|
||||
|
||||
// Allocate and initialize SVM for modified execution
|
||||
|
||||
cl_int *newWrapper =
|
||||
(cl_int *)clSVMAlloc(context, CL_MEM_READ_WRITE, sizeof(cl_int), 0);
|
||||
cl_int *newWrapper = (cl_int *)clSVMAlloc(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_int *), 0);
|
||||
cl_int *newBuffer = (cl_int *)clSVMAlloc(
|
||||
context, CL_MEM_READ_WRITE, num_elements * sizeof(cl_int), 0);
|
||||
test_assert_error(newWrapper != nullptr && newBuffer != nullptr,
|
||||
|
||||
@@ -92,6 +92,7 @@ struct MutableDispatchImage1DArguments : public BasicMutableCommandBufferTest
|
||||
imageInfo.type = CL_MEM_OBJECT_IMAGE1D;
|
||||
imageInfo.format = &formats;
|
||||
imageInfo.width = 4;
|
||||
imageInfo.rowPitch = imageInfo.width * get_pixel_size(imageInfo.format);
|
||||
|
||||
BufferOwningPtr<char> imageValues_input, imageValues_output, outputData;
|
||||
MTdataHolder d(gRandomSeed);
|
||||
@@ -285,6 +286,7 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest
|
||||
imageInfo.width = 4;
|
||||
imageInfo.height = 4;
|
||||
imageInfo.format = &formats;
|
||||
imageInfo.rowPitch = imageInfo.width * get_pixel_size(imageInfo.format);
|
||||
|
||||
BufferOwningPtr<char> imageValues_input, imageValues_output;
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ struct Dimensions : public InfoMutableCommandBufferTest
|
||||
{
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, dimensions, nullptr,
|
||||
&global_work_size, nullptr, 0, nullptr, nullptr, &command);
|
||||
global_work_size_3d, nullptr, 0, nullptr, nullptr, &command);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
cl_uint test_dimensions = 0;
|
||||
@@ -231,6 +231,7 @@ struct Dimensions : public InfoMutableCommandBufferTest
|
||||
|
||||
cl_mutable_command_khr command = nullptr;
|
||||
const size_t dimensions = 3;
|
||||
const size_t global_work_size_3d[3] = { 64, 1, 1 };
|
||||
};
|
||||
|
||||
struct InfoType : public InfoMutableCommandBufferTest
|
||||
|
||||
Reference in New Issue
Block a user