Skip to content

Commit 8a3b4c7

Browse files
committed
cl_khr_command_buffer sync-point capacity
Document the behaviour when command-buffer command capacity is reached, and track under "Issues" the possible future use-cases for being able to optimize based on the capacity of a command-buffer. Closes KhronosGroup#844
1 parent 03acab5 commit 8a3b4c7

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

api/cl_khr_command_buffer.asciidoc

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ Command-buffers enable a reduction in overhead when enqueuing the same
4343
workload multiple times. By separating the command-queue setup from dispatch,
4444
the ability to replay a set of previously created commands is introduced.
4545

46-
Device-side _cl_sync_point_khr_ synchronization-points can be used within
47-
command-buffers to define command dependencies. This allows the commands of a
48-
command-buffer to execute out-of-order on a single <<compatible, compatible>>
49-
command-queue. The command-buffer itself has no inherent in-order/out-of-order
50-
property, this ordering is inferred from the command-queue used on command
51-
recording. Out-of-order enqueues without event dependencies of both regular
52-
commands, such as {clEnqueueFillBuffer}, and command-buffers are allowed to
53-
execute concurrently, and it is up to the user to express any dependencies using
54-
events.
55-
5646
The command-queues a command-buffer will be executed on can be set on replay via
5747
parameters to {clEnqueueCommandBufferKHR}, provided they are
5848
<<compatible, compatible>> with the command-queues used on command-buffer
@@ -110,6 +100,28 @@ following reasons:
110100
other extensions layered on top to take advantage of them to provide additional
111101
mutable functionality.
112102

103+
==== Command Synchronization
104+
105+
Device-side {cl_sync_point_khr_TYPE} synchronization-points can be used within
106+
command-buffers to define command dependencies. This allows the commands of a
107+
command-buffer to execute out-of-order on a single <<compatible, compatible>>
108+
command-queue. The command-buffer itself has no inherent in-order/out-of-order
109+
property, this ordering is inferred from the command-queue used on command
110+
recording. Out-of-order enqueues without event dependencies of both regular
111+
commands, such as {clEnqueueFillBuffer}, and command-buffers are allowed to
112+
execute concurrently, and it is up to the user to express any dependencies using
113+
events.
114+
115+
The {cl_sync_point_khr_TYPE} type is defined as a `cl_uint`, giving a hard
116+
upper limit on the number of commands a command-buffer can hold as
117+
{CL_UINT_MAX}, at which point {CL_OUT_OF_RESOURCES} will be returned. However,
118+
it is likely an implementation will reach capacity before this threshold is
119+
hit.
120+
121+
There are no gurantees made around the values of sync-points returned from
122+
adding commands to a command-buffer. Any semantics that a could be inferred
123+
from the sync-point values returned is implementation defined.
124+
113125
==== Simultaneous Use
114126

115127
The optional simultaneous use capability was added to the extension so that
@@ -420,6 +432,19 @@ features:
420432
--
421433
*UNRESOLVED*
422434
--
435+
. Give users more control over command-buffer command capacity via some or all
436+
of the following mechanisms.
437+
** Provide a way for a user to query a command-buffer for the maximum number
438+
of commands it can hold.
439+
** Guarantee a minimum command capacity that an implementation must support.
440+
** Provide a mechanism for users to reserve command-buffer capacity on
441+
command-buffer creation.
442+
443+
+
444+
--
445+
*RESOLVED* - Mechanisms to achieve this could be provided as a layered extension.
446+
--
447+
423448

424449
=== Version History
425450

0 commit comments

Comments
 (0)