Re: fastest OpenGL/OpenCL interop in an FCPX plugin?
Re: fastest OpenGL/OpenCL interop in an FCPX plugin?
- Subject: Re: fastest OpenGL/OpenCL interop in an FCPX plugin?
- From: Paul Miller <email@hidden>
- Date: Fri, 08 Nov 2013 12:59:43 -0600
- Organization: FXTECH
On 11/8/2013 11:21 AM, Garrick Meeker wrote:
Take a look at cl_khr_gl_event (specifically clCreateEventFromGLsyncKHR) which was added in CL 1.1. The docs may be a little confusing but they refer to non-portable synchronization when cl_khr_gl_event is not available. Basically you create a GLsync from OpenGL which isn’t blocking, call clCreateEventFromGLsyncKHR to create a cl_event and make sure clEnqueueAcquireGLObjects and others wait on the right events.
See the docs for clEnqueueReleaseGLObjects. If cl_khr_gl_event is enabled the GL commands that affect that buffer won’t take affect until the CL commands complete (although you should determine if that allows you to avoid clFinish.) You probably want to call clFinish anyway so you can release your temporary buffers before returning from the plugin.
There is also GL_ARB_cl_event to go from CL to GL, but that may not be useful unless you do GL drawing as well (since you need to clFinish before releasing buffers anyway).
Thanks for the pointers Garrick.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden