rsx/qt: Add depth compare emulation to the advanced tab

This commit is contained in:
kd-11 2026-05-10 19:12:45 +03:00
parent 233f19ccaf
commit 0df9096e90
7 changed files with 16 additions and 1 deletions

View File

@ -2163,7 +2163,8 @@ namespace rsx
}
}
if (m_framebuffer_layout.zeta_address &&
if (g_cfg.video.emulate_depth_compare &&
m_framebuffer_layout.zeta_address &&
method_registers.depth_func() == rsx::comparison_function::equal)
{
current_fragment_program.ctrl |= RSX_SHADER_CONTROL_EMULATE_DEPTH_COMPARE;

View File

@ -147,6 +147,7 @@ struct cfg_root : cfg::node
cfg::_bool disable_video_output{ this, "Disable Video Output", false, true };
cfg::_bool disable_vertex_cache{ this, "Disable Vertex Cache", false };
cfg::_bool disable_FIFO_reordering{ this, "Disable FIFO Reordering", false };
cfg::_bool emulate_depth_compare{ this, "Emulate Special Depth Comparison", false };
cfg::_bool frame_skip_enabled{ this, "Enable Frame Skip", false, true };
cfg::_bool force_cpu_blit_processing{ this, "Force CPU Blit", false, true }; // Debugging option
cfg::_bool disable_on_disk_shader_cache{ this, "Disable On-Disk Shader Cache", false };

View File

@ -84,6 +84,7 @@ const std::map<emu_settings_type, cfg_location> settings_location =
{ emu_settings_type::DisableOcclusionQueries, get_cfg_location(local_cfg.video.disable_zcull_queries) },
{ emu_settings_type::DisableVideoOutput, get_cfg_location(local_cfg.video.disable_video_output) },
{ emu_settings_type::DisableFIFOReordering, get_cfg_location(local_cfg.video.disable_FIFO_reordering) },
{ emu_settings_type::EmulateDepthCompare, get_cfg_location(local_cfg.video.emulate_depth_compare) },
{ emu_settings_type::StereoRenderEnabled, get_cfg_location(local_cfg.video.stereo_enabled) },
{ emu_settings_type::StereoRenderMode, get_cfg_location(local_cfg.video.stereo_render_mode) },
{ emu_settings_type::ScreenSize, get_cfg_location(local_cfg.video.screen_size) },

View File

@ -79,6 +79,7 @@ enum class emu_settings_type
DisableOcclusionQueries,
DisableVideoOutput,
DisableFIFOReordering,
EmulateDepthCompare,
StrictTextureFlushing,
ShaderPrecisionQuality,
StereoRenderEnabled,

View File

@ -2457,6 +2457,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
m_emu_settings->EnhanceCheckBox(ui->disableVertexCache, emu_settings_type::DisableVertexCache);
SubscribeTooltip(ui->disableVertexCache, tooltips.settings.disable_vertex_cache);
m_emu_settings->EnhanceCheckBox(ui->emulateDepthCompare, emu_settings_type::EmulateDepthCompare);
SubscribeTooltip(ui->emulateDepthCompare, tooltips.settings.emulate_depth_compare);
m_emu_settings->EnhanceCheckBox(ui->forceHwMSAAResolve, emu_settings_type::ForceHwMSAAResolve);
SubscribeTooltip(ui->forceHwMSAAResolve, tooltips.settings.force_hw_MSAA);

View File

@ -2727,6 +2727,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="emulateDepthCompare">
<property name="text">
<string>Emulate Special Depth Comparison</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="forceHwMSAAResolve">
<property name="text">

View File

@ -42,6 +42,7 @@ public:
const QString disable_vertex_cache = tr("Disables the vertex cache.\nMight resolve missing or flickering graphics output.\nMay degrade performance.");
const QString disable_async_host_mm = tr("Force host memory management calls to be inlined instead of handled asynchronously.\nThis can cause severe performance degradation and stuttering in some games.\nThis option is only needed by developers to debug problems with texture cache memory protection.");
const QString disable_spin_optimization = tr("Disable SPU GETLLAR spin optimization.\nThis can cause severe performance degradation and stuttering in many games.\nThis option is only needed for a select number of games.");
const QString emulate_depth_compare = tr("Emulate depth comparison operations where desktop hardware behavior differs from PS3, usually EQUAL comparison modes.\nFixes excessive shadow flickering and Z-fighting in some games.\nThis is most obvious in some games where the Z prepass depth format is different from the rasterization depth format, a scenario that will never work out correctly on compliant desktop hardware.");
const QString enable_spu_events_busy_loop = tr("Enable SPU RdEventStat spin.\nThis increases CPU usage, this setting is beneficial for high-threaded CPUs (12+) with select number of games.");
const QString zcull_operation_mode = tr("Changes ZCULL report synchronization behaviour. Experiment to find the best option for your game. Approximate mode is recommended for most games.\n· Precise is the most accurate to PS3 behaviour. Required for accurate visuals in some titles such as Demon's Souls and The Darkness.\n· Approximate is a much faster way to generate occlusion data which may not always match what the PS3 would generate. Works well with most PS3 games.\n· Relaxed changes the synchronization method completely and can greatly improve performance in some games or completely break others.");
const QString max_spurs_threads = tr("Limits the maximum number of SPURS threads in each thread group.\nMay improve performance in some cases, especially on systems with limited number of hardware threads.\nLimiting the number of threads is likely to cause crashes; it's recommended to keep this at the default value.");