ac/surface: set SCANOUT if surf->is_displayable

Fixes: ba10fb3f7f ("radeonsi: preserve the scanout flag for shared resources on gfx9 and gfx10")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-05-26 09:53:27 +02:00 committed by Marge Bot
parent 10f07495f6
commit e9826a1bb2

View file

@ -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))) {