Skip to content

Commit

Permalink
Fix CL_INVALID_CONTEXT command-buffer error definitions
Browse files Browse the repository at this point in the history
See issue #1147
documenting that the error specification for `CL_INVALID_CONTEXT`
doesn't take into account the variation when
`cl_khr_command_buffer_multi_device` is enabled.

Doing this change also picked up that the error wording for
`clCommandSVMMemcpyKHR` and `clCommandSVMMemFillKHR` referenced
the _kernel_ parameter which doesn't exist.
  • Loading branch information
EwanC committed Apr 8, 2024
1 parent 16880f9 commit 38922f7
Showing 1 changed file with 80 additions and 22 deletions.
102 changes: 80 additions & 22 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14435,8 +14435,11 @@ Otherwise, it returns one of the following errors:
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not `NULL`.
* {CL_INVALID_COMMAND_BUFFER_KHR} if _command_buffer_ is not a valid
command-buffer.
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and
_command_buffer_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_OPERATION} if _command_buffer_ has been finalized.
* {CL_INVALID_VALUE} if _mutable_handle_ is not `NULL`.
* {CL_INVALID_SYNC_POINT_WAIT_LIST_KHR} if _sync_point_wait_list_ is
Expand Down Expand Up @@ -14518,8 +14521,13 @@ Otherwise, it returns the errors defined by {clEnqueueCopyBuffer} except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, _src_buffer_, and _dst_buffer_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
_src_buffer_, and _dst_buffer_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -14623,8 +14631,13 @@ except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, _src_buffer_, and _dst_buffer_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
_src_buffer_, and _dst_buffer_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -14711,8 +14724,13 @@ except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, _src_buffer_, and _dst_image_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
_src_buffer_, and _dst_image_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -14805,8 +14823,13 @@ Otherwise, it returns the errors defined by {clEnqueueCopyImage} except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, _src_image_, and _dst_image_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
_src_image_, and _dst_image_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -14893,8 +14916,13 @@ except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, _src_image_, and _dst_buffer_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
_src_image_, and _dst_buffer_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -14988,8 +15016,13 @@ Otherwise, it returns the errors defined by {clEnqueueFillBuffer} except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, and _buffer_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
_buffer_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -15081,8 +15114,13 @@ Otherwise, it returns the errors defined by {clEnqueueFillImage} except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, and _image_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
_image_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -15325,8 +15363,13 @@ Otherwise, it returns the errors defined by {clEnqueueNDRangeKernel} except:

{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, and _kernel_ are not the same.
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
_kernel_ is not the same.
ifdef::cl_khr_command_buffer_multi_device[]
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -15439,10 +15482,18 @@ Otherwise, it returns the errors defined by {clEnqueueSVMMemcpy} except:
more than one queue, or _command_queue_ is not `NULL` and not a
command-queue listed on _command_buffer_ creation.

ifdef::cl_khr_command_buffer_multi_device[]
{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, and _kernel_ are not the same.
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.

endif::cl_khr_command_buffer_multi_device[]

ifndef::cl_khr_command_buffer_multi_device[]
{CL_INVALID_CONTEXT} error case is removed.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down Expand Up @@ -15545,10 +15596,17 @@ successfully. Otherwise, it returns the errors defined by
more than one queue, or _command_queue_ is not `NULL` and not a
command-queue listed on _command_buffer_ creation.

ifdef::cl_khr_command_buffer_multi_device[]
{CL_INVALID_CONTEXT} is replaced with:

* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
_command_buffer_, and _kernel_ are not the same.
* {CL_INVALID_CONTEXT} if the {cl_khr_command_buffer_multi_device_EXT}
extension is enabled, and _command_queue_ is not `NULL`, and the context
associated with _command_queue_ and _command_buffer_ is not the same.
endif::cl_khr_command_buffer_multi_device[]

ifndef::cl_khr_command_buffer_multi_device[]
{CL_INVALID_CONTEXT} error case is removed.
endif::cl_khr_command_buffer_multi_device[]

{CL_INVALID_EVENT_WAIT_LIST} is replaced with:

Expand Down

0 comments on commit 38922f7

Please sign in to comment.