Skip to content

Commit c863557

Browse files
authored
Move semaphore sharing error condition to cl_khr_external_semaphore (#897)
Semaphore sharing is not defined by the cl_khr_semaphore specification. Signed-off-by: Kévin Petit <kpet@free.fr>
1 parent d328bf7 commit c863557

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

ext/cl_khr_external_semaphore.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ Add to the list of supported _param_names_ by {clGetSemaphoreInfoKHR}:
235235
semaphore does not support any handle types for exporting.
236236
|====
237237

238+
Add to the list of error conditions for {clEnqueueWaitSemaphoresKHR} and {clEnqueueSignalSemaphoresKHR}:
239+
240+
* {CL_INVALID_COMMAND_QUEUE} if one or more of _sema_objects_ can not be shared with the device associated with _command_queue_.
241+
238242
=== Exporting semaphore external handles
239243

240244
To export an external handle from a semaphore, call the function

ext/cl_khr_semaphore.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,7 @@ Otherwise, it returns one of the following errors:
316316
* {CL_INVALID_COMMAND_QUEUE}
317317
** if _command_queue_ is not a valid command-queue, or
318318
** if the device associated with _command_queue_ is not same as one of the devices specified by {CL_DEVICE_HANDLE_LIST_KHR} at the time of creating one or more of _sema_objects_, or
319-
** if one or more of _sema_objects_ belong to a context that does not contain a device associated with_command_queue_, or
320-
** if one or more of _sema_objects_ can not be shared with the device associated with _command_queue_.
319+
** if one or more of _sema_objects_ belong to a context that does not contain a device associated with_command_queue_.
321320
* {CL_INVALID_VALUE} if _num_sema_objects_ is 0.
322321
* {CL_INVALID_SEMAPHORE_KHR} if any of the semaphore objects specified by _sema_objects_ is not valid.
323322
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and any of the semaphore objects in _sema_objects_ are not the same or if the context associated with _command_queue_ and that associated with events in _event_wait_list_ are not the same.
@@ -368,8 +367,7 @@ Otherwise, it returns one of the following errors:
368367
* {CL_INVALID_COMMAND_QUEUE}
369368
** if _command_queue_ is not a valid command-queue, or
370369
** if device associated with _command_queue_ is not same as one of devices specified by {CL_DEVICE_HANDLE_LIST_KHR} at the time of creating one or more of _sema_objects_, or
371-
** if one or more of _sema_objects_ belong to a context that does not contain a device associated _command_queue_, or
372-
** if one or more of _sema_objects_ can not be shared with device associated with _command_queue_.
370+
** if one or more of _sema_objects_ belong to a context that does not contain a device associated _command_queue_.
373371
* {CL_INVALID_VALUE} if _num_sema_objects_ is 0
374372
* {CL_INVALID_SEMAPHORE_KHR} if any of the semaphore objects specified by _sema_objects_ is not valid.
375373
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and any of the semaphore objects in _sema_objects_ are not the same or if the context associated with _command_queue_ and that associated with events in _event_wait_list_ are not the same.

0 commit comments

Comments
 (0)