GS/HW: Always mark fetched/created depth targets as used

Same as colour targets. Fixes half screen after cutscenes in Merceneries
- Playground of Destruction.
This commit is contained in:
Stenzek 2023-12-23 01:56:46 +10:00 committed by Connor McLaughlin
parent 9a4094e997
commit b32d96636d
1 changed files with 1 additions and 5 deletions

View File

@ -2373,7 +2373,7 @@ void GSRendererHW::Draw()
if (!ds)
{
ds = g_texture_cache->CreateTarget(ZBUF_TEX0, t_size, GetValidSize(src), target_scale, GSTextureCache::DepthStencil,
m_cached_ctx.DepthWrite(), 0, false, force_preload, preserve_depth, m_r, src);
true, 0, false, force_preload, preserve_depth, m_r, src);
if (unlikely(!ds))
{
GL_INS("ERROR: Failed to create ZBUF target, skipping.");
@ -5808,12 +5808,8 @@ bool GSRendererHW::DetectDoubleHalfClear(bool& no_rt, bool& no_ds)
return false;
GSTextureCache::Target* half_point = g_texture_cache->GetExactTarget(half << 5, m_cached_ctx.FRAME.FBW, clear_depth ? GSTextureCache::RenderTarget : GSTextureCache::DepthStencil, half << 5);
if (half_point)
{
half_point = nullptr;
return false;
}
// Don't allow double half clear to go through when the number of bits written through FRAME and Z are different.
// GTA: LCS does this setup, along with a few other games. Thankfully if it's a zero clear, we'll clear both