Bug 110349 - radv: Dragon Quest XI (DXVK) has a graphical glitch (regression, bisected)
Summary: radv: Dragon Quest XI (DXVK) has a graphical glitch (regression, bisected)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-08 02:38 UTC by Andrew Sheldon
Modified: 2019-04-08 19:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Dragon Quest XI DXVK renderdoc (386.33 MB, application/x-7z-compressed)
2019-04-08 09:06 UTC, Andrew Sheldon
Details

Description Andrew Sheldon 2019-04-08 02:38:38 UTC
When running Dragon Quest XI with DXVK, a graphical glitch can be seen. The glitch tends to flicker in and out from a distance, but once you get closer, it remains static. I've only tested it at one location, so I can't say if it appears elsewhere. Here's a screenshot: https://imgur.com/a/v7RnxE9

The first bad commit is a66b186bebf9b63897199b9b6e26d40977417f74:

Author: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date:   Tue Feb 26 13:42:28 2019 +0100

    radv: use typed buffer loads for vertex input fetches
    
    This drastically reduces the number of SGPRs because the driver
    now uses descriptors per vertex binding, instead of per vertex
    attribute format.
    
    29077 shaders in 15096 tests
    Totals:
    SGPRS: 1354285 -> 1282109 (-5.33 %)
    VGPRS: 909896 -> 908800 (-0.12 %)
    Spilled SGPRs: 24840 -> 24811 (-0.12 %)
    Code Size: 49221144 -> 48986628 (-0.48 %) bytes
    Max Waves: 243930 -> 244229 (0.12 %)
    
    Totals from affected shaders:
    SGPRS: 390648 -> 318472 (-18.48 %)
    VGPRS: 288432 -> 287336 (-0.38 %)
    Spilled SGPRs: 94 -> 65 (-30.85 %)
    Code Size: 11548412 -> 11313896 (-2.03 %) bytes
    Max Waves: 86460 -> 86759 (0.35 %)
    
    This gives a really tiny boost.
    
    Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

Reverting the commit fixes the glitch. The glitch also doesn't exist when using AMDVLK.
Comment 1 Samuel Pitoiset 2019-04-08 06:52:22 UTC
Do you have the following commit in your build ?

ommit d5befdbe4ad4523e58074063a3b619f389fb9f1f
Author: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date:   Fri Mar 15 10:36:00 2019 +0100

    radv: always load 3 channels for formats that need to be shuffled
    
    This fixes a rendering issue with Hellblade and DXVK.
    
    Fixes: a66b186bebf ("radv: use typed buffer loads for vertex input fetches")
    Reported-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
    Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

If the problem still happens with that, can you record a renderdoc capture please?
Comment 2 Andrew Sheldon 2019-04-08 09:06:58 UTC
Created attachment 143891 [details]
Dragon Quest XI DXVK renderdoc
Comment 3 Andrew Sheldon 2019-04-08 09:08:58 UTC
Added a renderdoc for the game. And yes, it affects up to current master (4209a27c61ee4bda2efb63e080bde01545edb2b5).
Comment 4 Andrew Sheldon 2019-04-08 09:17:24 UTC
I should note that I used a version of Mesa with the test patch in #110348 (which I thought might be related), which I forgot to remove. If this is likely to affect the trace I'll upload a new one (the bug is still evident with or without the patch).
Comment 5 Samuel Pitoiset 2019-04-08 12:09:30 UTC
Can you apply this https://patchwork.freedesktop.org/patch/297237/?series=59168&rev=1 ?
Comment 6 Andrew Sheldon 2019-04-08 13:31:36 UTC
(In reply to Samuel Pitoiset from comment #5)
> Can you apply this
> https://patchwork.freedesktop.org/patch/297237/?series=59168&rev=1 ?

The patch fixes the issue, thanks.
Comment 7 Samuel Pitoiset 2019-04-08 19:16:30 UTC
Should be fixed by https://cgit.freedesktop.org/mesa/mesa/commit/?id=775191cd99a772acda37f41790ff09b93c7a00ba

Thanks for reporting this!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.