[Mesa-dev] [PATCH] ac/surface: Allow S swizzle for displayable surfaces.

Marek Olšák maraeo at gmail.com
Thu Apr 12 01:36:33 UTC 2018


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Apr 10, 2018 at 8:10 PM, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:

> For dcn1 && < 64 bpp displayable surfaces, addrlib only accepts
> S swizzles.
>
> At the same time addrlib prefers D swizzles is allowed, so we can
> just allow S swizzles as fallback.
>
> Fixes: b64b712558 "ac/surface/gfx9: request desired micro tile mode
> explicitly"
> ---
>  src/amd/common/ac_surface.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
> index 1b4d72e31b..7558dd91e3 100644
> --- a/src/amd/common/ac_surface.c
> +++ b/src/amd/common/ac_surface.c
> @@ -865,9 +865,12 @@ gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib,
>         sin.numSamples = in->numSamples;
>         sin.numFrags = in->numFrags;
>
> -       if (flags & RADEON_SURF_SCANOUT)
> +       if (flags & RADEON_SURF_SCANOUT) {
>                 sin.preferredSwSet.sw_D = 1;
> -       else if (in->flags.depth || in->flags.stencil || is_fmask)
> +               /* Raven only allows S for displayable surfaces with < 64
> bpp, so
> +                * allow it as fallback */
> +               sin.preferredSwSet.sw_S = 1;
> +       } else if (in->flags.depth || in->flags.stencil || is_fmask)
>                 sin.preferredSwSet.sw_Z = 1;
>         else
>                 sin.preferredSwSet.sw_S = 1;
> --
> 2.17.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180411/5b9715e6/attachment.html>


More information about the mesa-dev mailing list