summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWRenderer.cpp
diff options
context:
space:
mode:
authorTechjar <tecknojar@gmail.com>2021-06-09 07:42:21 -0400
committerTechjar <tecknojar@gmail.com>2021-10-04 15:51:24 -0400
commit1161af80594c403233e3d21589af004ee2d75594 (patch)
treec20fdec2f9b8777eb62de221a4c89c7f9224d31c /Source/Core/VideoBackends/Software/SWRenderer.cpp
parent7ec02ee4d37cef6a73ac7a678901904ca6855728 (diff)
VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon, leaving only the specific buffer implementations in each backend.
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index d66609ad3a..84fe951fcd 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.cpp
+++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -12,13 +12,13 @@
#include "VideoBackends/Software/EfbCopy.h"
#include "VideoBackends/Software/EfbInterface.h"
+#include "VideoBackends/Software/SWBoundingBox.h"
#include "VideoBackends/Software/SWOGLWindow.h"
#include "VideoBackends/Software/SWTexture.h"
#include "VideoCommon/AbstractPipeline.h"
#include "VideoCommon/AbstractShader.h"
#include "VideoCommon/AbstractTexture.h"
-#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoCommon.h"
@@ -141,14 +141,9 @@ u32 SWRenderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
return value;
}
-u16 SWRenderer::BBoxReadImpl(int index)
+std::unique_ptr<BoundingBox> SWRenderer::CreateBoundingBox() const
{
- return BoundingBox::GetCoordinate(static_cast<BoundingBox::Coordinate>(index));
-}
-
-void SWRenderer::BBoxWriteImpl(int index, u16 value)
-{
- BoundingBox::SetCoordinate(static_cast<BoundingBox::Coordinate>(index), value);
+ return std::make_unique<SWBoundingBox>();
}
void SWRenderer::ClearScreen(const MathUtil::Rectangle<int>& rc, bool colorEnable, bool alphaEnable,