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:
Techjar
2021-06-09 07:42:21 -04:00
parent 7ec02ee4d3
commit 1161af8059
41 changed files with 617 additions and 708 deletions

View File

@ -18,6 +18,7 @@
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoBackendBase.h"
namespace PixelEngine
@ -231,7 +232,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
for (int i = 0; i < 4; ++i)
{
mmio->Register(base | (PE_BBOX_LEFT + 2 * i), MMIO::ComplexRead<u16>([i](u32) {
BoundingBox::Disable();
g_renderer->BBoxDisable();
return g_video_backend->Video_GetBoundingBox(i);
}),
MMIO::InvalidWrite<u16>());