diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index 42a6e3542..1ff185ea3 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -1962,6 +1962,7 @@ void GPU::UpdateDisplay(bool submit_frame) cmd->interlaced_display_enabled = interlaced; cmd->interlaced_display_field = ConvertToBoolUnchecked(interlaced_field); cmd->interlaced_display_interleaved = line_skip; + cmd->interleaved_480i_mode = m_GPUSTAT.InInterleaved480iMode(); cmd->display_24bit = m_GPUSTAT.display_area_color_depth_24; cmd->display_disabled = IsDisplayDisabled(); cmd->display_pixel_aspect_ratio = ComputePixelAspectRatio(); diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index b5c65545d..64ba4c49f 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -3908,6 +3908,11 @@ void GPU_HW::UpdateDisplay(const GPUBackendUpdateDisplayCommand* cmd) GPUTextureCache::Compact(); + // If this is a 480i single buffer game, then rendering should complete within one vblank. + // Therefore we should clear the depth buffer, because the drawing area may not change. + if (m_pgxp_depth_buffer && cmd->interleaved_480i_mode) + CopyAndClearDepthBuffer(true); + if (g_gpu_settings.gpu_show_vram) { if (IsUsingMultisampling()) diff --git a/src/core/gpu_thread_commands.h b/src/core/gpu_thread_commands.h index 5135c6006..cfdfe5015 100644 --- a/src/core/gpu_thread_commands.h +++ b/src/core/gpu_thread_commands.h @@ -154,10 +154,11 @@ struct GPUBackendUpdateDisplayCommand : public GPUThreadCommand bool interlaced_display_enabled : 1; bool interlaced_display_field : 1; bool interlaced_display_interleaved : 1; + bool interleaved_480i_mode : 1; bool display_24bit : 1; bool display_disabled : 1; bool submit_frame : 1; - bool : 2; + bool : 1; GPUBackendFramePresentationParameters frame; };