diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp index 90fa7f1be9..006df2fbea 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp @@ -136,11 +136,18 @@ void LOADERDECL UpdateBoundingBox() // should possibly adjust for viewport? o[0] = (o[0] + 1.0f) * 320.0f; o[1] = (o[1] + 1.0f) * 240.0f; - + if (o[0] < PixelEngine::bbox[0]) PixelEngine::bbox[0] = (u16)std::max(0.0f, o[0]); if (o[0] > PixelEngine::bbox[1]) PixelEngine::bbox[1] = (u16)std::min(640.0f, o[0]); if (o[1] < PixelEngine::bbox[2]) PixelEngine::bbox[2] = (u16)std::max(0.0f, o[1]); if (o[1] > PixelEngine::bbox[3]) PixelEngine::bbox[3] = (u16)std::min(480.0f, o[1]); + + // Hardware tests bounding boxes in 2x2 blocks => left and top are even, right and bottom are odd + PixelEngine::bbox[0] &= ~1; + PixelEngine::bbox[1] |= 1; + PixelEngine::bbox[2] &= ~1; + PixelEngine::bbox[3] |= 1; + /* if (GetAsyncKeyState(VK_LSHIFT)) { ERROR_LOG(VIDEO, "XForm: %f %f %f to %f %f", p[0], p[1], p[2], o[0], o[1]); diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln index 55b034b805..9423cd37c4 100644 --- a/Source/Dolphin.sln +++ b/Source/Dolphin.sln @@ -389,8 +389,8 @@ Global {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|x64.Build.0 = Debug|x64 {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|Win32.ActiveCfg = DebugFast|Win32 {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|Win32.Build.0 = DebugFast|Win32 - {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|x64.ActiveCfg = Release|x64 - {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|x64.Build.0 = Release|x64 + {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|x64.ActiveCfg = DebugFast|x64 + {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.DebugFast|x64.Build.0 = DebugFast|x64 {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|Win32.ActiveCfg = Release|Win32 {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|Win32.Build.0 = Release|Win32 {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|x64.ActiveCfg = Release|x64