Bug 109394

Summary: dark lines visual corruption in ground texture with Heroes of the Storm DXVK [supposedly LLVM bug]
Product: Mesa Reporter: tempel.julian
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: renderdoc capture part 1
renderdoc capture part 2
renderdoc capture part 3
renderdoc capture part 4

Description tempel.julian 2019-01-19 19:17:24 UTC
Originally reported on DXVK tracker:
https://github.com/doitsujin/dxvk/issues/777

Picture showing the corruption:
https://abload.de/img/screenshot_20181121_1a3efo.png

There are undesired dark lines visible in the ground texture around objects like bigger buildings.
They are visible with radv and amdvlk (open), but not with amdvlk (proprietary), and of course neither native DX11 on Windows.

Issue is not new, it probably has always existed or at least for quite some time now. Happens with LLVM 7/8 and Mesa 18.3/19.

I've created a renderdoc capture which I'm going to upload right now.
Comment 1 tempel.julian 2019-01-19 19:20:35 UTC
Created attachment 143162 [details]
renderdoc capture part 1
Comment 2 tempel.julian 2019-01-19 19:22:51 UTC
Created attachment 143163 [details]
renderdoc capture part 2
Comment 3 tempel.julian 2019-01-19 19:26:52 UTC
Created attachment 143164 [details]
renderdoc capture part 3
Comment 4 tempel.julian 2019-01-19 19:31:24 UTC
Created attachment 143166 [details]
renderdoc capture part 4
Comment 5 tempel.julian 2019-02-09 12:16:24 UTC
I also reported it to amdvlk developers:
https://github.com/GPUOpen-Drivers/AMDVLK/issues/83

But as it has turned out on the DXVK bugtracker, wined3d + radeonsi (OpenGL) shows exactly the same type of corruption.
I suppose this is a clear sign for a LLVM bug?

Would be great if Mesa developers could report it to LLVM. If there are more information required, I'd of course try to provide them.
Comment 6 Rhys Perry 2019-02-09 14:35:20 UTC
I think this is a game bug: it's using implicit derivatives when sampling textures in non-uniform control flow. In the GLSL and SPIR-V spec, the results are undefined. I think it's the same with HLSL.

Since the control flow is non-uniform and (IIRC) LLVM seems to move the operations creating the texture coordinates into it, I think it's causing discontinuities and messing up the LOD calculation.
Comment 7 Adam Jackson 2019-09-18 19:54:46 UTC
Closing per comment #6

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.