From aca124780c4e2d6ab49a23441d770bb9871025b8 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Sat, 17 Aug 2024 18:07:03 -0700 Subject: [PATCH] clarify no implicit dependencies when waiting on or signaling semaphores --- api/opencl_runtime_layer.asciidoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/api/opencl_runtime_layer.asciidoc b/api/opencl_runtime_layer.asciidoc index 263ca185..fccb214a 100644 --- a/api/opencl_runtime_layer.asciidoc +++ b/api/opencl_runtime_layer.asciidoc @@ -13229,6 +13229,16 @@ events in _event_wait_list_ when {clEnqueueWaitSemaphoresKHR} returns. Waiting on the same binary semaphore twice without an interleaving signal may lead to undefined behavior. +[NOTE] +==== +When _command_queue_ is an out-of-order command-queue there are no implicit +dependencies between the semaphore wait command and commands enqueued into the +command-queue after the semaphore wait command. +If such dependencies are required, applications may enqueue a command-queue +barrier after the semaphore wait command, to explicitly add dependencies between +the semaphore wait command and subsequent commands. +==== + // refError {clEnqueueWaitSemaphoresKHR} returns {CL_SUCCESS} if the function is @@ -13318,6 +13328,16 @@ events in _event_wait_list_ when {clEnqueueSignalSemaphoresKHR} returns. Signaling the same binary semaphore twice without an interleaving wait may lead to undefined behavior. +[NOTE] +==== +When _command_queue_ is an out-of-order command-queue there are no implicit +dependencies between commands enqueued into the command-queue before the +semaphore signal command and the semaphore signal command. +If such dependencies are required, applications may enqueue a command-queue +barrier before the semaphore signal command, to explicitly add dependencies between +the preceding commands and the semaphore signal command. +==== + // refError {clEnqueueSignalSemaphoresKHR} returns {CL_SUCCESS} if the function is