https://bugs.winehq.org/show_bug.cgi?id=49718
Bug ID: 49718 Summary: ABZU broken with math functions from musl Product: Wine Version: 5.15 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: testmode11@protonmail.com Distribution: ---
One of the recent "Import x from musl" commits breaks ABZU. After starting a new game and before the Press Right mouse message appears sea background turns to black. Reverting to old math.c file before the changes fixes the issue.
https://bugs.winehq.org/show_bug.cgi?id=49718
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |piotr@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=49718
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Are you talking about https://store.steampowered.com/app/384190/ABZU/ ?
Can you perform a regression test, to see which change exactly broke it? See https://wiki.winehq.org/Regression_Testing
https://bugs.winehq.org/show_bug.cgi?id=49718
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com Regression SHA1| |d53d42f1ae6f2bb2e98a36a9173 | |ad0ffd3b205fd
--- Comment #2 from Piotr Caban piotr.caban@gmail.com --- I had to install dxvk to reproduce the problem (the game crashes shortly after starting without it). It's caused by following commit: d53d42f1ae6f2bb2e98a36a9173ad0ffd3b205fd msvcrt: Import acosf from musl.
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- @Piotr Did you do a trace to see which values give different results?
https://bugs.winehq.org/show_bug.cgi?id=49718
Anya maniikarabera@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #4 from Piotr Caban piotr.caban@gmail.com --- The value that the game depends on is: acosf(-1). I've also iterated over all float values, current implementation is 1ULP off comparing to native implementation is some cases.
It's fixed for me by cb7b23a3f06824c43dd492f41abab78b96a53b88. Please retest.
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- @Piotr
Does that mean the musl implementation is broken as well...?
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #6 from Piotr Caban piotr.caban@gmail.com --- (In reply to Fabian Maurer from comment #5)
Does that mean the musl implementation is broken as well...?
Not really, it just returns different value that has reasonably small error (less than 1ULP). In this case musl implementation has bigger error though.
It's done this way in order to speed up calculation. It will be possible to implement it with better precision using architecture dependent code (otherwise the implementation will be too slow).
It's also interesting to take a look on values returned by acos. When native dll is used it will return different values depending if your processor supports SSE2 (you can also see it by calling _set_SSE2_enable(FALSE) function). Probably in this case native falls back to some kind of architecture independent code.
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #7 from Piotr Caban piotr.caban@gmail.com --- Small clarification: - musl acosf return doesn't match with native for more inputs (not only the ones fixed by the patch) - it probably makes sense to upstream the change for returning PI and PI/2 with better precision
https://bugs.winehq.org/show_bug.cgi?id=49718
--- Comment #8 from Henri Verbeet hverbeet@gmail.com --- It should be noted that there exist applications—typically older games—that send floating point data over the network, and expect it to match between hosts. Commit 71aa14af993dd065b1882675fb9f01af44ed232a was a fix for a few of those.
https://bugs.winehq.org/show_bug.cgi?id=49718
TestMode testmode11@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #9 from TestMode testmode11@protonmail.com --- Works with the fix in master.
https://bugs.winehq.org/show_bug.cgi?id=49718
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |cb7b23a3f06824c43dd492f41ab | |ab78b96a53b88
https://bugs.winehq.org/show_bug.cgi?id=49718
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.16.