ac/surface: set SCANOUT if surf->is_displayable
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 26 May 2020 07:53:27 +0000 (09:53 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Jun 2020 09:11:23 +0000 (09:11 +0000)
Fixes: ba10fb3f7f4 ("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>

src/amd/common/ac_surface.c

index 1e4d1ff942a26adb58335d1e440bd7f9956bc965..54bf476a2134fa5a5c8aa4edb40810ff89bfbcae 100644 (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))) {