From: Pierre-Eric Pelloux-Prayer Date: Tue, 26 May 2020 07:53:27 +0000 (+0200) Subject: ac/surface: set SCANOUT if surf->is_displayable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9826a1bb2fd156479c62e915d3cab567876061f;p=mesa.git ac/surface: set SCANOUT if surf->is_displayable Fixes: ba10fb3f7f4 ("radeonsi: preserve the scanout flag for shared resources on gfx9 and gfx10") Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 1e4d1ff942a..54bf476a213 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1906,6 +1906,9 @@ int ac_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *info, surf->alignment = MAX2(surf->alignment, surf->cmask_alignment); } + if (surf->is_displayable) + surf->flags |= RADEON_SURF_SCANOUT; + if (surf->dcc_size && /* dcc_size is computed on GFX9+ only if it's displayable. */ (info->chip_class >= GFX9 || !get_display_flag(config, surf))) {