Mesa (7.9): st/mesa: Validate state before doing blits.

Marek Olšák mareko at kemper.freedesktop.org
Tue Mar 29 22:55:27 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 6b46754bc050766afe5c3d8d02b5510d61efd360
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b46754bc050766afe5c3d8d02b5510d61efd360

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Wed Mar 23 21:58:06 2011 +0100

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 <hverbeet at gmail.com>
(cherry picked from commit 5d7c27f5ec2f30c264dc2d53c4980970b3a13ee5)

---

 src/mesa/state_tracker/st_cb_blit.c |    3 +++
 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 5367484..b464099 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -38,6 +38,7 @@
 #include "st_texture.h"
 #include "st_cb_blit.h"
 #include "st_cb_fbo.h"
+#include "st_atom.h"
 
 #include "util/u_blit.h"
 #include "util/u_inlines.h"
@@ -75,6 +76,8 @@ st_BlitFramebuffer(GLcontext *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 */




More information about the mesa-commit mailing list