Skip to content

Commit fbe86fb

Browse files
committed
GS:HW: Fix ROV texture type conversion for temporary Z.
1 parent eb5e3fc commit fbe86fb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pcsx2/GS/Renderers/HW/GSRendererHW.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7838,7 +7838,7 @@ void GSRendererHW::ConvertTextureTypeROVSingle(GSTextureCache::Target* tgt, bool
78387838
}
78397839

78407840
#if PCSX2_DEVBUILD
7841-
new_tex->SetDebugName(tgt->m_texture->GetDebugName());
7841+
new_tex->SetDebugName(old_tex->GetDebugName());
78427842
#endif
78437843

78447844
if (tgt->m_texture == old_tex)
@@ -7869,12 +7869,13 @@ void GSRendererHW::ConvertTextureTypeROV(GSTextureCache::Target* rt, GSTextureCa
78697869
// Convert depth to the proper type/format.
78707870
if (ds)
78717871
{
7872-
if (m_conf.ps.HasDepthROV() && !ds->m_texture->IsShaderWrite())
7872+
// Note: we must use m_conf.ds because it might be the temporary Z texture.
7873+
if (m_conf.ps.HasDepthROV() && !m_conf.ds->IsShaderWrite())
78737874
{
78747875
GL_PUSH("HW: Convert DepthStencil -> DepthColor for ROV.");
78757876
ConvertTextureTypeROVSingle(ds, true);
78767877
}
7877-
else if (!m_conf.ps.HasDepthROV() && !ds->m_texture->IsDepthStencil())
7878+
else if (!m_conf.ps.HasDepthROV() && !m_conf.ds->IsDepthStencil())
78787879
{
78797880
GL_PUSH("HW: Convert DepthColor -> DepthStencil for non-ROV.");
78807881
ConvertTextureTypeROVSingle(ds, false);

0 commit comments

Comments
 (0)