Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpreter/Jit64: Emulate FMA accurately in more cases #9748

Merged
merged 2 commits into from Jun 6, 2021

Conversation

JosJuice
Copy link
Member

Thought my efforts to improve cross-architecture netplay sync would only involve making JitArm64 more accurate? Nope! It's time to make Jit64 more accurate now. (And the interpreter too, as a bonus.)

@Sintendo
Copy link
Member

Commit message for the Jit64 commit appears to have been truncated.

@JosJuice
Copy link
Member Author

Fixed.

This is more accurate to the original hardware's rounding behavior.
@JosJuice JosJuice force-pushed the fma-accuracy branch 2 times, most recently from 74087f4 to bbc2a44 Compare May 25, 2021 10:12
When determinism is enabled, we either want all CPUs to use FMA or
we want no CPUs to use FMA. Until now, Jit64 has been been doing
the latter. However, this is inaccurate behavior, all CPUs since
Haswell support FMA, and getting JitArm64 to match the exact
inaccurate rounding used by Jit64 would be a bit annoying. This
commit switches us over to using FMA on all CPUs when determinism
is enabled, with older CPUs calling the std::fma function.
Copy link
Member

@Tilka Tilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but please make sure this has been tested before merging

@JosJuice
Copy link
Member Author

JosJuice commented Jun 4, 2021

I've tested that F-Zero GX runs correctly with all the Jit64 codepaths (hardware FMA, software FMA, no FMA).

@Tilka Tilka merged commit 6c0180f into dolphin-emu:master Jun 6, 2021
11 checks passed
@JosJuice JosJuice deleted the fma-accuracy branch June 6, 2021 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants