GSDX: Disable a buggy vertex tracer optimisation in GetTextureMinMax (produces a rectangle with a negative dimension leaving it still empty after the follow block which is likely a hack itself). Fixes textures in Kingdom Hearts 2's tron stage.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5610 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1@gmail.com 2013-04-09 22:17:49 +00:00
parent fa2dc3d3d4
commit a0e960b77d
1 changed files with 5 additions and 0 deletions

View File

@ -2562,6 +2562,9 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
__assume(0); __assume(0);
} }
// Kingdom Hearts 2's tron section shows a bug with the CLAMP_REPEAT code here.
// This is just an optimisation so it's disabled until the bug is found.
#if 0
if(wms + wmt < 6) if(wms + wmt < 6)
{ {
GSVector4 st = m_vt.m_min.t.xyxy(m_vt.m_max.t); GSVector4 st = m_vt.m_min.t.xyxy(m_vt.m_max.t);
@ -2577,6 +2580,7 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
int mask = 0; int mask = 0;
// This part is suspicious, as far as I can tell it zeroes fields if tw/th aren't 0, which is probably not the intent
if(wms == CLAMP_REPEAT || wmt == CLAMP_REPEAT) if(wms == CLAMP_REPEAT || wmt == CLAMP_REPEAT)
{ {
u = uv & GSVector4i::xffffffff().srl32(32 - tw); u = uv & GSVector4i::xffffffff().srl32(32 - tw);
@ -2622,6 +2626,7 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR
__assume(0); __assume(0);
} }
} }
#endif
vr = vr.rintersect(tr); vr = vr.rintersect(tr);