View Full Version : Sharing textures with OpenCL (avoiding glFinish/clFinish)

Dark Photon
04-26-2011, 04:52 AM
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:

<< generate with OpenGL >>[/*:m:v0r71341]
<< crunch with OpenCL >>[/*:m:v0r71341]
<< process with OpenGL >>[/*:m:v0r71341]

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 (http://www.opengl.org/registry/specs/ARB/cl_event.txt) will be supported?
(Usage example: here (http://www.khronos.org/developers/library/2010_siggraph_bof_opencl/OpenCL-BOF-Intro-and-Overview_SIGGRAPH-Jul10.pdf) on Slide 37)


04-26-2011, 05:03 AM
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.

Dark Photon
04-26-2011, 09:12 AM
Thanks. Did post on NVidia's site yesterday, but hadn't yet received a response. It's possible I haven't waited long enough.