freedreno: scissor fix 25/6725/1
authorRob Clark <robclark@freedesktop.org>
Wed, 15 May 2013 00:05:55 +0000 (20:05 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 23 May 2013 18:35:21 +0000 (14:35 -0400)
Don't assume the state-tracker will set the scissor after the
framebuffer state is changed.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_state.c

index dcac624..ce9a522 100644 (file)
@@ -135,6 +135,17 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
        pipe_surface_reference(&cso->zsbuf, framebuffer->zsbuf);
 
        ctx->dirty |= FD_DIRTY_FRAMEBUFFER;
+
+       /* also need to reset the scissor.. mesa/gl state tracker
+        * does this for us, but u_blitter doesn't and other
+        * state trackers might not..
+        */
+       ctx->scissor.minx = 0;
+       ctx->scissor.miny = 0;
+       ctx->scissor.maxx = cso->width;
+       ctx->scissor.maxy = cso->height;
+
+       ctx->dirty |= FD_DIRTY_SCISSOR;
 }
 
 static void