Sharing textures with OpenCL (avoiding glFinish/clFinish)

Currently to pass a texture (or renderbuffer) to OpenCL for some fast crunching on the GPU, and to pass the result back to OpenGL, I’m doing:

  1. << generate with OpenGL >>
  2. glFinish
  3. clEnqueueAcquireGLObjects
  4. << crunch with OpenCL >>
  5. clEnqueueReleaseGLObjects
  6. clFinish
  7. << process with OpenGL >>

Is there a faster method of synchronization than glFinish/clFinish currently supported on NVidia? Is Flush good enough?

Any word on when ARB_cl_event will be supported?
(Usage example: here on Slide 37)


It’s more likely that you will get a reply in the NVidia forums if your question is exclusively related to NVidia.

You are correct when you mention that cl_khr_gl_event / ARB_cl_event is the way to go.

Thanks. Did post on NVidia’s site yesterday, but hadn’t yet received a response. It’s possible I haven’t waited long enough.