-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync objects shared when using a shared context #202
Comments
That's a good question. My interpretation had always been that the sync object handles themselves, as EGL rather than client API handles, are context-independent, and it was only the sync commands that operated on the current context's command stream. Hence, there'd be no need to specify sharing rules for them because they don't need to be shared. They, like an EGLSurface handle, would already be valid handles in any client API context, and hence could be used with any context that supported them. However, I don't know if that interpretation is universally agreed-upon or can be derived from any EGL spec language. |
I hacked around the piglit test for the ext to add 2 test cases 1 about shared contexts. The first test case calls Everything passes on the NVIDIA driver (525.147 on debian), but I have not tried with mesa. So they do seems context independent. It might be good to have this behaviour written down somewhere. |
I concur with Cubanismo. |
Anything I could do to make this official in the spec? |
So I guess we could up the version of the extension with adding a paragraph about the returned fence sync handle EGLSync is usable by any other context/shared or not with a ClientWaitSync or GetSyncAttrib operation. If everyone's implementation is consistent with this, then maybe we just update revision version. If it is a change to someone's implementation, we'll need a new extension EGL_KHR_fence_sync_2 with just new changes.
|
Assuming everyone's implementation is consistent, I was thinking it may be sufficient to add a some umbrella language early in the EGL spec saying all EGL handles and their associated objects' state are context-independent. 2.2 "Rendering contexts" already has similar language covering surfaces, so that might be an appropriate place. Another option would be to generalize the language in 2.5 "EGLImages" to apply to sync objects as well, since the motivations and usage model are similar, though not identical (EGLImages have to be explicitly bound to some per-context client API object before accessing their state them. EGLSync objects are accessed directly.). If deemed necessary, maybe a blurb or footnote referencing that in the paragraph that defines eglCreateSync[KHR]. I can't think of an EGL-level object that has context scope off-hand. eglGetSyncAttrib() does not require a current context AFAIK, which should make it clearer EGLSync state is not context state. EGL commands in general do not operate on the current context, unless such an interaction is explicitly called out, per my understanding. Hopefully implementations are consistent in this regard. |
That is a bit wider scope than I was thinking. But your suggestions seem good to me. So long as we are not changing expected implementation. |
I went through the
EGL_KHR_fence_sync
extensions, and the behaviour of sync objects in shared context is not defined.I did found this bit of text refering to the bound client API (GL/GLES)
Is it implied that they the sync objects are shared via the client API?
The text was updated successfully, but these errors were encountered: