[PATCH 11/12] glamor: Do the same MakeCurrent(None) for GLX as we do for EGL.

Eric Anholt eric at anholt.net
Fri Apr 18 11:40:09 PDT 2014


Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_glx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/glamor/glamor_glx.c b/glamor/glamor_glx.c
index db8e661..7107c7c 100644
--- a/glamor/glamor_glx.c
+++ b/glamor/glamor_glx.c
@@ -36,6 +36,14 @@
 static void
 glamor_glx_make_current(struct glamor_context *glamor_ctx)
 {
+    /* There's only a single global dispatch table in Mesa.  EGL, GLX,
+     * and AIGLX's direct dispatch table manipulation don't talk to
+     * each other.  We need to set the context to NULL first to avoid
+     * GLX's no-op context change fast path when switching back to
+     * GLX.
+     */
+    glXMakeCurrent(glamor_ctx->display, None, None);
+
     glXMakeCurrent(glamor_ctx->display, glamor_ctx->drawable_xid,
                    glamor_ctx->ctx);
 }
-- 
1.9.2



More information about the xorg-devel mailing list