PDA

View Full Version : Sharing textures with OpenCL (on NVidia)



Dark Photon
04-25-2011, 06:26 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 on NVidia, I'm doing:
<< generate with OpenGL >> glFinish (http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml)() clEnqueueAcquireGLObjects (http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueAcquireGLObjects.html)() << crunch with OpenCL >> clEnqueueReleaseGLObjects (http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueReleaseGLObjects.html)() clFinish (http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clFinish.html)() << process with OpenGL >>
Is there a faster method of synchronization than glFinish (http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml)()/clFinish (http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clFinish.html)() currently supported on NVidia?

Any word on when ARB_cl_event (http://www.opengl.org/registry/specs/ARB/cl_event.txt) will be supported on NVidia?
(Usage example: here (http://www.khronos.org/developers/library/2010_siggraph_bof_opencl/OpenCL-BOF-Intro-and-Overview_SIGGRAPH-Jul10.pdf) on Slide 37)

Thanks.