Skip to content

Commit a3838e8

Browse files
committed
move image kernel argument restriction to clSetKernelArg
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 6556039 commit a3838e8

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
@@ -3269,9 +3269,6 @@ For each access qualifier, only images whose format is in the list of
32693269
formats returned by {clGetSupportedImageFormats} with the given flag
32703270
arguments in the <<image-format-mapping-table,Image Format Mapping>> table
32713271
are permitted.
3272-
It is not valid to pass an image supporting writing as both a `read_only`
3273-
image and a `write_only` image parameter, or to a `read_write` image
3274-
parameter and any other image parameter.
32753272

32763273
[[image-format-mapping-table]]
32773274
.Mapping from format flags passed to {clGetSupportedImageFormats} to OpenCL kernel language image access qualifiers
@@ -10878,6 +10875,10 @@ The memory object specified as argument value must be a 2D image array
1087810875
object with image channel order = {CL_DEPTH} if argument is declared to be of
1087910876
type _image2d_array_depth_t_.
1088010877

10878+
Behavior is undefined if the same memory object is passed as both a `read_only`
10879+
image and a `write_only` image, or as a `read_write` image and either a
10880+
`read_only` image or a `write_only` image.
10881+
1088110882
For all other kernel arguments, the _arg_value_ entry must be a pointer to
1088210883
the actual data to be used as argument value.
1088310884

0 commit comments

Comments
 (0)