This change extends the test coverage for
https://github.com/KhronosGroup/OpenCL-Docs/pull/1280
The change tests:
1. Writing to immutable buffers.
2. Writing to buffer/image from immutable buffers.
3. Reading from immutable buffers.
This change adds the following tests:
1. `test_negative_imagearraycopy`
2. `test_negative_imagearraycopy3d`
3. `test_immutable_bufferreadwriterect`
4. `test_immutable_arrayreadwrite`
5. `test_write_from_immutable_buffer_to_buffer`
6. `test_immutable_buffer_map_*`
and extends the following tests:
1. `test_arrayimagecopy3d`
2. `test_arrayimagecopy`
3. `test_imagearraycopy3d`
4. `test_imagearraycopy`
5. `test_buffer_copy`
6. `test_buffer_partial_copy`
Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
This change refactors the following tests to use RAII to clean-up
allocated resources on exit, and adds additional changes as mentioned
below:
- test_arrayreadwrite
- Allow different `cl_mem_flags` to be passed to the test.
- test_bufferreadwriterect:
- Allow different `cl_mem_flags` to be passed to the test.
- Customisable copy, read and write functions.
- test_buffer_copy
- Fill the destination buffer with `invalid_ptr` instead of `out_ptr` if
created with `CL_MEM_(USE/COPY)_HOST_PTR`.
- test_buffer_partial_copy
- Fill the destination buffer with `invalid_ptr` instead of `out_ptr` if
created with `CL_MEM_(USE/COPY)_HOST_PTR`.
---------
Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>