vc4: Don't forget to do initial tile clearing for depth/stencil.
authorEric Anholt <eric@anholt.net>
Fri, 5 Sep 2014 20:16:25 +0000 (13:16 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 9 Sep 2014 14:29:16 +0000 (07:29 -0700)
src/gallium/drivers/vc4/vc4_context.c

index 91ff7d784e92e51ccf7a87c5673c2404b76cc260..17a65452c80d3b1d9e7941423d4121d408ad8900 100644 (file)
@@ -75,8 +75,13 @@ vc4_setup_rcl(struct vc4_context *vc4)
          * stored.  If the clear values changed between frames, then the tile
          * buffer has stale clear values in it, so we have to do a store in
          * None mode (no writes) so that we trigger the tile buffer clear.
+         *
+         * Excess clearing is only a performance cost, since per-tile contents
+         * will be loaded/stored in the loop below.
          */
-        if (vc4->cleared & PIPE_CLEAR_COLOR0) {
+        if (vc4->cleared & (PIPE_CLEAR_COLOR0 |
+                            PIPE_CLEAR_DEPTH |
+                            PIPE_CLEAR_STENCIL)) {
                 cl_u8(&vc4->rcl, VC4_PACKET_TILE_COORDINATES);
                 cl_u8(&vc4->rcl, 0);
                 cl_u8(&vc4->rcl, 0);