From 374f6d568f6c9f7f790fd93d40eaaff7e3c93a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 10 Jun 2020 11:43:49 -0400 Subject: [PATCH] ac/surface: don't set is_displayable if displayable DCC is missing If flags.display isn't set, then displayable DCC will not be computed, so is_displayable will always be false. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_surface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 0e9604affef..4ef72b1b323 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1932,9 +1932,12 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib, /* Display needs unaligned DCC. */ if (surf->num_dcc_levels && - !is_dcc_supported_by_DCN(info, config, surf, - surf->u.gfx9.dcc.rb_aligned, - surf->u.gfx9.dcc.pipe_aligned)) + (!is_dcc_supported_by_DCN(info, config, surf, + surf->u.gfx9.dcc.rb_aligned, + surf->u.gfx9.dcc.pipe_aligned) || + /* Don't set is_displayable if displayable DCC is missing. */ + (info->use_display_dcc_with_retile_blit && + !surf->u.gfx9.dcc_retile_num_elements))) displayable = false; } surf->is_displayable = displayable;