mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Software: Use new scissor logic
Unlike the hardware backends, the software renderer can use multiple scissor rectangles (though this will result in extra rasterization).
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user