1
0
Fork 1
forked from suyu/suyu

yuzu-ui: Add setting for disabling macro HLE

This commit is contained in:
Fernando Sahmkow 2023-01-04 14:56:52 -05:00
parent a0c697124c
commit 3ecc03ec1b
6 changed files with 26 additions and 5 deletions

View file

@ -531,6 +531,7 @@ struct Values {
Setting<bool> reporting_services{false, "reporting_services"};
Setting<bool> quest_flag{false, "quest_flag"};
Setting<bool> disable_macro_jit{false, "disable_macro_jit"};
Setting<bool> disable_macro_hle{false, "disable_macro_hle"};
Setting<bool> extended_logging{false, "extended_logging"};
Setting<bool> use_debug_asserts{false, "use_debug_asserts"};
Setting<bool> use_auto_stub{false, "use_auto_stub"};

View file

@ -107,14 +107,15 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
}
}
if (auto hle_program = hle_macros->GetHLEProgram(cache_info.hash)) {
auto hle_program = hle_macros->GetHLEProgram(cache_info.hash);
if (!hle_program || Settings::values.disable_macro_hle) {
maxwell3d.RefreshParameters();
cache_info.lle_program->Execute(parameters, method);
} else {
cache_info.has_hle_program = true;
cache_info.hle_program = std::move(hle_program);
MICROPROFILE_SCOPE(MacroHLE);
cache_info.hle_program->Execute(parameters, method);
} else {
maxwell3d.RefreshParameters();
cache_info.lle_program->Execute(parameters, method);
}
}
}

View file

@ -562,6 +562,7 @@ void Config::ReadDebuggingValues() {
ReadBasicSetting(Settings::values.reporting_services);
ReadBasicSetting(Settings::values.quest_flag);
ReadBasicSetting(Settings::values.disable_macro_jit);
ReadBasicSetting(Settings::values.disable_macro_hle);
ReadBasicSetting(Settings::values.extended_logging);
ReadBasicSetting(Settings::values.use_debug_asserts);
ReadBasicSetting(Settings::values.use_auto_stub);
@ -1198,6 +1199,7 @@ void Config::SaveDebuggingValues() {
WriteBasicSetting(Settings::values.quest_flag);
WriteBasicSetting(Settings::values.use_debug_asserts);
WriteBasicSetting(Settings::values.disable_macro_jit);
WriteBasicSetting(Settings::values.disable_macro_hle);
WriteBasicSetting(Settings::values.enable_all_controllers);
WriteBasicSetting(Settings::values.create_crash_dumps);
WriteBasicSetting(Settings::values.perform_vulkan_check);

View file

@ -73,6 +73,8 @@ void ConfigureDebug::SetConfiguration() {
ui->dump_macros->setChecked(Settings::values.dump_macros.GetValue());
ui->disable_macro_jit->setEnabled(runtime_lock);
ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit.GetValue());
ui->disable_macro_hle->setEnabled(runtime_lock);
ui->disable_macro_hle->setChecked(Settings::values.disable_macro_hle.GetValue());
ui->disable_loop_safety_checks->setEnabled(runtime_lock);
ui->disable_loop_safety_checks->setChecked(
Settings::values.disable_shader_loop_safety_checks.GetValue());
@ -117,6 +119,7 @@ void ConfigureDebug::ApplyConfiguration() {
Settings::values.disable_shader_loop_safety_checks =
ui->disable_loop_safety_checks->isChecked();
Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked();
Settings::values.disable_macro_hle = ui->disable_macro_hle->isChecked();
Settings::values.extended_logging = ui->extended_logging->isChecked();
Settings::values.perform_vulkan_check = ui->perform_vulkan_check->isChecked();
UISettings::values.disable_web_applet = ui->disable_web_applet->isChecked();

View file

@ -176,7 +176,7 @@
</property>
</widget>
</item>
<item row="0" column="2">
<item row="1" column="2">
<widget class="QCheckBox" name="dump_macros">
<property name="enabled">
<bool>true</bool>
@ -202,6 +202,19 @@
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="disable_macro_hle">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>When checked, it disables the macro HLE functions. Enabling this makes games run slower</string>
</property>
<property name="text">
<string>Disable Macro HLE</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="enable_shader_feedback">
<property name="toolTip">

View file

@ -348,6 +348,7 @@ void Config::ReadValues() {
ReadSetting("Debugging", Settings::values.use_debug_asserts);
ReadSetting("Debugging", Settings::values.use_auto_stub);
ReadSetting("Debugging", Settings::values.disable_macro_jit);
ReadSetting("Debugging", Settings::values.disable_macro_hle);
ReadSetting("Debugging", Settings::values.use_gdbstub);
ReadSetting("Debugging", Settings::values.gdbstub_port);