diff options
author | Chia-I Wu <[email protected]> | 2010-03-13 20:30:03 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-03-13 20:34:45 +0800 |
commit | 8c210c1b3b5e63eebae2b73814d2000520576ce7 (patch) | |
tree | f9b23a1843fd41bf17f690996a2712f317560907 /src/mesa/state_tracker | |
parent | 66cd38f465499863de106e1ae83b5de85072c29b (diff) |
st/mesa: Validate the state in st_readpixels.
The front renderbuffer of a framebuffer is usually added as needed when
glReadBuffer(GL_FRONT) is called. When the call is followed by
glReadPixels, we should validate the state before reading from the
renderbuffer.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_readpixels.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 8cc9cfac76f..f0a02ab7664 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -45,6 +45,7 @@ #include "st_debug.h" #include "st_context.h" +#include "st_atom.h" #include "st_cb_readpixels.h" #include "st_cb_fbo.h" #include "st_public.h" @@ -352,6 +353,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, /* XXX convolution not done yet */ assert((transferOps & IMAGE_CONVOLUTION_BIT) == 0); + st_validate_state(ctx->st); + /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { /* The ReadPixels transfer is totally outside the window bounds */ |