From: Marek Olšák Date: Wed, 10 Jun 2020 15:43:49 +0000 (-0400) Subject: ac/surface: don't set is_displayable if displayable DCC is missing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=374f6d568f6c9f7f790fd93d40eaaff7e3c93a9e;p=mesa.git 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: --- 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;