Merge branch '7.8' into master
[mesa.git] / src / mesa / state_tracker / st_cb_readpixels.c
index 080a5f9bfb832ee457bc64b2e706d4927abe548e..7afb275fe2fa11fc96108b1bebbda9f77d704788 100644 (file)
@@ -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"
@@ -350,6 +351,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 */