glamor: Move a make_current before the first GL call entrypoint.

Fixes a usage of the wrong context with swrast GLX's GetImage entrypoint.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Eric Anholt 2014-04-17 18:50:13 -07:00
parent 707726b155
commit f6abfece3e

View File

@ -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) {