summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-03-19 13:44:10 -0400
committerAdam Jackson <ajax@redhat.com>2016-03-30 10:47:56 -0400
commitb2ef7df476af619903ef7f6b6962b371ae14306c (patch)
treecee797241ef25f85c97a5581669496279c8133dd
parentf95645c6f70019316f8ad77b7beb84530fc0505f (diff)
xquartz/glx: Error out for MakeContextCurrent(draw != read)
CGL doesn't have a way to express this directly, unlike EGL WGL and GLX. It might be implementable, but it's never actually worked, and it's a fairly niche feature so we're better off throwing an error if someone attempts it. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xquartz/GL/indirect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 4f3e2e472..544cb780c 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -387,6 +387,9 @@ __glXAquaContextMakeCurrent(__GLXcontext *baseContext)
GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%p)\n", baseContext);
+ if (context->base.drawPriv != context->base.readPriv)
+ return 0;
+
if (attach(context, drawPriv))
return /*error*/ 0;