[Mesa-dev] [RFC 1/5] egl: Support EGL sync objects with OpenGL API

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Thu Aug 31 05:19:35 UTC 2017


Xorg server uses the OpenGL API by default and we still want
to support fencing in that situation. Fences seem to work
properly even is not using the OpenGL ES API.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
---
 src/egl/main/eglapi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index e3f10fcbe2..be3211a7b0 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1770,8 +1770,7 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list,
       RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR);
 
    /* return an error if the client API doesn't support GL_OES_EGL_sync */
-   if (ctx && (ctx->Resource.Display != disp ||
-               ctx->ClientAPI != EGL_OPENGL_ES_API))
+   if (ctx && (ctx->Resource.Display != disp))
       RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR);
 
    switch (type) {
@@ -1954,7 +1953,7 @@ _eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags)
    assert(disp->Extensions.KHR_wait_sync);
 
    /* return an error if the client API doesn't support GL_OES_EGL_sync */
-   if (ctx == EGL_NO_CONTEXT || ctx->ClientAPI != EGL_OPENGL_ES_API)
+   if (ctx == EGL_NO_CONTEXT)
       RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_FALSE);
 
    /* the API doesn't allow any flags yet */
-- 
2.13.0



More information about the mesa-dev mailing list