summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Config
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-06-09 20:16:41 +0200
committerJosJuice <josjuice@gmail.com>2021-06-09 22:56:26 +0200
commitac28b89fa54dd01ef09c647492a508e9dec30fc2 (patch)
tree691234a88435c4ef28a275a409d0f3799274ef22 /Source/Core/Common/Config
parent8f9bb5612af67d609818129f10e8f5b8f9ea353e (diff)
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
Diffstat (limited to 'Source/Core/Common/Config')
-rw-r--r--Source/Core/Common/Config/Config.cpp4
-rw-r--r--Source/Core/Common/Config/Enums.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp
index c75b6ee5e9..17e65ea234 100644
--- a/Source/Core/Common/Config/Config.cpp
+++ b/Source/Core/Common/Config/Config.cpp
@@ -141,7 +141,9 @@ static const std::map<System, std::string> system_to_name = {
{System::Logger, "Logger"},
{System::Debugger, "Debugger"},
{System::SYSCONF, "SYSCONF"},
- {System::DualShockUDPClient, "DualShockUDPClient"}};
+ {System::DualShockUDPClient, "DualShockUDPClient"},
+ {System::FreeLook, "FreeLook"},
+ {System::Session, "Session"}};
const std::string& GetSystemName(System system)
{
diff --git a/Source/Core/Common/Config/Enums.h b/Source/Core/Common/Config/Enums.h
index 1999005401..c25858b098 100644
--- a/Source/Core/Common/Config/Enums.h
+++ b/Source/Core/Common/Config/Enums.h
@@ -33,6 +33,7 @@ enum class System
Debugger,
DualShockUDPClient,
FreeLook,
+ Session,
};
constexpr std::array<LayerType, 7> SEARCH_ORDER{{