From f6abfece3e59fa8c2e14a61430133816837855f8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 17 Apr 2014 18:50:13 -0700 Subject: [PATCH] glamor: Move a make_current before the first GL call entrypoint. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a usage of the wrong context with swrast GLX's GetImage entrypoint. Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson --- glamor/glamor_pixmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index 371e486b5..54b414bc2 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -1217,6 +1217,7 @@ _glamor_download_sub_pixmap_to_cpu(PixmapPtr pixmap, GLenum format, assert(0); } + glamor_make_current(glamor_priv); glamor_set_destination_pixmap_priv_nc(pixmap_priv); need_post_conversion = (revert > REVERT_NORMAL); @@ -1249,7 +1250,6 @@ _glamor_download_sub_pixmap_to_cpu(PixmapPtr pixmap, GLenum format, fbo_y_off = 0; } - glamor_make_current(glamor_priv); glPixelStorei(GL_PACK_ALIGNMENT, 4); if (glamor_priv->has_pack_invert || glamor_priv->yInverted) {