mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 16:22:47 +01:00
Update dynarmic and add new unsafe CPU option.
This commit is contained in:
parent
03da34b330
commit
2298508465
8 changed files with 32 additions and 1 deletions
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 0c12614d1a7a72d778609920dde96a4c63074ece
|
Subproject commit c6125082ea992c245edab26b6f86e7b904b86eec
|
|
@ -122,6 +122,7 @@ void RestoreGlobalState(bool is_powered_on) {
|
||||||
values.cpu_accuracy.SetGlobal(true);
|
values.cpu_accuracy.SetGlobal(true);
|
||||||
values.cpuopt_unsafe_unfuse_fma.SetGlobal(true);
|
values.cpuopt_unsafe_unfuse_fma.SetGlobal(true);
|
||||||
values.cpuopt_unsafe_reduce_fp_error.SetGlobal(true);
|
values.cpuopt_unsafe_reduce_fp_error.SetGlobal(true);
|
||||||
|
values.cpuopt_unsafe_ignore_standard_fpcr.SetGlobal(true);
|
||||||
values.cpuopt_unsafe_inaccurate_nan.SetGlobal(true);
|
values.cpuopt_unsafe_inaccurate_nan.SetGlobal(true);
|
||||||
values.cpuopt_unsafe_fastmem_check.SetGlobal(true);
|
values.cpuopt_unsafe_fastmem_check.SetGlobal(true);
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ struct Values {
|
||||||
|
|
||||||
Setting<bool> cpuopt_unsafe_unfuse_fma;
|
Setting<bool> cpuopt_unsafe_unfuse_fma;
|
||||||
Setting<bool> cpuopt_unsafe_reduce_fp_error;
|
Setting<bool> cpuopt_unsafe_reduce_fp_error;
|
||||||
|
Setting<bool> cpuopt_unsafe_ignore_standard_fpcr;
|
||||||
Setting<bool> cpuopt_unsafe_inaccurate_nan;
|
Setting<bool> cpuopt_unsafe_inaccurate_nan;
|
||||||
Setting<bool> cpuopt_unsafe_fastmem_check;
|
Setting<bool> cpuopt_unsafe_fastmem_check;
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,9 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||||
if (Settings::values.cpuopt_unsafe_reduce_fp_error.GetValue()) {
|
if (Settings::values.cpuopt_unsafe_reduce_fp_error.GetValue()) {
|
||||||
config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_ReducedErrorFP;
|
config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_ReducedErrorFP;
|
||||||
}
|
}
|
||||||
|
if (Settings::values.cpuopt_unsafe_ignore_standard_fpcr.GetValue()) {
|
||||||
|
config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_IgnoreStandardFPCRValue;
|
||||||
|
}
|
||||||
if (Settings::values.cpuopt_unsafe_inaccurate_nan.GetValue()) {
|
if (Settings::values.cpuopt_unsafe_inaccurate_nan.GetValue()) {
|
||||||
config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_InaccurateNaN;
|
config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_InaccurateNaN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -756,6 +756,8 @@ void Config::ReadCpuValues() {
|
||||||
QStringLiteral("cpuopt_unsafe_unfuse_fma"), true);
|
QStringLiteral("cpuopt_unsafe_unfuse_fma"), true);
|
||||||
ReadSettingGlobal(Settings::values.cpuopt_unsafe_reduce_fp_error,
|
ReadSettingGlobal(Settings::values.cpuopt_unsafe_reduce_fp_error,
|
||||||
QStringLiteral("cpuopt_unsafe_reduce_fp_error"), true);
|
QStringLiteral("cpuopt_unsafe_reduce_fp_error"), true);
|
||||||
|
ReadSettingGlobal(Settings::values.cpuopt_unsafe_ignore_standard_fpcr,
|
||||||
|
QStringLiteral("cpuopt_unsafe_ignore_standard_fpcr"), true);
|
||||||
ReadSettingGlobal(Settings::values.cpuopt_unsafe_inaccurate_nan,
|
ReadSettingGlobal(Settings::values.cpuopt_unsafe_inaccurate_nan,
|
||||||
QStringLiteral("cpuopt_unsafe_inaccurate_nan"), true);
|
QStringLiteral("cpuopt_unsafe_inaccurate_nan"), true);
|
||||||
ReadSettingGlobal(Settings::values.cpuopt_unsafe_fastmem_check,
|
ReadSettingGlobal(Settings::values.cpuopt_unsafe_fastmem_check,
|
||||||
|
@ -1339,6 +1341,8 @@ void Config::SaveCpuValues() {
|
||||||
Settings::values.cpuopt_unsafe_unfuse_fma, true);
|
Settings::values.cpuopt_unsafe_unfuse_fma, true);
|
||||||
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_reduce_fp_error"),
|
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_reduce_fp_error"),
|
||||||
Settings::values.cpuopt_unsafe_reduce_fp_error, true);
|
Settings::values.cpuopt_unsafe_reduce_fp_error, true);
|
||||||
|
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_ignore_standard_fpcr"),
|
||||||
|
Settings::values.cpuopt_unsafe_ignore_standard_fpcr, true);
|
||||||
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_inaccurate_nan"),
|
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_inaccurate_nan"),
|
||||||
Settings::values.cpuopt_unsafe_inaccurate_nan, true);
|
Settings::values.cpuopt_unsafe_inaccurate_nan, true);
|
||||||
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_fastmem_check"),
|
WriteSettingGlobal(QStringLiteral("cpuopt_unsafe_fastmem_check"),
|
||||||
|
|
|
@ -34,12 +34,15 @@ void ConfigureCpu::SetConfiguration() {
|
||||||
ui->accuracy->setEnabled(runtime_lock);
|
ui->accuracy->setEnabled(runtime_lock);
|
||||||
ui->cpuopt_unsafe_unfuse_fma->setEnabled(runtime_lock);
|
ui->cpuopt_unsafe_unfuse_fma->setEnabled(runtime_lock);
|
||||||
ui->cpuopt_unsafe_reduce_fp_error->setEnabled(runtime_lock);
|
ui->cpuopt_unsafe_reduce_fp_error->setEnabled(runtime_lock);
|
||||||
|
ui->cpuopt_unsafe_ignore_standard_fpcr->setEnabled(runtime_lock);
|
||||||
ui->cpuopt_unsafe_inaccurate_nan->setEnabled(runtime_lock);
|
ui->cpuopt_unsafe_inaccurate_nan->setEnabled(runtime_lock);
|
||||||
ui->cpuopt_unsafe_fastmem_check->setEnabled(runtime_lock);
|
ui->cpuopt_unsafe_fastmem_check->setEnabled(runtime_lock);
|
||||||
|
|
||||||
ui->cpuopt_unsafe_unfuse_fma->setChecked(Settings::values.cpuopt_unsafe_unfuse_fma.GetValue());
|
ui->cpuopt_unsafe_unfuse_fma->setChecked(Settings::values.cpuopt_unsafe_unfuse_fma.GetValue());
|
||||||
ui->cpuopt_unsafe_reduce_fp_error->setChecked(
|
ui->cpuopt_unsafe_reduce_fp_error->setChecked(
|
||||||
Settings::values.cpuopt_unsafe_reduce_fp_error.GetValue());
|
Settings::values.cpuopt_unsafe_reduce_fp_error.GetValue());
|
||||||
|
ui->cpuopt_unsafe_ignore_standard_fpcr->setChecked(
|
||||||
|
Settings::values.cpuopt_unsafe_ignore_standard_fpcr.GetValue());
|
||||||
ui->cpuopt_unsafe_inaccurate_nan->setChecked(
|
ui->cpuopt_unsafe_inaccurate_nan->setChecked(
|
||||||
Settings::values.cpuopt_unsafe_inaccurate_nan.GetValue());
|
Settings::values.cpuopt_unsafe_inaccurate_nan.GetValue());
|
||||||
ui->cpuopt_unsafe_fastmem_check->setChecked(
|
ui->cpuopt_unsafe_fastmem_check->setChecked(
|
||||||
|
@ -84,6 +87,9 @@ void ConfigureCpu::ApplyConfiguration() {
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_reduce_fp_error,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_reduce_fp_error,
|
||||||
ui->cpuopt_unsafe_reduce_fp_error,
|
ui->cpuopt_unsafe_reduce_fp_error,
|
||||||
cpuopt_unsafe_reduce_fp_error);
|
cpuopt_unsafe_reduce_fp_error);
|
||||||
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_ignore_standard_fpcr,
|
||||||
|
ui->cpuopt_unsafe_ignore_standard_fpcr,
|
||||||
|
cpuopt_unsafe_ignore_standard_fpcr);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_inaccurate_nan,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_inaccurate_nan,
|
||||||
ui->cpuopt_unsafe_inaccurate_nan,
|
ui->cpuopt_unsafe_inaccurate_nan,
|
||||||
cpuopt_unsafe_inaccurate_nan);
|
cpuopt_unsafe_inaccurate_nan);
|
||||||
|
@ -137,6 +143,9 @@ void ConfigureCpu::SetupPerGameUI() {
|
||||||
ConfigurationShared::SetColoredTristate(ui->cpuopt_unsafe_reduce_fp_error,
|
ConfigurationShared::SetColoredTristate(ui->cpuopt_unsafe_reduce_fp_error,
|
||||||
Settings::values.cpuopt_unsafe_reduce_fp_error,
|
Settings::values.cpuopt_unsafe_reduce_fp_error,
|
||||||
cpuopt_unsafe_reduce_fp_error);
|
cpuopt_unsafe_reduce_fp_error);
|
||||||
|
ConfigurationShared::SetColoredTristate(ui->cpuopt_unsafe_ignore_standard_fpcr,
|
||||||
|
Settings::values.cpuopt_unsafe_ignore_standard_fpcr,
|
||||||
|
cpuopt_unsafe_ignore_standard_fpcr);
|
||||||
ConfigurationShared::SetColoredTristate(ui->cpuopt_unsafe_inaccurate_nan,
|
ConfigurationShared::SetColoredTristate(ui->cpuopt_unsafe_inaccurate_nan,
|
||||||
Settings::values.cpuopt_unsafe_inaccurate_nan,
|
Settings::values.cpuopt_unsafe_inaccurate_nan,
|
||||||
cpuopt_unsafe_inaccurate_nan);
|
cpuopt_unsafe_inaccurate_nan);
|
||||||
|
|
|
@ -40,6 +40,7 @@ private:
|
||||||
|
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_unfuse_fma;
|
ConfigurationShared::CheckState cpuopt_unsafe_unfuse_fma;
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_reduce_fp_error;
|
ConfigurationShared::CheckState cpuopt_unsafe_reduce_fp_error;
|
||||||
|
ConfigurationShared::CheckState cpuopt_unsafe_ignore_standard_fpcr;
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan;
|
ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan;
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check;
|
ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check;
|
||||||
};
|
};
|
||||||
|
|
|
@ -111,6 +111,18 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cpuopt_unsafe_ignore_standard_fpcr">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>
|
||||||
|
<div>This option improves the speed of 32 bits ASIMD floating-point functions by running with incorrect rounding modes.</div>
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Faster ASIMD instructions (32 bits only)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cpuopt_unsafe_inaccurate_nan">
|
<widget class="QCheckBox" name="cpuopt_unsafe_inaccurate_nan">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
Loading…
Reference in a new issue