ac/surface: expose all 64K_R_X and 256K_R_X modifiers on gfx11
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17410>
This commit is contained in:
@@ -405,8 +405,15 @@ bool ac_get_supported_modifiers(const struct radeon_info *info,
|
||||
unsigned num_pipes = 1 << pipe_xor_bits;
|
||||
|
||||
/* R_X swizzle modes are the best for rendering and DCC requires them. */
|
||||
unsigned swizzle_r_x = num_pipes > 16 ? AMD_FMT_MOD_TILE_GFX11_256K_R_X :
|
||||
AMD_FMT_MOD_TILE_GFX9_64K_R_X;
|
||||
for (unsigned i = 0; i < 2; i++) {
|
||||
unsigned swizzle_r_x;
|
||||
|
||||
/* Insert the best one first. */
|
||||
if (num_pipes > 16)
|
||||
swizzle_r_x = !i ? AMD_FMT_MOD_TILE_GFX11_256K_R_X : AMD_FMT_MOD_TILE_GFX9_64K_R_X;
|
||||
else
|
||||
swizzle_r_x = !i ? AMD_FMT_MOD_TILE_GFX9_64K_R_X : AMD_FMT_MOD_TILE_GFX11_256K_R_X;
|
||||
|
||||
uint64_t modifier_r_x = AMD_FMT_MOD |
|
||||
AMD_FMT_MOD_SET(TILE_VERSION, AMD_FMT_MOD_TILE_VER_GFX11) |
|
||||
AMD_FMT_MOD_SET(TILE, swizzle_r_x) |
|
||||
@@ -447,6 +454,7 @@ bool ac_get_supported_modifiers(const struct radeon_info *info,
|
||||
|
||||
/* Add one without DCC that is displayable (it's also optimal for non-displayable cases). */
|
||||
ADD_MOD(modifier_r_x)
|
||||
}
|
||||
|
||||
/* Add one that is compatible with other gfx11 chips. */
|
||||
ADD_MOD(AMD_FMT_MOD |
|
||||
|
Reference in New Issue
Block a user