VideoCommon: Rework scissor handling

This increases accuracy, fixing the white rendering in Major Minor's Majestic March.  However, the hardware backends can only have one viewport and scissor rectangle at a time, while sometimes multiple are needed to accurately emulate what is happening.  If possible, this will need to be fixed later.
This commit is contained in:
Pokechu22
2021-11-12 11:48:26 -08:00
parent 4595b89ad8
commit 076392a0f6
6 changed files with 283 additions and 48 deletions

View File

@ -160,8 +160,7 @@ void Renderer::EndUtilityDrawing()
{
// Reset framebuffer/scissor/viewport. Pipeline will be reset at next draw.
g_framebuffer_manager->BindEFBFramebuffer();
BPFunctions::SetScissor();
BPFunctions::SetViewport();
BPFunctions::SetScissorAndViewport();
}
void Renderer::SetFramebuffer(AbstractFramebuffer* framebuffer)
@ -543,8 +542,7 @@ void Renderer::CheckForConfigChanges()
// Viewport and scissor rect have to be reset since they will be scaled differently.
if (changed_bits & CONFIG_CHANGE_BIT_TARGET_SIZE)
{
BPFunctions::SetViewport();
BPFunctions::SetScissor();
BPFunctions::SetScissorAndViewport();
}
// Stereo mode change requires recompiling our post processing pipeline and imgui pipelines for