[PATCH 02/27] glamor: Drop the set of the context to NULL at the end of glamor ops.

Eric Anholt eric at anholt.net
Tue Mar 11 14:30:16 PDT 2014


The theory here was that it (which I copied from EGL) existed to fix
up context switching with indirect GLX.  But indirect GLX won't even
try to set the context again unless its lastContext field is cleared,
so we need to solve this a different way.

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

diff --git a/glamor/glamor_glx.c b/glamor/glamor_glx.c
index 311bf75..8f47c3d 100644
--- a/glamor/glamor_glx.c
+++ b/glamor/glamor_glx.c
@@ -53,13 +53,7 @@ glamor_glx_get_context(struct glamor_context *glamor_ctx)
 static void
 glamor_glx_put_context(struct glamor_context *glamor_ctx)
 {
-    if (--glamor_ctx->get_count)
-        return;
-
-    /* We actually reset the context, so that indirect GLX's EGL usage
-     * won't get confused by ours.
-     */
-    glXMakeCurrent(glamor_ctx->display, None, NULL);
+    --glamor_ctx->get_count;
 }
 
 Bool
-- 
1.9.0



More information about the xorg-devel mailing list