[Mesa-dev] [PATCH 1.5/2] ac/surface/gfx9: let addrlib choose the preferred swizzle kind

Gustaw Smolarczyk wielkiegie at gmail.com
Wed Nov 21 15:58:49 UTC 2018


śr., 21 lis 2018 o 16:21 Nicolai Hähnle <nhaehnle at gmail.com> napisał(a):
>
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Our choices here are simply redundant as long as sin.flags is set
> correctly.
> --
> This is the change I was talking about.
> ---
>  src/amd/common/ac_surface.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
> index edd710a968c..ad2cb585c9d 100644
> --- a/src/amd/common/ac_surface.c
> +++ b/src/amd/common/ac_surface.c
> @@ -1057,30 +1057,20 @@ gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib,
>         sin.forbiddenBlock.var = 1; /* don't allow the variable-sized swizzle modes */
>         sin.forbiddenBlock.linear = 1; /* don't allow linear swizzle modes */
>         sin.bpp = in->bpp;
>         sin.width = in->width;
>         sin.height = in->height;
>         sin.numSlices = in->numSlices;
>         sin.numMipLevels = in->numMipLevels;
>         sin.numSamples = in->numSamples;
>         sin.numFrags = in->numFrags;
>
> -       if (flags & RADEON_SURF_SCANOUT) {

Isn't the `flags' function argument now unused?

Regards,
Gustaw Smolarczyk

> -               sin.preferredSwSet.sw_D = 1;
> -               /* 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;
> -
>         if (is_fmask) {
>                 sin.flags.display = 0;
>                 sin.flags.color = 0;
>                 sin.flags.fmask = 1;
>         }
>
>         ret = Addr2GetPreferredSurfaceSetting(addrlib, &sin, &sout);
>         if (ret != ADDR_OK)
>                 return ret;
>
> --
> 2.19.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list