clCreateImage2D() always returns -10 (CL_IMAGE_FORMAT_NOT_SUPPORTED)

clCreateImage2D() always returns -10 (CL_IMAGE_FORMAT_NOT_SUPPORTED)

Hi All,

I have used clCreateBuffer() with success but when I try to use clCreateImage2D(), it always returns -10 (CL_IMAGE_FORMAT_NOT_SUPPORTED). It appears to me that IMAGES are not supported yet by Intel OpenCL SDK 1.5, only BUFFERS are?

I have tried with different formats, but to no avail. I have gone through the Intel SDK 1.5 Release Notes and there is no such mention about clCreateImage2D() being unsupported.

By the way, none of the SDK samples seem to use clCreateImage2D() either!
Thanks.

- Javed Rabbani

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Can you post code to reproduce the issue? While I have some other issues with interop I am able to create some image fine and I get a CL_SUCCESS. I just reconfirmed by recreating a 8bit unsigned int CL_RGBA image.

If I create CL_RGBA image with CL_UNSIGNED_INT8 / INT16 / INT32 or even CL_FLOAT data type, it succeeds. However, if I repeat the same with channel order CL_RGB or CL_R, it fails all together. It appears that not all channel orders are supported. My image dimensions are 600 x 400 (w x h).

You are correct as I was able to reproduce this error when using CL_R and CL_RGB, CL_LUMINANCE, and I think almost every format except CL_RGBA. This may be the cause of a number of problems I had getting my code ported to Intel's OpenCL implementation.

Hi,

Our OpenCL implementation supports the minimal set described in the OpenCL specification.
The formats stated in this post are not supported by our implementation

clGetSupportedImageFormats() APIcan be used to get the list of image formats supported by an OpenCL implementation.

Thanks,
Boaz

Hi Boaz,

Your implementation reports that is supports interop extension (which doesn't seem to work when executing kernelsfor me and someone there mentioned you reproduced the issue on another thread) which requires considerably more images to be implemented as long as the corresponding texture is loaded correctly in OpenGL.Those combinations are the ones below:

CL_RGBA, CL_UNORM_INT8

CL_BGRA, CL_UNORM_INT8
CL_RGBA, CL_UNORM_INT8
CL_BGRA, CL_UNORM_INT8
CL_RGBA, CL_UNORM_INT16
CL_RGBA, CL_SIGNED_INT8
CL_RGBA, CL_SIGNED_INT16
CL_RGBA, CL_SIGNED_INT32
CL_RGBA, CL_UNSIGNED_INT8
CL_RGBA, CL_UNSIGNED_INT16
CL_RGBA, CL_UNSIGNED_INT32
CL_RGBA, CL_HALF_FLOAT
CL_RGBA, CL_FLOAT

Hi,

The clGetSupportedImageFormats() returns following 13 supported formats, out of which 10 are CL_RGBA, 1 each is CL_BGRA, CL_LUMINANCE, CL_INTENSITY:

Format [0] = CL_RGBA / CL_UNORM_INT8
Format [1] = CL_RGBA / CL_UNORM_INT16
Format [2] = CL_RGBA / CL_SIGNED_INT8
Format [3] = CL_RGBA / CL_SIGNED_INT16
Format [4] = CL_RGBA / CL_SIGNED_INT32
Format [5] = CL_RGBA / CL_UNSIGNED_INT8
Format [6] = CL_RGBA / CL_UNSIGNED_INT16
Format [7] = CL_RGBA / CL_UNSIGNED_INT32
Format [8] = CL_RGBA / CL_HALF_FLOAT
Format [9] = CL_RGBA / CL_FLOAT
Format [10] = CL_BGRA / CL_UNORM_INT8
Format [11] = CL_INTENSITY / CL_FLOAT
Format [12] = CL_LUMINANCE / CL_FLOAT

I guess, it would be helpful if thisinformation is documented within the release notes as it is most likely that someone will look to use CL_RGB first up if he/she is coming from an image processingbackground.

Also, the Intel SDK 1.5 samples should include at least one sample of using Image2D memory objects alongside Buffers. If Image3Dusage is demonstrated as well, that will be more than useful.

I think Image Convolution can be a perfect starting pointdemonstrating Image2D usage. "Heterogeneous Computing using OpenCL" lastest book uses that example to teach Image2D usage in chapter 4.

Thanks.

- Javed

Leave a Comment

Please sign in to add a comment. Not a member? Join today