OpenCL / OpenGL interop problems

Discussion created by mulat on Jul 4, 2011
Latest reply on Jul 7, 2011 by mulat
Writing to depth buffer

Hi there,

i am trying to do some writes to a renderbuffer (GL_DEPTH_COMPONENT), as it is a part of a framebuffer object. I encountered a problem: I have a renderbuffer id (name) which actually is the depthbuffer and a single texture name for storing the color values. Since it's one renderbuffer and one texture, both have 1 as a name (I only created one of them each).

Both get attached to my CL kernel and when trying to write to both, the program not only crashes, it freezes the complete machine (so i have to do a hard reboot).

Further investigating this, I found out when I create more textures and bind one texture and one depth render buffer to the CL kernel, and both have different names, the code doesn't crash. The color target gets written to fine, I didn't have the time to check the depth render buffer as well (will do that in a few minutes).

Is it even possible to bind a renderbuffer with GL_DEPTH_COMPONENT to my CL kernel? Or am i doing something completely wrong?