Bug 107786

Summary: [DXVK] MSAA reflections are broken in GTA V
Product: Mesa Reporter: Clément Guérin <libcg>
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: bas, gr.muench, samuel.pitoiset
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Screenshot
Dual-paraboloid map, MSAA off
Dual-paraboloid map, MSAA on

Description Clément Guérin 2018-09-03 05:35:19 UTC
Created attachment 141419 [details]
Screenshot

In GTA V, setting "Reflection MSAA" setting to X2, X4 or X8 results in broken reflections, with the top of the car reflecting the ground (see attachment).

Info:
- DXVK 0.70
- wine-staging 3.14
- mesa-git c1ba33c34b
- llvm-svn 341191
Comment 1 Clément Guérin 2018-09-03 05:47:39 UTC
Here's an renderdoc capture: https://mega.nz/#!WK5HlAKQ!g77NnAuH_XmeR20i2IXjTUSG2NDDiFy86b6cqVU8ACI

The game creates an environment cubemap in Colour Pass #3. Each face of the cube is rendered to a single texture, then copied to a cubemap. When MSAA is disabled, vkCmdCopyImage is used and works fine. When MSAA is enabled, vkCmdResolveImage is used but it doesn't seem to take into account `dstSubresource->baseArrayLayer`, resulting in each texture being copied to the X+ face of the cubemap (layer 0), generating a corrupted cubemap.
Comment 2 Clément Guérin 2018-09-03 05:48:37 UTC
Created attachment 141420 [details]
Dual-paraboloid map, MSAA off
Comment 3 Clément Guérin 2018-09-03 05:49:53 UTC
Created attachment 141421 [details]
Dual-paraboloid map, MSAA on

Dual-paraboloid map generated in Colour Pass #4. See http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study/
Comment 4 Gregor Münch 2018-09-20 08:57:00 UTC
I have the same issue, according to Mr.Rebohle, with DIRT3 Complete Edition.
https://github.com/doitsujin/dxvk/issues/652 (see there for some more comparison screenshots)

Adding usual suspects to CC.
Comment 5 Samuel Pitoiset 2018-09-21 08:36:05 UTC
Can you upload a renderdoc capture when MSAA is off and CmdCopyImage() used please?
Comment 6 Samuel Pitoiset 2018-09-21 09:35:59 UTC
This should fix the rendering problem when MSAA is on https://patchwork.freedesktop.org/patch/251674/

I can't confirm for DIRT3 because I don't have the game.
Comment 7 Gregor Münch 2018-09-21 11:14:11 UTC
I can confirm this patch fixes the issue with Dirt3. Cant test GTA V.
MSAA is still very slow though, while it has just a small impact on Windows.

Thank you very much for the fix!
Tested-by: Gregor Münch <gr.muench_at_gmail.com>

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.