ac/surface: limit tile swizzle to non-mipmaps on SI
authorMarek Olšák <marek.olsak@amd.com>
Mon, 31 Jul 2017 22:12:30 +0000 (00:12 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 4 Aug 2017 00:10:04 +0000 (02:10 +0200)
Mipmapping with tile swizzle doesn't work.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_surface.c

index 87a89936e1c01fe26b2befafdfd64501cc7ba4c5..3716d3ddb04681f3a67595915fc0d02d0c7fbda9 100644 (file)
@@ -435,7 +435,9 @@ static int gfx6_surface_settings(ADDR_HANDLE addrlib,
        }
 
        /* Compute tile swizzle. */
-       if (config->info.surf_index &&
+       /* TODO: fix tile swizzle with mipmapping for SI */
+       if ((info->chip_class >= CIK || config->info.levels == 1) &&
+           config->info.surf_index &&
            surf->u.legacy.level[0].mode == RADEON_SURF_MODE_2D &&
            !(surf->flags & (RADEON_SURF_Z_OR_SBUFFER | RADEON_SURF_SHAREABLE)) &&
            (config->info.samples > 1 || !(surf->flags & RADEON_SURF_SCANOUT))) {