[Bug 47918] New: Blur: cars have no wheels when Wine is compiled with Ryzen optimisations
https://bugs.winehq.org/show_bug.cgi?id=47918 Bug ID: 47918 Summary: Blur: cars have no wheels when Wine is compiled with Ryzen optimisations Product: Wine Version: 4.17 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: felixhaedicke(a)web.de Distribution: --- Created attachment 65415 --> https://bugs.winehq.org/attachment.cgi?id=65415 Screenshot: Blur shows car without wheels Recompiled Wine with the following CFLAGS: "-O2 -march=znver2", and noticed that in Blur, the cars (shown in the menus and in the game) are rendered without wheels. Before, I had compiled Wine compiled with "-O2 -march=ivybridge", and the wheels are rendered correctly. It does not make a difference, if I use wined3d, d9vk or wine-nine-standalone. But it makes a difference, if Wine's msvcr90, or Microsoft's MSVC runtime DLLs are used - wheels are always shown correctly with MSVC runtime DLLs. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 --- Comment #1 from Felix Hädicke <felixhaedicke(a)web.de> --- Created attachment 65416 --> https://bugs.winehq.org/attachment.cgi?id=65416 Screenshot: Blur shows car with wheels -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Felix Hädicke <felixhaedicke(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |msvcrt --- Comment #2 from Felix Hädicke <felixhaedicke(a)web.de> --- Analyzed the problem further. Compiled msvcr90 with and without Ryzen optimisations. Then changed the optimisation settings for specific files. Found out that it is enough to disable -march=znver2 for wcs.c to make it work. Then I found out that it is enough to disable optimisations for the function puts_clbk_str() in printf.h. Used __attribute__((optimize("O0"))) for this function. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 --- Comment #3 from Felix Hädicke <felixhaedicke(a)web.de> --- This function uses memcpy(). But behaviour of memcpy() is undefinied, if memory areas overlap. And this rule is violated (to check this, I added an assertion to check this, and did run the msvcrt printf tests). Replacing memcpy() with memmove() makes it work with Ryzen optimisations. There is another function: puts_clbk_str_c99_a(), implemented in wcs.c, which looks very similar. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 --- Comment #4 from Felix Hädicke <felixhaedicke(a)web.de> --- https://github.com/felixhaedicke/wine/commit/fda8ccd79d2eef5f074e7450cc73f0a... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |fda8ccd79d2eef5f074e7450cc7 | |3f0a081aa84f6 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Fabian Maurer <dark.shadow4(a)web.de> --- Marking fixed. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |UNCONFIRMED --- Comment #6 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- (In reply to Fabian Maurer from comment #5)
Marking fixed.
That commit is in a fork, not upstream yet, reopening. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 --- Comment #7 from Fabian Maurer <dark.shadow4(a)web.de> --- Sorry, thought that was upstream - my bad. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1|fda8ccd79d2eef5f074e7450cc7 |90e520b418dcedae6fbfdd56b79 |3f0a081aa84f6 |1ba50652f2ee6 --- Comment #8 from Matteo Bruni <matteo.mystral(a)gmail.com> --- Now really fixed by <https://source.winehq.org/git/wine.git/commitdiff/90e520b418dcedae6fbfdd56b791ba50652f2ee6>. Thank you Felix! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.18. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x -- 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.
https://bugs.winehq.org/show_bug.cgi?id=47918 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |--- --- Comment #10 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 4.0.x milestone from bug fixes included in 4.0.4. -- 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