[Mesa-dev] [PATCH] radv: fix MSAA on SI gpus.

Dave Airlie airlied at gmail.com
Mon Aug 7 07:14:49 UTC 2017


On 7 August 2017 at 17:05, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> On Mon, Aug 7, 2017 at 8:42 AM, Dave Airlie <airlied at gmail.com> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> This ports the workaround from radeonsi, that was missing in radv.
>>
>> This fixes Talos rendering when MSAA is enabled on my Tahiti card.
>>
>> Fixes: f4e499ec7 (radv: add initial non-conformant radv vulkan driver)
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>>  src/amd/vulkan/radv_device.c | 10 +++++++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
>> index e5bedf3..85ba165 100644
>> --- a/src/amd/vulkan/radv_device.c
>> +++ b/src/amd/vulkan/radv_device.c
>> @@ -3089,9 +3089,13 @@ radv_initialise_color_surface(struct radv_device *device,
>>                                     format != V_028C70_COLOR_24_8) |
>>                 S_028C70_NUMBER_TYPE(ntype) |
>>                 S_028C70_ENDIAN(endian);
>> -       if (iview->image->info.samples > 1)
>> -               if (iview->image->fmask.size)
>> -                       cb->cb_color_info |= S_028C70_COMPRESSION(1);
>> +       if ((iview->image->info.samples > 1) && iview->image->fmask.size) {
>> +               cb->cb_color_info |= S_028C70_COMPRESSION(1);
>> +               if (device->physical_device->rad_info.chip_class == SI) {
>> +                       unsigned fmask_bankh = util_logbase2(iview->image->fmask.bank_height);
>> +                       cb->cb_color_attrib |= S_028C74_FMASK_BANK_HEIGHT(fmask_bankh);
>
> only set it for SI? AFAICS this code is not SI only, but the radeonsi
> workaround is.
>

Not sure I follow, the code in radeonsi is SI only, this code is
chip_class == SI as well
this a bit different as I moved the fmask_bankh calc inside the
conditional just because
it isn't used outside it.

Unless I'm being blind!
Dave.

> With that fixed:
>
> Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>> +               }
>> +       }
>>
>>         if (iview->image->cmask.size &&
>>             !(device->debug_flags & RADV_DEBUG_NO_FAST_CLEARS))
>> --
>> 2.9.4
>>
>> _______________________________________________
>> 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