diff options
author | Michel Dänzer <[email protected]> | 2009-10-03 18:01:58 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-10-03 18:01:58 +0200 |
commit | f741c1eed4559329a89fbf8da569889bbcdace26 (patch) | |
tree | 786a22974e89c9d2cb2d2135e421de92d68be1b8 /src | |
parent | 4a6759b7789dc703a8ee9f1cf08af22c6e8101fb (diff) |
swrast: Move up state validation in _swrast_ReadPixels.
This ensures the driver won't map the wrong set of textures.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 48b9408d242..a1aeb2e01fb 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 ); |