diff options
| author | JMC47 <JMC4789@gmail.com> | 2022-04-24 15:00:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-24 15:00:42 -0400 |
| commit | c0488de4829cb3a7d1d76522cee821ec8ad03f95 (patch) | |
| tree | f780b8a71377afc24ccf79504f53d0c230510198 /Source/Core/VideoBackends/Software/SWRenderer.cpp | |
| parent | 8e7c84842595f64b63184933cf4f6d7c78bb82e8 (diff) | |
| parent | f3eff70e2fda8ad0894f34336584f331ab989b68 (diff) | |
Merge pull request #10251 from Pokechu22/negative-scissor
Rework scissor handling
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.cpp | 10 |
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 |
