Skip to content

Commit 5babae6

Browse files
authored
move image kernel argument restriction to clSetKernelArg (#1346)
Documents the restriction about passing the same image as a read-only and a write-only kernel argument in the description of clSetKernelArg rather than as the description of image access qualifiers. Also, clarifies that behavior is undefined in this case, vs. invalid.
1 parent daff7cc commit 5babae6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,9 +3313,6 @@ For each access qualifier, only images whose format is in the list of
33133313
formats returned by {clGetSupportedImageFormats} with the given flag
33143314
arguments in the <<image-format-mapping-table,Image Format Mapping>> table
33153315
are permitted.
3316-
It is not valid to pass an image supporting writing as both a `read_only`
3317-
image and a `write_only` image parameter, or to a `read_write` image
3318-
parameter and any other image parameter.
33193316

33203317
[[image-format-mapping-table]]
33213318
.Mapping from format flags passed to {clGetSupportedImageFormats} to OpenCL kernel language image access qualifiers
@@ -10930,6 +10927,10 @@ The memory object specified as argument value must be a 2D image array
1093010927
object with image channel order = {CL_DEPTH} if argument is declared to be of
1093110928
type _image2d_array_depth_t_.
1093210929

10930+
Behavior is undefined if the same memory object is passed as both a `read_only`
10931+
image and a `write_only` image, or as a `read_write` image and either a
10932+
`read_only` image or a `write_only` image.
10933+
1093310934
For all other kernel arguments, the _arg_value_ entry must be a pointer to
1093410935
the actual data to be used as argument value.
1093510936

0 commit comments

Comments
 (0)