summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWRenderer.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-11-09 18:38:24 -0800
committerPokechu22 <Pokechu022@gmail.com>2022-04-16 12:34:58 -0700
commit925ceab82f874dcd9eeab5ca9520b5d6f0157ed1 (patch)
treebf3996af9d6e6dc23c2fd91939c96f3ba53a73f6 /Source/Core/VideoBackends/Software/SWRenderer.cpp
parent076392a0f65fa11b8c3475b762b8b9794057ae11 (diff)
Software: Use new scissor logic
Unlike the hardware backends, the software renderer can use multiple scissor rectangles (though this will result in extra rasterization).
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index e5b0f08987..76eea93068 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.cpp
+++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -12,6 +12,7 @@
#include "VideoBackends/Software/EfbCopy.h"
#include "VideoBackends/Software/EfbInterface.h"
+#include "VideoBackends/Software/Rasterizer.h"
#include "VideoBackends/Software/SWBoundingBox.h"
#include "VideoBackends/Software/SWOGLWindow.h"
#include "VideoBackends/Software/SWTexture.h"
@@ -179,4 +180,13 @@ SWRenderer::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl)
{
return std::make_unique<NativeVertexFormat>(vtx_decl);
}
+
+void SWRenderer::SetScissorRect(const MathUtil::Rectangle<int>& rc)
+{
+ // BPFunctions calls SetScissorRect with the "best" scissor rect whenever the viewport or scissor
+ // changes. However, the software renderer is actually able to use multiple scissor rects (which
+ // is necessary in a few renderering edge cases, such as with Major Minor's Majestic March).
+ // Thus, we use this as a signal to update the list of scissor rects, but ignore the parameter.
+ Rasterizer::ScissorChanged();
+}
} // namespace SW