broadcom/vc4: Scissor blits performed using the rendering engine.
authorEric Anholt <eric@anholt.net>
Mon, 24 Jul 2017 21:45:49 +0000 (14:45 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 25 Jul 2017 21:44:52 +0000 (14:44 -0700)
Without this, a BlitFramebuffer would mark the whole framebuffer as being
changed (so we emit loads/stores of all of it) rather than just the
modified subset.

src/gallium/drivers/vc4/vc4_blit.c

index 0e4ab5bfa0cbef3209bbeb35114c70685e0c6112..7f4c76968e775920a1f37d2ed59693fd11d1be77 100644 (file)
@@ -195,6 +195,15 @@ vc4_render_blit(struct pipe_context *ctx, struct pipe_blit_info *info)
                 return false;
         }
 
+        /* Enable the scissor, so we get a minimal set of tiles rendered. */
+        if (!info->scissor_enable) {
+                info->scissor_enable = true;
+                info->scissor.minx = info->dst.box.x;
+                info->scissor.miny = info->dst.box.y;
+                info->scissor.maxx = info->dst.box.x + info->dst.box.width;
+                info->scissor.maxy = info->dst.box.y + info->dst.box.height;
+        }
+
         vc4_blitter_save(vc4);
         util_blitter_blit(vc4->blitter, info);