dolphin/Source/Core
JosJuice ac28b89fa5 NetPlay/Jit64: Avoid using software FMA
When I added the software FMA path in 2c38d64 and made us use
it when determinism is enabled, I was assuming that either the
performance impact of software FMA wouldn't be too large or CPUs
that were too old to have FMA instructions were too slow to run
Dolphin well anyway. This was wrong. To give an example, the
netplay performance went from 60 FPS to 30 FPS in one case.

This change makes netplay clients negotiate whether FMA should
be used. If all clients use an x64 CPU that supports FMA, or
AArch64, then FMA is enabled, and otherwise FMA is disabled.
In other words, we sacrifice accuracy if needed to avoid massive
slowdown, but not otherwise. When not using netplay, whether to
enable FMA is simply based on whether the host CPU supports it.

The only remaining case where the software FMA path gets used
under normal circumstances is when an input recording is created
on a CPU with FMA support and then played back on a CPU without.
This is not an especially common scenario (though it can happen),
and TASers are generally less picky about performance and more
picky about accuracy than other users anyway.

With this change, FMA desyncs are avoided between AArch64 and
modern x64 CPUs (unlike before 2c38d64), but we do get FMA
desyncs between AArch64 and old x64 CPUs (like before 2c38d64).
This desync can be avoided by adding a non-FMA path to JitArm64 as
an option, which I will wait with for another pull request so that
we can get the performance regression fixed as quickly as possible.

https://bugs.dolphin-emu.org/issues/12542
2021-06-09 22:56:26 +02:00
..
AudioCommon Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
Common NetPlay/Jit64: Avoid using software FMA 2021-06-09 22:56:26 +02:00
Core NetPlay/Jit64: Avoid using software FMA 2021-06-09 22:56:26 +02:00
DiscIO DiscIO: Use MathUtil::SaturatingCast 2021-04-06 23:27:23 +02:00
DolphinNoGUI Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
DolphinQt Merge pull request #9785 from Dentomologist/fix_gamelist_grid_zoom_in 2021-06-07 14:00:21 +02:00
InputCommon Merge pull request #9792 from sepalani/lint 2021-06-07 12:16:08 +02:00
MacUpdater Apple M1: Build, Analytics, and Memory Management 2021-05-22 15:25:17 -07:00
UICommon Updater: Escape HTML characters in commit descriptions 2021-06-01 17:22:19 -07:00
UpdaterCommon Updater: Add code documentation Markdown file 2021-04-13 15:37:31 -07:00
VideoBackends VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
VideoCommon Merge pull request #9792 from sepalani/lint 2021-06-07 12:16:08 +02:00
WinUpdater Updater: Add code documentation Markdown file 2021-04-13 15:37:31 -07:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00
DolphinLib.ARM64.props Implement ArmFPURoundMode.cpp 2021-04-25 15:56:19 +02:00
DolphinLib.props NetPlay/Jit64: Avoid using software FMA 2021-06-09 22:56:26 +02:00
DolphinLib.vcxproj JitCommon: Signed 32-bit division magic constants 2021-03-07 18:27:36 +01:00
DolphinLib.vcxproj.user msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.x64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00