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

@ -131,8 +131,6 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future)
case BPMEM_SCISSORTL: // Scissor Rectable Top, Left
case BPMEM_SCISSORBR: // Scissor Rectable Bottom, Right
case BPMEM_SCISSOROFFSET: // Scissor Offset
SetScissor();
SetViewport();
VertexShaderManager::SetViewportChanged();
GeometryShaderManager::SetViewportChanged();
return;
@ -1272,8 +1270,7 @@ void BPReload()
// let's not risk actually replaying any writes.
// note that PixelShaderManager is already covered since it has its own DoState.
SetGenerationMode();
SetScissor();
SetViewport();
SetScissorAndViewport();
SetDepthMode();
SetBlendMode();
OnPixelFormatChange();