I’m getting CL_IMAGE_FORMAT_NOT_SUPPORTED with the following code, but I can’t find anything wrong with it. CL_RGBA works for channel order, but CL_R doesn’t. Does this mean that OpenCL only supports 4 channel float images, and not 2 or 1 channel? This sounds a little silly, but it’s the best answer I can find.
Can someone confirm that I can’t use CL_RG & CL_FLOAT together in a 2D image? Otherwise, what could I be doing wrong here that would result in that error?
I’m running Mac 10.6.3 with a GTX 285 on a Mac Pro. My OpenCL code is running on the CPU here, though.
cl_image_format imgFmt; //Copy coord data to the device imgFmt.image_channel_order = CL_RG; imgFmt.image_channel_data_type = CL_FLOAT; (*latLong) = clCreateImage2D(warper->context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, &imgFmt, (size_t) warper->srcWidth, (size_t) warper->srcHeight, (size_t) sizeof(float)*2*warper->srcWidth, warper->latLongWork, &err); handleErr(err);