mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-16 19:05:39 +00:00
GPU/HW: Fix toggling PGXP depth buffer causing black screen
This commit is contained in:
parent
6184b671c5
commit
af2042e713
|
@ -221,6 +221,7 @@ bool GPU_HW::Initialize()
|
||||||
m_downsample_mode = GetDownsampleMode(m_resolution_scale);
|
m_downsample_mode = GetDownsampleMode(m_resolution_scale);
|
||||||
m_wireframe_mode = g_settings.gpu_wireframe_mode;
|
m_wireframe_mode = g_settings.gpu_wireframe_mode;
|
||||||
m_disable_color_perspective = features.noperspective_interpolation && ShouldDisableColorPerspective();
|
m_disable_color_perspective = features.noperspective_interpolation && ShouldDisableColorPerspective();
|
||||||
|
m_pgxp_depth_buffer = g_settings.UsingPGXPDepthBuffer();
|
||||||
|
|
||||||
CheckSettings();
|
CheckSettings();
|
||||||
|
|
||||||
|
@ -414,6 +415,8 @@ void GPU_HW::UpdateSettings(const Settings& old_settings)
|
||||||
m_batch.use_depth_buffer = false;
|
m_batch.use_depth_buffer = false;
|
||||||
if (m_pgxp_depth_buffer)
|
if (m_pgxp_depth_buffer)
|
||||||
ClearDepthBuffer();
|
ClearDepthBuffer();
|
||||||
|
else
|
||||||
|
UpdateDepthBufferFromMaskBit();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateSoftwareRenderer(true);
|
UpdateSoftwareRenderer(true);
|
||||||
|
@ -504,8 +507,6 @@ void GPU_HW::CheckSettings()
|
||||||
if (box_downscale == g_settings.gpu_resolution_scale)
|
if (box_downscale == g_settings.gpu_resolution_scale)
|
||||||
m_downsample_mode = GPUDownsampleMode::Disabled;
|
m_downsample_mode = GPUDownsampleMode::Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pgxp_depth_buffer = g_settings.UsingPGXPDepthBuffer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GPU_HW::CalculateResolutionScale() const
|
u32 GPU_HW::CalculateResolutionScale() const
|
||||||
|
|
Loading…
Reference in a new issue