In GTA V, setting Shader Quality to anything higher than Normal will result in a LLVM error shortly after starting the game:
LLVM ERROR: Cannot select: 0x7f5af06d35b8: f32 = bitcast 0x7f5af0782ba0
0x7f5af0782ba0: v2i32,ch = CopyFromReg 0x7f5af063d4d8, Register:v2i32 %42
0x7f5af06d4150: v2i32 = Register %42
- DXVK 0.64
- wine-staging 3.12
- mesa-git 471bce5689
- llvm-svn 338485
Forgot to mention that I'm using a R9 Fury.
Can you try to reproduce the crash with RADV_DEBUG=shaders,preoptir and upload the output somewhere?
Created attachment 141244 [details]
GTA 5 RADV_DEBUG log
Here's the log attached as requested.
Can you also try with RADV_DEBUG=checkir and show me the output please?
Actually, I would need the SPIRV too in order to reproduce the problem myself. Can you try with RADV_DEBUG=shaders,preoptir,spirv and attach the output?
You will need spirv-dis in your path. Thanks!
Created attachment 141249 [details]
Created attachment 141250 [details]
Here's the output logs.
Created attachment 141256 [details] [review]
Can you apply this patch? It should fix the LLVM IR error.
Created attachment 141267 [details]
Great. I can confirm that the game no longer crashes at ultra settings with this patch. However, I'm seeing some graphical glitches on smoke, see screenshot attached.
Unfortunately I won't be able to get an apitrace today.
I would prefer a renderdoc capture if you can provide that.
Here's the capture: https://send.firefox.com/download/157438a5ba/#DzGe_CjcHthydTi1jPT-0A
Are you sure the link is correct? "This link has expired or never existed in the first place!"
Let's try again: https://send.firefox.com/download/0a9b6178c5/#mjwYjQDZZbGvFqAKq5fhig
Created attachment 141347 [details] [review]
Does this fix the smoke issue too?
I haven't found the time to test it yet. Is forcing `output_usage_mask` at line 71 intentional?
Yeah, it was just a workaround for a weird issue but I fixed it since. I'm improving the patch for supporting cull distances as well.
Here's the real fix: https://patchwork.freedesktop.org/patch/246462/
Can you confirm that fixes the issue on your side? Thanks!
I confirm it works. I'm able to run the game at Ultra settings without any visible glitches. Thanks for your hard work!
There's another small issue with inverted reflections, it's still unclear if it's a game bug, DXVK bug or driver bug. I'll open up another bug report if necessary.
Fixed with https://cgit.freedesktop.org/mesa/mesa/commit/?id=6f47df312943b05653efc0494551ebf8c3903d43
Feel free to open a new bug report if you think the reflection issue is on the driver side.
Thanks a lot for reporting this!