radeonsi/gfx10: disable DCC with MSAA
authorMarek Olšák <marek.olsak@amd.com>
Wed, 5 Jun 2019 05:37:01 +0000 (01:37 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jul 2019 19:51:13 +0000 (15:51 -0400)
It was only enabled for 2x MSAA anyway.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/drivers/radeonsi/si_texture.c

index 7b72e51..7bbffe3 100644 (file)
@@ -289,10 +289,15 @@ static int si_init_surface(struct si_screen *sscreen,
                flags |= RADEON_SURF_DISABLE_DCC;
 
        /* GFX9: DCC clear for 4x and 8x MSAA textures unimplemented. */
-       if (sscreen->info.chip_class >= GFX9 &&
+       if (sscreen->info.chip_class == GFX9 &&
            ptex->nr_storage_samples >= 4)
                flags |= RADEON_SURF_DISABLE_DCC;
 
+       /* TODO: GFX10: DCC causes corruption with MSAA. */
+       if (sscreen->info.chip_class >= GFX10 &&
+           ptex->nr_storage_samples >= 2)
+               flags |= RADEON_SURF_DISABLE_DCC;
+
        if (ptex->bind & PIPE_BIND_SCANOUT || is_scanout) {
                /* This should catch bugs in gallium users setting incorrect flags. */
                assert(ptex->nr_samples <= 1 &&