I want to do some post-processing on a OpenGL depth buffer with OpenCL.
However, AFAICT, OpenCL can't do this. Is this true? If so, what's the simplest way to shim this so OpenCL will work?
clCreateFromGLTexture2D only honors cl_image_format formats, which are essentially only RGBA (color) formats. Any attempt to use a depth texture results in CL_INVALID_GL_OBJECT, even if you pass a GL_DEPTH_COMPONENT32F texture (component type GL_FLOAT, which is supported). So a depth texture is apparently out.
And clCreateFromGLRenderbuffer says it "too" only handles RGBA-based (color) internal formats. Here's a guy that tried that last year and met with failure: link
What's a poor developer to do?