[Bug 60189] New: Built-in d3dx9 causes visual artifacts in Lego Star Wars 3 III (GoG version)
http://bugs.winehq.org/show_bug.cgi?id=60189 Bug ID: 60189 Summary: Built-in d3dx9 causes visual artifacts in Lego Star Wars 3 III (GoG version) Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: d3d Assignee: wine-bugs@list.winehq.org Reporter: fcasas@codeweavers.com Target Milestone: --- Distribution: --- Created attachment 81874 --> http://bugs.winehq.org/attachment.cgi?id=81874 Screenshot with highlighted artifacts. Recent upstream vkd3d-shader updates allow the game shaders to compile correctly. However I noticed that updating Wine itself (on a Wine with custom vkd3d build) introduces small, previously unseen, visual artifacts. These artifacts consist in some flickering black stains that can be easily seen in the characters in the intro animation. They are easier to spot in motion but I attach a screenshot highlighting them. I ran a bisection and concluded that this bug is introduced in commit 306c3af83faca8bd384df24d370a863cab5ed394 d3dx9: No longer prefer native. So it might be considered a regression. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 --- Comment #1 from Francisco Casas <fcasas@codeweavers.com> --- It might be worth mentioning that the game caches the shaders, so to test any change related to vkd3d-shader, this directory must be deleted: wine-prefix/drive_c/users/<user>/AppData/Roaming/LucasArts/LEGOStarWarsIII but as I said, it seems that it is not a problem in vkd3d-shader, but in Wine. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 Matteo Bruni <matteo.mystral@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|d3d |d3d-util -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |306c3af83faca8bd384df24d370 | |a863cab5ed394 CC| |z.figura12@gmail.com --- Comment #2 from Ken Sharp <imwellcushtymelike@gmail.com> --- What version of Wine are you using? Please attach the console output. https://gitlab.winehq.org/wine/wine/-/wikis/Bugs -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 --- Comment #3 from Francisco Casas <fcasas@codeweavers.com> --- Created attachment 81880 --> http://bugs.winehq.org/attachment.cgi?id=81880 Compressed log with +d3dx. I attach a compressed log. Ran with WINEDEBUG="+loaddll,+d3dx", with wine-11.15 linked to current upstream vkd3d. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |11.15 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 --- Comment #4 from Francisco Casas <fcasas@codeweavers.com> --- I realized that this is not a regression. The error indeed was introduced once we started preferring native d3dx9.dll over built-in d3dx9.dll but I hadn't realize that I had a native d3dx9.dll in my prefix because of another game. The game is using the native compiler through this dll, which contains the legacy D3DXCompileShader() function. Still, we have to fix it. After digging into it, I concluded that we need to generate the same instructions as fxc does for the mul() intrinsic, which can either be dp4/add/mul/mads depending on whether the arguments are row_major or column_major. This is because the game renders the objects twice with several variants of the same big shader and expects to get exactly the same depth results for all of them. I introduced some relevant tests in the first patch of: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/2211 While this MR introduces dot product vectorization, this is not enough to fix the bug, since we also need to implement different mul() specializations and somehow the ability to propagate the majority of matrix arguments into function calls. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 Francisco Casas <fcasas@codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Built-in d3dx9 causes |Built-in d3dx9 causes |visual artifacts in Lego |z-fighting visual artifacts |Star Wars 3 III (GoG |in Lego Star Wars 3 III |version) |(GoG version) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60189 --- Comment #5 from Francisco Casas <fcasas@codeweavers.com> --- This z-fighting bug is fixed once we emit the proper dp2add/dp3/dp4 or mul/mad/add instructions for the mul() intrinsic in the different cases of matrix majorities of the arguments. I have an implementation for this in my https://gitlab.winehq.org/fcasas/vkd3d/-/commits/frail-dot branch. I sent the first part as https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/2211. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla