mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fix VideoCommon build configuration for DebugFast/x64.
VertexLoader: Align bounding box registers properly, the hardware reads them in 2x2 blocks. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6524 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -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]);
|
||||
|
Reference in New Issue
Block a user