Skip to content

Commit fed48e7

Browse files
author
Ewan Crawford
authored
Fix CL_INVALID_CONTEXT command-buffer error definitions (KhronosGroup#1149)
* Fix CL_INVALID_CONTEXT command-buffer error definitions See issue KhronosGroup#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. * Address review feedback * Remove extraneous `cl_khr_command_buffer_multi_device` precondition from error wording. * Change "enabled" terminology to "supported" with regards to extensions.
1 parent 85f5032 commit fed48e7

1 file changed

Lines changed: 69 additions & 22 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 69 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14349,8 +14349,10 @@ Otherwise, it returns one of the following errors:
1434914349
command-queue listed on _command_buffer_ creation.
1435014350
* {CL_INVALID_COMMAND_BUFFER_KHR} if _command_buffer_ is not a valid
1435114351
command-buffer.
14352-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and
14353-
_command_buffer_ is not the same.
14352+
ifdef::cl_khr_command_buffer_multi_device[]
14353+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14354+
associated with _command_queue_ and _command_buffer_ is not the same.
14355+
endif::cl_khr_command_buffer_multi_device[]
1435414356
* {CL_INVALID_OPERATION} if _command_buffer_ has been finalized.
1435514357
* {CL_INVALID_VALUE} if _mutable_handle_ is not `NULL`.
1435614358
* {CL_INVALID_SYNC_POINT_WAIT_LIST_KHR} if _sync_point_wait_list_ is
@@ -14432,8 +14434,12 @@ Otherwise, it returns the errors defined by {clEnqueueCopyBuffer} except:
1443214434

1443314435
{CL_INVALID_CONTEXT} is replaced with:
1443414436

14435-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14436-
_command_buffer_, _src_buffer_, and _dst_buffer_ are not the same.
14437+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
14438+
_src_buffer_, and _dst_buffer_ is not the same.
14439+
ifdef::cl_khr_command_buffer_multi_device[]
14440+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14441+
associated with _command_queue_ and _command_buffer_ is not the same.
14442+
endif::cl_khr_command_buffer_multi_device[]
1443714443

1443814444
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1443914445

@@ -14537,8 +14543,12 @@ except:
1453714543

1453814544
{CL_INVALID_CONTEXT} is replaced with:
1453914545

14540-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14541-
_command_buffer_, _src_buffer_, and _dst_buffer_ are not the same.
14546+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
14547+
_src_buffer_, and _dst_buffer_ is not the same.
14548+
ifdef::cl_khr_command_buffer_multi_device[]
14549+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14550+
associated with _command_queue_ and _command_buffer_ is not the same.
14551+
endif::cl_khr_command_buffer_multi_device[]
1454214552

1454314553
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1454414554

@@ -14625,8 +14635,12 @@ except:
1462514635

1462614636
{CL_INVALID_CONTEXT} is replaced with:
1462714637

14628-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14629-
_command_buffer_, _src_buffer_, and _dst_image_ are not the same.
14638+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
14639+
_src_buffer_, and _dst_image_ is not the same.
14640+
ifdef::cl_khr_command_buffer_multi_device[]
14641+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14642+
associated with _command_queue_ and _command_buffer_ is not the same.
14643+
endif::cl_khr_command_buffer_multi_device[]
1463014644

1463114645
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1463214646

@@ -14719,8 +14733,12 @@ Otherwise, it returns the errors defined by {clEnqueueCopyImage} except:
1471914733

1472014734
{CL_INVALID_CONTEXT} is replaced with:
1472114735

14722-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14723-
_command_buffer_, _src_image_, and _dst_image_ are not the same.
14736+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
14737+
_src_image_, and _dst_image_ is not the same.
14738+
ifdef::cl_khr_command_buffer_multi_device[]
14739+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14740+
associated with _command_queue_ and _command_buffer_ is not the same.
14741+
endif::cl_khr_command_buffer_multi_device[]
1472414742

1472514743
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1472614744

@@ -14807,8 +14825,12 @@ except:
1480714825

1480814826
{CL_INVALID_CONTEXT} is replaced with:
1480914827

14810-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14811-
_command_buffer_, _src_image_, and _dst_buffer_ are not the same.
14828+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_,
14829+
_src_image_, and _dst_buffer_ is not the same.
14830+
ifdef::cl_khr_command_buffer_multi_device[]
14831+
* {CL_INVALID_CONTEXT} _command_queue_ is not `NULL`, and the context
14832+
associated with _command_queue_ and _command_buffer_ is not the same.
14833+
endif::cl_khr_command_buffer_multi_device[]
1481214834

1481314835
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1481414836

@@ -14902,8 +14924,12 @@ Otherwise, it returns the errors defined by {clEnqueueFillBuffer} except:
1490214924

1490314925
{CL_INVALID_CONTEXT} is replaced with:
1490414926

14905-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14906-
_command_buffer_, and _buffer_ are not the same.
14927+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
14928+
_buffer_ is not the same.
14929+
ifdef::cl_khr_command_buffer_multi_device[]
14930+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
14931+
associated with _command_queue_ and _command_buffer_ is not the same.
14932+
endif::cl_khr_command_buffer_multi_device[]
1490714933

1490814934
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1490914935

@@ -14995,8 +15021,12 @@ Otherwise, it returns the errors defined by {clEnqueueFillImage} except:
1499515021

1499615022
{CL_INVALID_CONTEXT} is replaced with:
1499715023

14998-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
14999-
_command_buffer_, and _image_ are not the same.
15024+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
15025+
_image_ is not the same.
15026+
ifdef::cl_khr_command_buffer_multi_device[]
15027+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
15028+
associated with _command_queue_ and _command_buffer_ is not the same.
15029+
endif::cl_khr_command_buffer_multi_device[]
1500015030

1500115031
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1500215032

@@ -15239,8 +15269,12 @@ Otherwise, it returns the errors defined by {clEnqueueNDRangeKernel} except:
1523915269

1524015270
{CL_INVALID_CONTEXT} is replaced with:
1524115271

15242-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
15243-
_command_buffer_, and _kernel_ are not the same.
15272+
* {CL_INVALID_CONTEXT} if the context associated with _command_buffer_ and
15273+
_kernel_ is not the same.
15274+
ifdef::cl_khr_command_buffer_multi_device[]
15275+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
15276+
associated with _command_queue_ and _command_buffer_ is not the same.
15277+
endif::cl_khr_command_buffer_multi_device[]
1524415278

1524515279
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1524615280

@@ -15353,10 +15387,17 @@ Otherwise, it returns the errors defined by {clEnqueueSVMMemcpy} except:
1535315387
more than one queue, or _command_queue_ is not `NULL` and not a
1535415388
command-queue listed on _command_buffer_ creation.
1535515389

15390+
ifdef::cl_khr_command_buffer_multi_device[]
1535615391
{CL_INVALID_CONTEXT} is replaced with:
1535715392

15358-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
15359-
_command_buffer_, and _kernel_ are not the same.
15393+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
15394+
associated with _command_queue_ and _command_buffer_ is not the same.
15395+
15396+
endif::cl_khr_command_buffer_multi_device[]
15397+
15398+
ifndef::cl_khr_command_buffer_multi_device[]
15399+
{CL_INVALID_CONTEXT} error case is removed.
15400+
endif::cl_khr_command_buffer_multi_device[]
1536015401

1536115402
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1536215403

@@ -15459,10 +15500,16 @@ successfully. Otherwise, it returns the errors defined by
1545915500
more than one queue, or _command_queue_ is not `NULL` and not a
1546015501
command-queue listed on _command_buffer_ creation.
1546115502

15503+
ifdef::cl_khr_command_buffer_multi_device[]
1546215504
{CL_INVALID_CONTEXT} is replaced with:
1546315505

15464-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
15465-
_command_buffer_, and _kernel_ are not the same.
15506+
* {CL_INVALID_CONTEXT} if _command_queue_ is not `NULL`, and the context
15507+
associated with _command_queue_ and _command_buffer_ is not the same.
15508+
endif::cl_khr_command_buffer_multi_device[]
15509+
15510+
ifndef::cl_khr_command_buffer_multi_device[]
15511+
{CL_INVALID_CONTEXT} error case is removed.
15512+
endif::cl_khr_command_buffer_multi_device[]
1546615513

1546715514
{CL_INVALID_EVENT_WAIT_LIST} is replaced with:
1546815515

0 commit comments

Comments
 (0)