Supported Image Formats

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

sRGB images can only be written to if the cl_khr_srgb_image_writes extension is supported.

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

Specification

OpenCL Specification

Also see

EXTENSION, cl_image_format, cl_khr_3d_image_writes, cl_khr_srgb_image_writes, clGetSupportedImageFormats

Copyright © 2007-2013 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.