Skip to content

Commit 4d4bb08

Browse files
authored
Fix up command-buffer enqueue error after PR-1382 (KhronosGroup#1471)
KhronosGroup#1382 added support for deferring setting arguments on a kernel command which is updatable. To achieve this we added an extra command-buffer state, "finalized" which is entered when a command-buffer has been finalized but doesn't yet have all it's arguments set. However, if a user tries to enqueue a command-buffer in this state it shouldn't be valid. Therefore update our current wording about when an command-buffer can be enqueued to say the specifically the executable state, when all arguments are available. Rather than defined as after the finalization operation, which could result in the command-buffer being in either the finalization or executable state. We already have a NOTE above to this effect, which I've removed as it felt like it didn't add any extra value above the error definition, but can added back if folks think it's worthwhile.
1 parent e22f577 commit 4d4bb08

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15122,20 +15122,15 @@ include::{generated}/api/version-notes/clEnqueueCommandBufferKHR.asciidoc[]
1512215122
application to wait on this command or query it for profiling
1512315123
information.
1512415124

15125-
[NOTE]
15126-
====
15127-
To enqueue a command-buffer it must be in a <<executable, Executable>> state,
15128-
see {clFinalizeCommandBufferKHR}.
15129-
====
15130-
1513115125
// refError
1513215126

1513315127
{clEnqueueCommandBufferKHR} returns {CL_SUCCESS} if the command-buffer
1513415128
execution was successfully queued, or one of the errors below:
1513515129

1513615130
* {CL_INVALID_COMMAND_BUFFER_KHR} if _command_buffer_ is not a valid
1513715131
command-buffer.
15138-
* {CL_INVALID_OPERATION} if _command_buffer_ has not been finalized.
15132+
* {CL_INVALID_OPERATION} if _command_buffer_ is not in the
15133+
<<executable, Executable>> state.
1513915134
* {CL_INVALID_VALUE} if _queues_ is `NULL` and _num_queues_ is > 0, or
1514015135
_queues_ is not `NULL` and _num_queues_ is 0.
1514115136
* {CL_INVALID_VALUE} if _num_queues_ is > 0 and not the same value as

0 commit comments

Comments
 (0)