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 <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5424>
This commit is contained in:
Marek Olšák 2020-06-10 11:43:49 -04:00 committed by Marge Bot
parent 0fcf55329b
commit 374f6d568f
1 changed files with 6 additions and 3 deletions

View File

@ -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;