Skip to content

Commit 45def4c

Browse files
committed
rsx/qt: Add a debug setting to force programmable blending
1 parent dc1f9f4 commit 45def4c

7 files changed

Lines changed: 20 additions & 2 deletions

File tree

rpcs3/Emu/RSX/RSXThread.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ namespace rsx
315315
return true;
316316
}
317317

318+
if (g_cfg.video.disable_hardware_blending)
319+
{
320+
fragment_ctrl |= RSX_SHADER_CONTROL_PROGRAMMABLE_BLENDING;
321+
return !programmable_blend_active;
322+
}
323+
318324
// We actually need to handle this, we're still blending
319325
const auto is_signed_equation = [](rsx::blend_equation equation)
320326
{

rpcs3/Emu/system_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ struct cfg_root : cfg::node
178178
cfg::_bool disable_async_host_memory_manager{ this, "Disable Asynchronous Memory Manager", false, true };
179179
cfg::_enum<output_scaling_mode> output_scaling{ this, "Output Scaling Mode", output_scaling_mode::bilinear, true };
180180
cfg::_bool record_with_overlays{ this, "Record With Overlays", true, true };
181+
cfg::_bool disable_hardware_blending{ this, "Disable Hardware Blending", false, true };
181182
cfg::_bool disable_hardware_texel_remapping{ this, "Disable Hardware ColorSpace Remapping", false, true };
182183
cfg::uint<0, 100> rcas_sharpening_intensity{ this, "FidelityFX CAS Sharpening Intensity", 50, true };
183184
cfg::_bool disable_blit_engine_upscaling{ this, "Disable Blit Engine Upscaling", false, true };

rpcs3/rpcs3qt/emu_settings_type.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ const std::map<emu_settings_type, cfg_location> settings_location =
111111
{ emu_settings_type::ForceHwMSAAResolve, get_cfg_location(local_cfg.video.force_hw_MSAA_resolve) },
112112
{ emu_settings_type::DisableAsyncHostMM, get_cfg_location(local_cfg.video.disable_async_host_memory_manager) },
113113
{ emu_settings_type::RecordWithOverlays, get_cfg_location(local_cfg.video.record_with_overlays) },
114-
{ emu_settings_type::DisableHWTexelRemapping, get_cfg_location(local_cfg.video.disable_hardware_texel_remapping) },
114+
{ emu_settings_type::DisableHWBlending, get_cfg_location(local_cfg.video.disable_hardware_texel_remapping) },
115+
{ emu_settings_type::DisableHWTexelRemapping, get_cfg_location(local_cfg.video.disable_hardware_blending) },
115116
{ emu_settings_type::FsrSharpeningStrength, get_cfg_location(local_cfg.video.rcas_sharpening_intensity) },
116-
{ emu_settings_type::DisableBlitEngineScaling, get_cfg_location(local_cfg.video.disable_blit_engine_upscaling) },
117+
{ emu_settings_type::DisableBlitEngineScaling, get_cfg_location(local_cfg.video.disable_blit_engine_upscaling) },
117118

118119
// Vulkan
119120
{ emu_settings_type::VulkanAdapter, get_cfg_location(local_cfg.video.vk.adapter) },

rpcs3/rpcs3qt/emu_settings_type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ enum class emu_settings_type
111111
DisableAsyncHostMM,
112112
UseReBAR,
113113
RecordWithOverlays,
114+
DisableHWBlending,
114115
DisableHWTexelRemapping,
115116
DisableBlitEngineScaling,
116117

rpcs3/rpcs3qt/settings_dialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
14461446
EnhanceCheckBox(emu_settings_type::DisableSpinOptimization, ui->disableSpinOptimization, tooltips.settings.disable_spin_optimization);
14471447
EnhanceCheckBox(emu_settings_type::EnabledSPUEventsBusyLoop, ui->enableSpuEventsBusyLoop, tooltips.settings.enable_spu_events_busy_loop);
14481448
EnhanceCheckBox(emu_settings_type::DisableHWTexelRemapping, ui->disableHardwareTexelRemapping, tooltips.settings.disable_hw_texel_remapping);
1449+
EnhanceCheckBox(emu_settings_type::DisableHWBlending, ui->disableHardwareBlending, tooltips.settings.disable_hw_blending);
14491450

14501451
// Comboboxes
14511452

rpcs3/rpcs3qt/settings_dialog.ui

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4464,6 +4464,13 @@
44644464
</property>
44654465
</widget>
44664466
</item>
4467+
<item>
4468+
<widget class="QCheckBox" name="disableHardwareBlending">
4469+
<property name="text">
4470+
<string>Disable Hardware Blending</string>
4471+
</property>
4472+
</widget>
4473+
</item>
44674474
<item>
44684475
<widget class="QCheckBox" name="disableHardwareTexelRemapping">
44694476
<property name="text">

rpcs3/rpcs3qt/tooltips.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class Tooltips : public QObject
131131
const QString enable_performance_report = tr("Measure certain events and print a chart after the emulator is stopped. Don't enable if not asked to.");
132132
const QString num_ppu_threads = tr("Affects maximum amount of PPU threads running concurrently, the value of 1 has very low compatibility with games.\n2 is the default, if unsure do not modify this setting.");
133133
const QString disable_hw_texel_remapping = tr("Disables use of hardware-native color-space remapping formats such as _sRGB and _SNORM suffixes.\nDisabling this option increases accuracy compared to PS3 but can also introduce some noise due to how the software emulation works.");
134+
const QString disable_hw_blending = tr("Force use of programmable blending for backends that support the feature.\nPurely a debugging option, you don't stand to gain anything by enabling this.");
134135

135136
// emulator
136137

0 commit comments

Comments
 (0)