I have an application in mind, that would make really good use of OpenCL image processing. I assume that a GPU is going to be best placed to do this, and I was surprised to find that CL_DEVICE_IMAGE_SUPPORT evaluated to false, when I had my clGetDeviceIDs flag set to CL_DEVICE_TYPE_GPU. I have a ATI Radeon HD 4850. Isn't a lack of image support a big hole?
Anyway, supposing I set the flag to CL_DEVICE_TYPE_CPU, where there is image support, what exactly is it that I'm to supply to host_ptr in clCreateImage2D? In Cocoa speak, I have tried to send it "im", where im is created by:
unsigned char *im = (unsigned char*) malloc(height*pitch);
memcpy(im, [bmImage bitmapData], height*[bmImage bytesPerRow]);
basically exactly as the Apple example code does. I'd follow the way the example code does it, but I can't find any examples that actually use the method that has the clCreateImage2D call in it. When I do this, I get a CL_INVALID_HOST_PTR error. Any help would be much appreciated.