GPU/HW: Clear depth at vblank time in 480i games
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.
This commit is contained in:
parent
e7a3465598
commit
2eecf6b79d
|
@ -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();
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue