OpenCL 1.0 supports 2D image memory objects that can be read or written by kernels. Reads
and writes to the same 2D image memory object are not supported in a kernel. OpenCL 1.0 also
supports reads to 3D image memory objects in kernels. Writes to a 3D image memory object is
not allowed. The cl_khr_3d_image_writes
extension implements writes to 3D image memory objects. Reads and writes to the same 3D image memory object are not allowed in a
kernel.
An application that wants to use this extension to write to 3D image memory objects will need to
include the #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
directive in the OpenCL program source.
The built-in functions implemented by the cl_khr_3d_image_writes
extension are described in the table below.
Function | Description |
---|---|
|
Write
CL_SIGNED_INT8,
CL_UNSIGNED_INT8,
The behavior of |
For read-write or write-only 3D images, the minimum list of supported image formats is given by the table below:
image_num_channels |
image_channel_order |
image_channel_data_type |
---|---|---|
4 | CL_RGBA |
|
4 | CL_BGRA | CL_UNORM_INT8 |