ac/surface: don't forbid 256KB swizzle modes on smaller gfx11 chips
authorMarek Olšák <marek.olsak@amd.com>
Mon, 11 Jul 2022 03:33:42 +0000 (23:33 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 3 Aug 2022 00:57:16 +0000 (00:57 +0000)
let addrlib make the right choice

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17864>

src/amd/common/ac_surface.c

index 26cd8c9..0f6d1b2 100644 (file)
@@ -1432,14 +1432,8 @@ static int gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib, const struct rad
    /* TODO: We could allow some of these: */
    sin.forbiddenBlock.micro = 1; /* don't allow the 256B swizzle modes */
 
-   if (info->gfx_level >= GFX11) {
-      if ((1 << G_0098F8_NUM_PIPES(info->gb_addr_config)) <= 16) {
-         sin.forbiddenBlock.gfx11.thin256KB = 1;
-         sin.forbiddenBlock.gfx11.thick256KB = 1;
-      }
-   } else {
+   if (info->gfx_level < GFX11)
       sin.forbiddenBlock.var = 1;   /* don't allow the variable-sized swizzle modes */
-   }
 
    sin.bpp = in->bpp;
    sin.width = in->width;