Skip to content
Permalink
Browse files

gsdx-hw: Move GSC_YakuzaGames to partial level.

Don't enable hack on native res if crc is below aggressive. Upscaling
issues.

Bonus, revert recent barrier changes on gl date code.
  • Loading branch information...
lightningterror committed Mar 5, 2019
1 parent e36976b commit 8219bcd1b44cc16493755ea6228977d22d9f4f8c
Showing with 21 additions and 19 deletions.
  1. +18 −18 plugins/GSdx/Renderers/HW/GSHwHack.cpp
  2. +3 −1 plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
@@ -1026,6 +1026,22 @@ bool GSC_SteambotChronicles(const GSFrameInfo& fi, int& skip)
return true;
}

bool GSC_YakuzaGames(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if((Aggressive || !s_nativeres) && !fi.TME && (fi.FBP == 0x1c20 || fi.FBP == 0x1e20 || fi.FBP == 0x1620) && (fi.TBP0 == 0xe00 || fi.TBP0 == 0x1000 || fi.TBP0 == 0x800) && fi.TPSM == PSM_PSMZ24 && fi.FPSM == PSM_PSMCT32
/*&& fi.FBMSK == 0xffffff && fi.TZTST && !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)*/)
{
// Don't enable hack on native res if crc is below aggressive.
// Upscaling issues, removes glow/blur effect which fixes ghosting.
skip = 3;
}
}

return true;
}

////////////////////////////////////////////////////////////////////////////////
// Correctly emulated on OpenGL but can be used as potential speed hack
////////////////////////////////////////////////////////////////////////////////
@@ -1310,22 +1326,6 @@ bool GSC_Grandia3(const GSFrameInfo& fi, int& skip)
return true;
}

bool GSC_YakuzaGames(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(!fi.TME && (fi.FBP == 0x1c20 || fi.FBP == 0x1e20 || fi.FBP == 0x1620) && (fi.TBP0 == 0xe00 || fi.TBP0 == 0x1000 || fi.TBP0 == 0x800) && fi.TPSM == PSM_PSMZ24 && fi.FPSM == PSM_PSMCT32
/*&& fi.FBMSK == 0xffffff && fi.TZTST && !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)*/)
{
// Removes depth effect not rendered properly on D3D.
// Needs to be looked further, might be some upscaling issues present.
skip = 3;
}
}

return true;
}

////////////////////////////////////////////////////////////////////////////////
// Aggressive only hack
////////////////////////////////////////////////////////////////////////////////
@@ -1765,6 +1765,8 @@ void GSState::SetupCrcHack()
lut[CRC::IkkiTousen] = GSC_IkkiTousen;
lut[CRC::Oneechanbara2Special] = GSC_Oneechanbara2Special;
lut[CRC::UltramanFightingEvolution] = GSC_UltramanFightingEvolution;
lut[CRC::Yakuza] = GSC_YakuzaGames;
lut[CRC::Yakuza2] = GSC_YakuzaGames;
}

// Hacks that were fixed on OpenGL
@@ -1781,8 +1783,6 @@ void GSState::SetupCrcHack()
// Depth
lut[CRC::Okami] = GSC_Okami;
lut[CRC::XenosagaE3] = GSC_XenosagaE3;
lut[CRC::Yakuza] = GSC_YakuzaGames;
lut[CRC::Yakuza2] = GSC_YakuzaGames;

// Needs testing
lut[CRC::HauntingGround] = GSC_HauntingGround; // + Texture cache issue + Date
@@ -1040,6 +1040,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// It is way too complex to emulate texture shuffle with DATE. So just use
// the slow but accurate algo
GL_PERF("DATE with %s", m_texture_shuffle ? "texture shuffle" : "no prim overlap");
m_require_full_barrier = true;
DATE_GL45 = true;
DATE = false;
} else if (m_om_csel.wa && !m_context->TEST.ATE) {
@@ -1059,6 +1060,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// texture barrier will split the draw call into n draw call. It is very efficient for
// few primitive draws. Otherwise it sucks.
GL_PERF("Slower DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max);
m_require_full_barrier = true;
DATE_GL45 = true;
DATE = false;
} else {
@@ -1068,6 +1070,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) {
DATE_GL42 = true;
} else {
m_require_full_barrier = true;
DATE_GL45 = true;
DATE = false;
}
@@ -1176,7 +1179,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
m_ps_sel.iip = (m_vt.m_primclass == GS_SPRITE_CLASS) ? 1 : PRIM->IIP;

if (DATE_GL45) {
m_require_full_barrier = true;
m_ps_sel.date = 5 + m_context->TEST.DATM;
} else if (DATE_one) {
m_require_one_barrier = true;

0 comments on commit 8219bcd

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.