[PATCH xserver 04/13] xquartz/glx: Error out for MakeContextCurrent(draw != read)

Adam Jackson ajax at redhat.com
Wed Mar 23 22:46:46 UTC 2016


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: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xquartz/GL/indirect.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 4f3e2e4..544cb78 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;
 
-- 
2.5.0



More information about the xorg-devel mailing list