From 443d25bb6cafbac5ac404eabde49d063af40356a Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 12 Sep 2024 10:03:17 -0700 Subject: [PATCH] unify the CL_INVALID_COMMAND_QUEUE behavior for semaphore signals and waits (#1256) --- api/cl_khr_semaphore.asciidoc | 3 +++ api/opencl_runtime_layer.asciidoc | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/api/cl_khr_semaphore.asciidoc b/api/cl_khr_semaphore.asciidoc index 721a3da2e..40afe4c12 100644 --- a/api/cl_khr_semaphore.asciidoc +++ b/api/cl_khr_semaphore.asciidoc @@ -255,3 +255,6 @@ while (true) { {CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} (provisional). * Revision 1.0.0, 2024-03-15 ** First non-provisional version. + * Revision 1.0.1, 2024-09-08 + ** Unified {CL_INVALID_COMMAND_QUEUE} error behavior for + {clEnqueueSignalSemaphoresKHR} and {clEnqueueWaitSemaphoresKHR}. diff --git a/api/opencl_runtime_layer.asciidoc b/api/opencl_runtime_layer.asciidoc index 5a769f285..a10d5fb92 100644 --- a/api/opencl_runtime_layer.asciidoc +++ b/api/opencl_runtime_layer.asciidoc @@ -13285,7 +13285,9 @@ Otherwise, it returns one of the following errors: ** if _command_queue_ is not a valid command-queue, or ** if the device associated with _command_queue_ is not same as one of the devices specified by {CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} at the time - of creating one or more of _sema_objects_. + of creating one or more of _sema_objects_, or + ** if one or more of _sema_objects_ belong to a context that does not + contain a device associated with _command_queue_. * {CL_INVALID_VALUE} if _num_sema_objects_ is 0. * {CL_INVALID_SEMAPHORE_KHR} if any of the semaphore objects specified by _sema_objects_ is not valid. @@ -13398,11 +13400,11 @@ Otherwise, it returns one of the following errors: _sema_objects_ requires a semaphore payload and _sema_payload_list_ is `NULL`. * {CL_INVALID_EVENT_WAIT_LIST} - ** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not - 0, or - ** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is - 0, or - ** if event objects in _event_wait_list_ are not valid events. + ** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not 0, + or + ** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is 0, + or + ** if event objects in _event_wait_list_ are not valid events. * {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST} if the execution status of any of the events in _event_wait_list_ is a negative integer value. * {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources @@ -13411,7 +13413,6 @@ Otherwise, it returns one of the following errors: required by the OpenCL implementation on the host. -- - === Retaining and Releasing Semaphores [open,refpage='clReleaseSemaphoreKHR',desc='Release a semaphore object',type='protos']