freedreno/a3xx/compiler: refactor trans_samp()
[mesa.git] / src / gallium / drivers / freedreno / freedreno_state.c
index 10031977e61f304620b4e0e76c2924ffad755a2c..93fbc3525eca561125d0bbb57da30c7d768fda64 100644 (file)
@@ -120,7 +120,7 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
        unsigned i;
 
        DBG("%d: cbufs[0]=%p, zsbuf=%p", ctx->needs_flush,
-                       cso->cbufs[0], cso->zsbuf);
+                       framebuffer->cbufs[0], framebuffer->zsbuf);
 
        fd_context_render(pctx);
 
@@ -130,6 +130,11 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
                pipe_surface_reference(&cso->cbufs[i], NULL);
 
        cso->nr_cbufs = framebuffer->nr_cbufs;
+
+       if ((cso->width != framebuffer->width) ||
+                       (cso->height != framebuffer->height))
+               ctx->needs_rb_fbd = true;
+
        cso->width = framebuffer->width;
        cso->height = framebuffer->height;
 
@@ -137,14 +142,10 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
 
        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->disabled_scissor.minx = 0;
+       ctx->disabled_scissor.miny = 0;
+       ctx->disabled_scissor.maxx = cso->width;
+       ctx->disabled_scissor.maxy = cso->height;
 
        ctx->dirty |= FD_DIRTY_SCISSOR;
 }