mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix size parameters in cl_ext_buffer_device_address tests (#2585)
The `DeviceAddrFromAPI` variable is of type `cl_mem_device_address_ext`. But on 32-bit systems `sizeof(void*) = 4 < 8 = sizeof(cl_mem_device_address_ext)`. Pass `sizeof(DeviceAddrFromAPI)` instead.
This commit is contained in:
committed by
GitHub
parent
764b77ad83
commit
be530df8a8
@@ -313,8 +313,8 @@ private:
|
|||||||
// A basic buffer used to pass the other buffer's address.
|
// A basic buffer used to pass the other buffer's address.
|
||||||
error = clEnqueueWriteBuffer(queue, buffer_in_long,
|
error = clEnqueueWriteBuffer(queue, buffer_in_long,
|
||||||
CL_TRUE, // block
|
CL_TRUE, // block
|
||||||
0, sizeof(cl_long), &DeviceAddrFromAPI,
|
0, sizeof(DeviceAddrFromAPI),
|
||||||
0, NULL, NULL);
|
&DeviceAddrFromAPI, 0, NULL, NULL);
|
||||||
test_error_fail(error,
|
test_error_fail(error,
|
||||||
"clEnqueueWriteBuffer of dev_addr_buffer failed\n");
|
"clEnqueueWriteBuffer of dev_addr_buffer failed\n");
|
||||||
|
|
||||||
@@ -325,9 +325,9 @@ private:
|
|||||||
&buffer_out_int);
|
&buffer_out_int);
|
||||||
test_error_fail(error, "clSetKernelArg 1 failed\n");
|
test_error_fail(error, "clSetKernelArg 1 failed\n");
|
||||||
|
|
||||||
error = clSetKernelExecInfo(ind_access_kernel,
|
error = clSetKernelExecInfo(
|
||||||
CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT,
|
ind_access_kernel, CL_KERNEL_EXEC_INFO_DEVICE_PTRS_EXT,
|
||||||
sizeof(void *), &DeviceAddrFromAPI);
|
sizeof(DeviceAddrFromAPI), &DeviceAddrFromAPI);
|
||||||
test_error_fail(error,
|
test_error_fail(error,
|
||||||
"Setting indirect access for "
|
"Setting indirect access for "
|
||||||
"device ptrs failed!\n");
|
"device ptrs failed!\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user