diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 093b2ec814..af6289f914 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -2562,6 +2562,9 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR __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) { 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; + // 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) { u = uv & GSVector4i::xffffffff().srl32(32 - tw); @@ -2622,6 +2626,7 @@ void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFR __assume(0); } } +#endif vr = vr.rintersect(tr);