https://bugs.winehq.org/show_bug.cgi?id=45127
Bug ID: 45127 Summary: Tomb Raider 2013 : Most shaders render blue Product: Wine Version: 3.7 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: directx-d3dx11 Assignee: wine-bugs@winehq.org Reporter: moihack.inside@gmail.com Distribution: ArchLinux
Created attachment 61310 --> https://bugs.winehq.org/attachment.cgi?id=61310 compressed terminal output/error log
I'm talking about the Steam Version of the game.
As you can see in the screenshots here: https://imgur.com/a/EqvnYO3 almost all shaders/textures apart from Lara's hair and the skybox are rendered in blue color.
If the following registry hack: https://pcgamingwiki.com/wiki/Tomb_Raider_(2013)#Force_DirectX_9_renderer_on... is applied, that forces the game to DX9 mode instead of DX11 then the game runs perfect.
The game launches fine even in DX11 mode and you can even try to "blindly" play the game. No crashes or any other issues occur.
Launched via; wine Steam.exe -applaunch 203160 &> lara_tomb.txt
I compressed the terminal output because it came almost 10MB in size.
Using fully updated Arch Linux with Radeon HD6870 GPU and open-source drivers. Also tested for this behavior and occurs on Ubuntu 18.04 LTS as well with wine-stable(3.0) and wine-development(3.6) Ubuntu packages.
https://bugs.winehq.org/show_bug.cgi?id=45127
Dimitris Gounaridis moihack.inside@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Tomb Raider 2013 : Most |Tomb Raider 2013 : Most |shaders render blue |shaders render in blue | |color
https://bugs.winehq.org/show_bug.cgi?id=45127
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3dx11 |directx-d3d
--- Comment #1 from Matteo Bruni matteo.mystral@gmail.com --- Thank you for the bug report. It looks like this is the cause:
error: definitions of interface block `shader_in_out' do not match
Specifically, reg0 is declared with flat interpolation in only one of shaders in the shader program and we're using GLSL 1.50 (the driver doesn't support GLSL 4.40).
I have a guess at what's going wrong, I'm going to attach a hack for you to try in a bit, in case you can build Wine yourself.
https://bugs.winehq.org/show_bug.cgi?id=45127
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Tomb Raider 2013 : Most |Tomb Raider 2013: |shaders render in blue |mismatched shader interface |color |blocks cause broken | |rendering
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #2 from Matteo Bruni matteo.mystral@gmail.com --- Created attachment 61311 --> https://bugs.winehq.org/attachment.cgi?id=61311 Hack
https://bugs.winehq.org/show_bug.cgi?id=45127
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #3 from Dimitris Gounaridis moihack.inside@gmail.com --- Created attachment 61314 --> https://bugs.winehq.org/attachment.cgi?id=61314 compressed terminal output/error log after applying the hack by Matteo Bruni
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #4 from Dimitris Gounaridis moihack.inside@gmail.com --- (In reply to Matteo Bruni from comment #1)
Thank you for the bug report. It looks like this is the cause:
error: definitions of interface block `shader_in_out' do not match
Specifically, reg0 is declared with flat interpolation in only one of shaders in the shader program and we're using GLSL 1.50 (the driver doesn't support GLSL 4.40).
I have a guess at what's going wrong, I'm going to attach a hack for you to try in a bit, in case you can build Wine yourself.
Hello and thanks for the patch. I've built Wine 3.7 branch after manually applying your hack.
Unfortunately the issue remains. I've attached a new terminal output in case you can find something new there.
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #5 from Matteo Bruni matteo.mystral@gmail.com --- Created attachment 61318 --> https://bugs.winehq.org/attachment.cgi?id=61318 Further fix
Eh, the issue was pretty obvious in hindsight. The attached patch fixes it for me.
After that I get a different error "Too many combined image uniforms, shader storage buffers and fragment outputs" triggered by a fragment shader writing to gl_FragDepth. It might be a Mesa bug but, on the other hand, we should probably do a better job with declaring fragment shader outputs. Anyway, that's a separate bug (which you can file here if it also applies to you).
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #6 from Dimitris Gounaridis moihack.inside@gmail.com --- Yeap! The second patch fixed it for me as well! Thank you!
I couldn't see the error you mention in my terminal output though. I guess it does not apply on me.
https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #7 from Dimitris Gounaridis moihack.inside@gmail.com --- Still occurs on wine 3.8
https://bugs.winehq.org/show_bug.cgi?id=45127
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/wined3d-CompareI | |nterpolationMode Ever confirmed|0 |1 CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=45127
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com Resolution|--- |FIXED Fixed by SHA1| |42ace9d445fb4054b91ca005092 | |be7d379f6a528 Status|STAGED |RESOLVED
--- Comment #8 from Józef Kucia joseph.kucia@gmail.com --- The fix was committed as 42ace9d445fb4054b91ca005092be7d379f6a528.
https://bugs.winehq.org/show_bug.cgi?id=45127
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.10.