ac/surface: don't validate DCC settings if DCC isn't possible

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>
(cherry picked from commit dbf602a6b3)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-11-03 15:26:21 +01:00 committed by Eric Engestrom
parent ced465b4e0
commit b99dc621ec
2 changed files with 4 additions and 2 deletions

View file

@ -1714,7 +1714,7 @@
"description": "ac/surface: don't validate DCC settings if DCC isn't possible",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -2303,7 +2303,9 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib, const struct radeon_
!(surf->flags & (RADEON_SURF_DISABLE_DCC | RADEON_SURF_FORCE_SWIZZLE_MODE |
RADEON_SURF_FORCE_MICRO_TILE_MODE)) &&
(surf->modifier == DRM_FORMAT_MOD_INVALID ||
ac_modifier_has_dcc(surf->modifier))) {
ac_modifier_has_dcc(surf->modifier)) &&
is_dcc_supported_by_DCN(info, config, surf, surf->u.gfx9.color.dcc.rb_aligned,
surf->u.gfx9.color.dcc.pipe_aligned)) {
/* Validate that DCC is enabled if DCN can do it. */
if ((info->use_display_dcc_unaligned || info->use_display_dcc_with_retile_blit) &&
AddrSurfInfoIn.flags.display && surf->bpe == 4) {