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

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Nov 21 20:36:02 UTC 2018


On Wed, Nov 21, 2018 at 9:33 PM Marek Olšák <maraeo at gmail.com> wrote:
>
> See what Gustaw said. Other than that:
>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>

With that change:

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

>
> Marek
>
> On Wed, Nov 21, 2018 at 10:21 AM Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>>
>> 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) {
>> -               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
>
> _______________________________________________
> 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