Supported Image Formats

Description

For 1D, 2D, 3D image objects, 1D and 2D image array objects, the mandated minimum list of image formats that must be supported by all devices (that can be read from or written to by a kernel but not both) that support images is described in the table below (Table 5.8.a):

---- num_channels ---- ---- channel_order ---- ---- channel_data_type ----

1

CL_R

CL_UNORM_INT8
CL_UNORM_INT16

CL_SNORM_INT8
CL_SNORM_INT16

CL_SIGNED_INT8
CL_SIGNED_INT16
CL_SIGNED_INT32

CL_UNSIGNED_INT8
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32

CL_HALF_FLOAT
CL_FLOAT

1

CL_DEPTH

CL_UNORM_INT16
CL_FLOAT

2

CL_RG

CL_UNORM_INT8
CL_UNORM_INT16

CL_SNORM_INT8
CL_SNORM_INT16

CL_SIGNED_INT8
CL_SIGNED_INT16
CL_SIGNED_INT32

CL_UNSIGNED_INT8
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32

CL_HALF_FLOAT
CL_FLOAT

4

CL_RGBA

CL_UNORM_INT8
CL_UNORM_INT16

CL_SNORM_INT8
CL_SNORM_INT16

CL_SIGNED_INT8
CL_SIGNED_INT16
CL_SIGNED_INT32

CL_UNSIGNED_INT8
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32

CL_HALF_FLOAT
CL_FLOAT

4

CL_BGRA

CL_UNORM_INT8

4

CL_sRGBA

CL_UNORM_INT8

CL_DEPTH channel order is supported only for 2D image and 2D image array objects.

sRGB channel order support is not required for 1D image buffers. Writes to images with sRGB channel orders requires device support of the cl_khr_srgb_image_writes extension.

For 1D, 2D, 3D image objects, 1D and 2D image array objects, the mandated minimum list of image formats that must be supported by all devices (that can be read from and written to by a kernel) that support images is described in the table below (Table 5.8.b):

---- num_channels ---- ---- channel_order ---- ---- channel_data_type ----

1

CL_R

CL_UNORM_INT8

CL_SIGNED_INT8
CL_SIGNED_INT16
CL_SIGNED_INT32

CL_UNSIGNED_INT8
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32

CL_HALF_FLOAT
CL_FLOAT

4

CL_RGBA

CL_UNORM_INT8

CL_SIGNED_INT8
CL_SIGNED_INT16
CL_SIGNED_INT32

CL_UNSIGNED_INT8
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32

CL_HALF_FLOAT
CL_FLOAT

Also see

Specification