summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-04-04 07:03:46 +0100
committerEric Anholt <eric@anholt.net>2014-04-22 12:29:38 -0700
commita0c5e9af9ee1c796c06d7098bd0c16727a9bb0e4 (patch)
treeff01b17cab7ccb2ae0b1e57c436d50fac4cb82d4
parent024d7555499211a512616fc41a41561f604817db (diff)
glamor: Do the same MakeCurrent(None) for GLX as we do for EGL.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--glamor/glamor_glx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/glamor/glamor_glx.c b/glamor/glamor_glx.c
index db8e66165..7107c7c17 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);
}