Description

The tables below describe the required minimum lists of supported image formats. To query all image formats supported by an implementation, call the function clGetSupportedImageFormats.

For full profile devices supporting OpenCL 2.0, 2.1, or 2.2, the minimum list of supported image formats for either reading or writing in a kernel is:

Table 1. Minimum list of supported image formats for reading or writing (OpenCL 2.0, 2.1, or 2.2)
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 [1]

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 [2]

CL_UNORM_INT8

For full profile devices supporting other OpenCL versions, such as OpenCL 1.2 or OpenCL 3.0, the minimum list of supported image formats for either reading or writing in a kernel is:

Table 2. Minimum list of required image formats for reading or writing
num_channels channel_order channel_data_type

4

CL_RGBA

CL_UNORM_INT8
CL_UNORM_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

For full profile devices that support reading from and writing to the same image object from the same kernel instance (see CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS), the minimum list of supported image formats for reading and writing in the same kernel instance is:

Table 3. Minimum list of required image formats for reading and writing
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

See Also

No cross-references are available

Document Notes

For more information, see the OpenCL Specification

This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0


1. Support for the CL_DEPTH image channel order is required only for 2D images and 2D image arrays.
2. Support for reading from the CL_sRGBA image channel order is optional for 1D image buffers. Support for writing to the CL_sRGBA image channel order is optional for all image types.