OGL: disable bbox writes if not supported

This commit is contained in:
degasus 2014-11-22 15:17:57 +01:00
parent 36fe8ccf46
commit 6f3e20ac42
1 changed files with 10 additions and 5 deletions

View File

@ -376,14 +376,19 @@ static void BPWritten(const BPCmd& bp)
if (!g_bSkipCurrentFrame) if (!g_bSkipCurrentFrame)
{ {
u8 offset = bp.address & 2; u8 offset = bp.address & 2;
BoundingBox::coords[offset] = bp.newvalue & 0x3ff;
BoundingBox::coords[offset + 1] = bp.newvalue >> 10;
BoundingBox::active = true; BoundingBox::active = true;
if (g_ActiveConfig.backend_info.bSupportsBBox)
{
g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff); g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff);
g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10); g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10);
} }
else
{
BoundingBox::coords[offset] = bp.newvalue & 0x3ff;
BoundingBox::coords[offset + 1] = bp.newvalue >> 10;
}
}
return; return;
case BPMEM_TEXINVALIDATE: case BPMEM_TEXINVALIDATE:
// TODO: Needs some restructuring in TextureCacheBase. // TODO: Needs some restructuring in TextureCacheBase.