cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bmerry
Journeyman III

clCreateImage3D doesn't work any more?

I feel like I might be missing something obvious, but it seems that clCreateImage3D is returning CL_INVALID_IMAGE whereas using clCreateImage with equivalent parameters is succeeding. I know clCreateImage3D is deprecated, but it should still work, and I can't use 1.2 functions because the code needs to run on hardware made by a certain vendor who still doesn't support 1.2.

I've attached a code sample that demonstrates the bug. It creates a 1x1x1 CL_R/CL_FLOAT 3D texture, first with clCreateImage and then with clCreateImage3D. I've been compiling it on 64-bit Ubuntu 12.04, but in theory it should be portable code.

I'm using AMD APP SDK 2.8.1.0 with the CPU device.

0 Likes
2 Replies
bmerry
Journeyman III

There is a typo in the amd_image3d.c file in the attachment: CL_USE_DEPRECATED_1_1_APIS should be CL_USE_DEPRECATED_OPENCL_1_1_APIS.

0 Likes

An AMD engineer has pointed out what I missed (thanks!): OpenCL 1.1 requires depth > 1, so my 1x1x1 trial texture is invalid. OpenCL 1.2 relaxed the restriction to allow depth=1.

0 Likes