ac/surface: Set compressZ for stencil-only surfaces.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 18 Jun 2018 14:29:16 +0000 (16:29 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 19 Jun 2018 00:52:01 +0000 (02:52 +0200)
We HTILE compress stencil-only surfaces too.

CC: 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_surface.c

index 6600ff6b7efeb48f6bd183fcae13bdfc5e7b96ff..618b755afc775800d773cffbe9f9061529316052 100644 (file)
@@ -670,7 +670,7 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib,
                 config->info.levels == 1);
 
        AddrSurfInfoIn.flags.noStencil = (surf->flags & RADEON_SURF_SBUFFER) == 0;
-       AddrSurfInfoIn.flags.compressZ = AddrSurfInfoIn.flags.depth;
+       AddrSurfInfoIn.flags.compressZ = !!(surf->flags & RADEON_SURF_Z_OR_SBUFFER);
 
        /* On CI/VI, the DB uses the same pitch and tile mode (except tilesplit)
         * for Z and stencil. This can cause a number of problems which we work