5.11.1.2.1. Explicit Synchronization Using OpenGL Fence Sync Objects
5.11.1.2.1. 使用OpenGL栅栏同步对象进行显式同步
If the cl_khr_gl_event extension is supported, event objects created with clCreateEventFromGLsyncKHR provide another method of coordinating sharing of buffers and images between OpenGL and OpenCL.
如果支持cl_khr_gl_event扩展,则使用clCreateEventFromGLsyncKHR创建的事件对象提供了另一种协调OpenGL和OpenCL之间缓冲区和图像共享的方法。
Completion of OpenGL commands may be determined by
OpenGL命令的完成可以通过以下方式确定
-
placing an OpenGL fence command after commands using
glFenceSync; -
使用glFenceSync在命令后放置OpenGL围栏命令;
-
creating an event from the resulting OpenGL sync object using clCreateEventFromGLsyncKHR; and
-
使用clCreateEventFromGLsyncKHR从生成的OpenGL同步对象创建事件;和
-
determining completion of that event object via clEnqueueAcquireGLObjects.
-
通过clEnqueueAcquireGLObjects确定该事件对象的完成。
This method may be considerably more efficient than calling glFinish, and is referred to as explicit synchronization. Explicit synchronization is most useful when an OpenGL context bound to another thread is accessing the memory objects.
这种方法可能比调用glFinish更有效,被称为显式同步。当绑定到另一个线程的OpenGL上下文正在访问内存对象时,显式同步最有用。
Explicit synchronization is most useful when an OpenGL context bound to another thread is accessing the memory objects.
当绑定到另一个线程的OpenGL上下文正在访问内存对象时,显式同步最有用。
571




被折叠的 条评论
为什么被折叠?



