freedreno/a6xx: Fix set_blit_scissor helper
authorKristian H. Kristensen <hoegsberg@chromium.org>
Wed, 17 Oct 2018 21:18:56 +0000 (14:18 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 26 Oct 2018 22:10:00 +0000 (18:10 -0400)
The scissor maxx/maxy are non-inclusive, so don't subtract one from
framebuffer width and height.

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c

index 7eb23ed..94991df 100644 (file)
@@ -591,8 +591,8 @@ set_blit_scissor(struct fd_batch *batch)
 
        blit_scissor.minx = batch->max_scissor.minx;
        blit_scissor.miny = batch->max_scissor.miny;
-       blit_scissor.maxx = MIN2(pfb->width - 1, batch->max_scissor.maxx);
-       blit_scissor.maxy = MIN2(pfb->height - 1, batch->max_scissor.maxy);
+       blit_scissor.maxx = MIN2(pfb->width, batch->max_scissor.maxx);
+       blit_scissor.maxy = MIN2(pfb->height, batch->max_scissor.maxy);
 
        OUT_PKT4(ring, REG_A6XX_RB_BLIT_SCISSOR_TL, 2);
        OUT_RING(ring,