From f741c1eed4559329a89fbf8da569889bbcdace26 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Sat, 3 Oct 2009 18:01:58 +0200 Subject: swrast: Move up state validation in _swrast_ReadPixels. This ensures the driver won't map the wrong set of textures. --- src/mesa/swrast/s_readpix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 48b9408d24..a1aeb2e01f 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -555,15 +555,15 @@ _swrast_ReadPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_pixelstore_attrib clippedPacking = *packing; + if (ctx->NewState) + _mesa_update_state(ctx); + /* Need to do swrast_render_start() before clipping or anything else * since this is where a driver may grab the hw lock and get an updated * window size. */ swrast_render_start(ctx); - if (ctx->NewState) - _mesa_update_state(ctx); - if (swrast->NewState) _swrast_validate_derived( ctx ); -- cgit v1.2.3