mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon, leaving only the specific buffer implementations in each backend.
This commit is contained in:
@ -255,7 +255,7 @@ static void BPWritten(const BPCmd& bp)
|
||||
if (PE_copy.copy_to_xfb == 1)
|
||||
{
|
||||
// Make sure we disable Bounding box to match the side effects of the non-failure path
|
||||
BoundingBox::Disable();
|
||||
g_renderer->BBoxDisable();
|
||||
}
|
||||
|
||||
return;
|
||||
@ -287,7 +287,7 @@ static void BPWritten(const BPCmd& bp)
|
||||
// We should be able to get away with deactivating the current bbox tracking
|
||||
// here. Not sure if there's a better spot to put this.
|
||||
// the number of lines copied is determined by the y scale * source efb height
|
||||
BoundingBox::Disable();
|
||||
g_renderer->BBoxDisable();
|
||||
|
||||
float yScale;
|
||||
if (PE_copy.scale_invert)
|
||||
@ -452,7 +452,7 @@ static void BPWritten(const BPCmd& bp)
|
||||
case BPMEM_CLEARBBOX2:
|
||||
{
|
||||
const u8 offset = bp.address & 2;
|
||||
BoundingBox::Enable();
|
||||
g_renderer->BBoxEnable();
|
||||
|
||||
g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff);
|
||||
g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10);
|
||||
|
Reference in New Issue
Block a user