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-23 10:32:32 -0700
commit707726b155a2a086d12e0a6abef7f1e59def5370 (patch)
tree727c3f8f23e9b9753c1382746b71d2fe6fa7378d
parent482b06a95a0a2c9a58bc196eb3dd928d796853df (diff)
glamor: Do the same MakeCurrent(None) for GLX as we do for EGL.
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-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);
}