* Added negative tests for clEnqueueCommandBufferKHR
* Added blocking the clEnqueueCommandBufferKHR call on a user event
* Added finalizing buffer before enqueuing
* Added negative tests for clRetainCommandBufferKHR, clReleaseCommandBufferKHR, clFinalizeCommandBufferKHR
* Added blocking the clEnqueueCommandBufferKHR call on a user event
* Changed cl_event to clEventWrapper
This patch adds two test cases related to command-buffer finalization:
1) That it is an error to finalize and already finalized command-buffer.
See https://github.com/KhronosGroup/OpenCL-Docs/pull/817
2) That it is not an error to create, finalize, and execute an empty
command-buffer. Closes issue #1781
* Added initial commit for issue #1369, p.1.4
* Added support for clGetCommandBufferInfoKHR test cases (issue #1369, p.1.3)
* Added correction for CL_COMMAND_BUFFER_QUEUES_KHR query test (issue #1369, p.1.4)
* Added corrections related to changed orders of operations Skip/SetUp and code review (issue #1369, clGetCommandBufferInfoKHR)
* Added cosmetic correction related to printout messages (issue #1369, clGetCommandBufferInfoKHR)
* Corrected info_prop_array test to accept scenario without simultaneous use (issue #1369, p.1.4)
* Added protection test agains POCL unexpected values (issue #1369, p.1.4)
* Added corrections related to Ben's code review
* Added initial commit for event sync test cases (issue #1369, p.3.3)
* Added test cases for return event scenarios with and without out-of-order, work in progress (#1369, p.3.3)
* Added support for return event test cases for both regular and out-of-order command queue (#1369, p.3.3)
* Added user event test cases, cosmetic corrections (#1369, p.3.3)
* Added correction for windows build (#1369, p.3.3)
* Corrected proper testing of test fail/skip conditions (#1369, p.3.3)
* Added corrections related to PR review (#1369, p.3.3)
* Added correction related to change of order Skip/SetUp (issue #1369, event sync)
* Added clang format correction for previous commit
* Reordered initialization of attributes.
* Added test cases for profiling command-buffers according to issue description #1369, p.3.2:
https://github.com/KhronosGroup/OpenCL-CTS/issues/1369
* Added cosmetic fixes (#1369, p.3.2)
* Corrected the path of initialization profiling event for simultaneous test (#1369, p.3.2):
https://github.com/KhronosGroup/OpenCL-CTS/issues/1369
* clang format fix
* Added correction related to macos build error (#1369, p.3.2)
* Applied corrections related to code review (#1369, p.3.2)
* Corrected query of queue properies (issue #1369, command buffer profiling)
* Reverted formating of unrelated header
* Added code review corrections for type consistency and fail condition (issue #1369, p.3.2)
* Reordered initialization of attributes.
* Reverted correct order of initialization.
* Add test for clGetEventInfo info queries.
Test clGetEventInfo() info queries from event returned by command-buffer
enqueue for the single command-queue to command-buffer case:
* CL_EVENT_COMMAND_TYPE is CL_COMMAND_COMMAND_BUFFER_KHR
* CL_EVENT_COMMAND_QUEUE
* CL_EVENT_CONTEXT
* CL_EVENT_COMMAND_EXECUTION_STATUS
* CL_EVENT_REFERENCE_COUNT
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Fix return TEST_FAIL instead of -1.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
---------
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Added tests for 1.1 individual command entry-points.
* Adding fixes pointed out in review: checks for CL_DEVICE_IMAGE_SUPPORT, remove redundant buffers, synchronisation issues, fixed clang-format, other minor issues.
* Fix compilation issues for Windows and macOS, fix clang-format.
* Fix compilation issue for Windows.
* Removed redundant blocking and event operations.
* Style fixes for test skip conditions.
* Fix clang format.
* Fixed function names, file names, comments and barrier test.
* Restored Individual command entry-points tests after merge with main.
* Fix clang format.
* Superficial fixes for review.
* Fix Skip() condition for barrier test
* Fix typos
* Fix new line
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Initial command-buffer tests
Introduce some basic testing of the
[cl_khr_command_buffer](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer)
extension. This is intended as a starting point from which we can iteratively build up tests
for the extension collaboratively.
* Move tests into derived classes
* Move tests from methods into derived classes implementing
a `Run()` interface.
* Fix memory leak when command_buffer isn't freed when a test
is skipped.
* Print correct error code for
`CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR`
* Pass `nullptr` for queue parameter to command recording entry-points
* Define command-buffer type wrapper
Other OpenCL object have a wrapper to reference count their use
and free the wrapped object. The command-buffer object can't use
the generic type wrappers which are templated on the appropriate
release/retain function, as the release/retain functions are
queried at runtime.
Instead, define our own command-buffer wrapper class where a base
object is passed on construction which contains function pointers
to the release/retain functions that can be used in the wrapper.
* Use create_single_kernel_helper_create_program
Use `create_single_kernel_helper_create_program` rather than
hardcoding `clCreateProgramWithSource` to allow for other types
of program input.
Also fix bug using wrong enum for passing properties on command-buffer
creation, should be `CL_COMMAND_BUFFER_FLAGS_KHR`
* Add out-of-order command-buffer test
Introduce a basic test for checking sync-point use
with out-of-order command-buffers.
This also includes better checking of required queue properties.