summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2011-03-23 21:58:06 +0100
committerHenri Verbeet <[email protected]>2011-03-27 15:01:59 +0200
commit5d7c27f5ec2f30c264dc2d53c4980970b3a13ee5 (patch)
tree15e84833defb7e49486a63c9bdf1caae543cfabd /src/mesa/state_tracker
parent244a3bbf14ef4f739e7f3be298c8613a2667fce0 (diff)
st/mesa: Validate state before doing blits.
Specifically, this ensures things like the front buffer actually exist. This fixes piglt fbo/fbo-sys-blit and fd.o bug 35483. Signed-off-by: Henri Verbeet <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index 6d02a7dccd4..25c95c7b9dc 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -39,6 +39,7 @@
#include "st_texture.h"
#include "st_cb_blit.h"
#include "st_cb_fbo.h"
+#include "st_atom.h"
#include "util/u_blit.h"
@@ -75,6 +76,8 @@ st_BlitFramebuffer(struct gl_context *ctx,
struct gl_framebuffer *readFB = ctx->ReadBuffer;
struct gl_framebuffer *drawFB = ctx->DrawBuffer;
+ st_validate_state(st);
+
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
&dstX0, &dstY0, &dstX1, &dstY1)) {
return; /* nothing to draw/blit */