Files
OpenCL-CTS/test_conformance
Michael Rizkalla 09e4d03e46 Fix clCopyImage 1D buffer images tests with use_pitches flag (#2167)
This change fixes the following issues when running `clCopyImage` test
with `use_pitches` flag for 1D buffer images.

1. Query device CL version using `get_device_cl_version` rather than
using `CL_DEVICE_VERSION`. Previously, using `char` may not be enough to
store the return value.
2. Pass `host_ptr` to `clCreateBuffer` when creating the buffer for the
1D image. `host_ptr` may not be `nullptr` if use_pitches flag is used.
Also, `buffer_flags` will contain `CL_MEM_USE_HOST_PTR` which requires a
host pointer to be passed.
3. Conditionally use the `host_ptr` when calling `clCreateImage`, it
will not be used with 1D image buffer. This is made to align with the
spec, in which if `mem_flags` has `CL_MEM_USE_HOST_PTR` a host pointer
must be present, but if the memory flag is not present, host pointer
must be `nullptr`.
4. Use the correct free function `free` and `align_free` based on the
allocation function that was used.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
2024-12-17 09:53:56 -08:00
..
2024-03-27 14:46:27 +01:00
2024-10-08 09:54:32 -07:00