GS/HW: Fix offset Z channel shuffle hazard. Adjust Tekken 5 CRC

This commit is contained in:
refractionpcsx2 2025-01-14 13:47:18 +00:00
parent 2d62f2f3cd
commit 547c4aba1d
3 changed files with 14 additions and 8 deletions

View File

@ -1967,6 +1967,7 @@ SCAJ-20125:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -1977,6 +1978,7 @@ SCAJ-20126:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -2454,6 +2456,7 @@ SCAJ-20199:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -4149,6 +4152,7 @@ SCED-53538:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -5769,6 +5773,7 @@ SCES-53202:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -7212,6 +7217,7 @@ SCKA-20049:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -7435,6 +7441,7 @@ SCKA-20081:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -57371,6 +57378,7 @@ SLPS-25510:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -60540,6 +60548,7 @@ SLPS-73223:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -66541,6 +66550,7 @@ SLUS-21059:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.
@ -67085,6 +67095,7 @@ SLUS-21160:
clampModes:
eeClampMode: 2 # Fixes camera and stops constant coin noises on Pirates Cove.
gsHWFixes:
textureInsideRT: 1 # Fixes heat haze half screen problem.
alignSprite: 1 # Fixes vertical lines.
halfPixelOffset: 4 # Align post.
nativeScaling: 1 # Fixes depth of field effect.

View File

@ -194,7 +194,7 @@ bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
return true;
}
if (!s_nativeres && r.PRIM->PRIM == GS_SPRITE && RTME && RTEX0.TFX == 1 && RFPSM == RTPSM && RTPSM == PSMCT32 && RFBMSK == 0xFF000000 && r.m_index.tail > 2)
if (!s_nativeres && r.PRIM->PRIM == GS_SPRITE && RTME && RTEX0.TFX == 1 && !r.PRIM->ABE && RFPSM == RTPSM && RTPSM == PSMCT32 && RFBMSK == 0xFF000000 && r.m_index.tail > 2)
{
// Don't enable hack on native res.
// Fixes ghosting/blur effect and white lines appearing in stages: Moonfit Wilderness, Acid Rain - caused by upscaling.
@ -204,12 +204,6 @@ bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
const GSVector4i read_size(r.m_vt.m_min.t.x, r.m_vt.m_min.t.y, r.m_vt.m_max.t.x + 0.5f, r.m_vt.m_max.t.y + 0.5f);
r.ReplaceVerticesWithSprite(draw_size, read_size, GSVector2i(read_size.width(), read_size.height()), draw_size);
}
else if (RZTST == 1 && RTME && (RFBP == 0x02bc0 || RFBP == 0x02be0 || RFBP == 0x02d00 || RFBP == 0x03480 || RFBP == 0x034a0) && RFPSM == RTPSM && RTBP0 == 0x00000 && RTPSM == PSMCT32)
{
// The moving display effect(flames) is not emulated properly in the entire screen so let's remove the effect in the stage: Burning Temple. Related to half screen bottom issue.
// Fixes black lines in the stage: Burning Temple - caused by upscaling. Note the black lines can also be fixed with Merge Sprite hack.
skip = 2;
}
}
return true;

View File

@ -5655,7 +5655,8 @@ __ri void GSRendererHW::HandleTextureHazards(const GSTextureCache::Target* rt, c
GL_CACHE("Source is render target, taking copy.");
src_target = rt;
}
else if (m_conf.tex == m_conf.ds)
// Be careful of single page channel shuffles where depth is the source but it's not going to the same place, we can't read this directly.
else if (m_conf.tex == m_conf.ds && (!m_channel_shuffle || static_cast<int>(m_cached_ctx.FRAME.Block() - rt->m_TEX0.TBP0) == static_cast<int>(m_cached_ctx.ZBUF.Block() - ds->m_TEX0.TBP0)))
{
// GL, Vulkan (in General layout), not DirectX!
const bool can_read_current_depth_buffer = g_gs_device->Features().test_and_sample_depth;