Exclusive access semantics of clEnqueueAcquireGLObjects for shared OpenGL textures
0 reputation · 26 Jun 2024, 01:28 UTC
Exclusive access semantics of clEnqueueAcquireGLObjects for shared OpenGL textures
Goal: Determine whether acquiring a GL‑shared image with clEnqueueAcquireGLObjects prevents the OpenGL context from accessing the same texture while the OpenCL context holds it.
Constraints: The OpenCL 1.2 specification defines the acquire/release pair for synchronization but does not explicitly state that the GL context is locked or that concurrent GL commands are blocked. This leaves the behavior open to driver‑specific interpretation, which could lead to accidental public access if the GL side writes concurrently.
- Does clEnqueueAcquireGLObjects block all GL commands that read or write the same texture during the acquisition period?
- Is exclusive ownership guaranteed by the specification, or is it implementation‑defined?
- What application‑level synchronization should be used if the spec does not enforce exclusive access?