mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
BPFunctions: Move upscaling of scissor rect to VideoCommon
This commit is contained in:
@ -49,24 +49,12 @@ void SetScissor()
|
||||
const int xoff = bpmem.scissorOffset.x * 2;
|
||||
const int yoff = bpmem.scissorOffset.y * 2;
|
||||
|
||||
EFBRectangle rc(bpmem.scissorTL.x - xoff, bpmem.scissorTL.y - yoff, bpmem.scissorBR.x - xoff + 1,
|
||||
bpmem.scissorBR.y - yoff + 1);
|
||||
EFBRectangle native_rc(bpmem.scissorTL.x - xoff, bpmem.scissorTL.y - yoff,
|
||||
bpmem.scissorBR.x - xoff + 1, bpmem.scissorBR.y - yoff + 1);
|
||||
native_rc.ClampUL(0, 0, EFB_WIDTH, EFB_HEIGHT);
|
||||
|
||||
if (rc.left < 0)
|
||||
rc.left = 0;
|
||||
if (rc.top < 0)
|
||||
rc.top = 0;
|
||||
if (rc.right > EFB_WIDTH)
|
||||
rc.right = EFB_WIDTH;
|
||||
if (rc.bottom > EFB_HEIGHT)
|
||||
rc.bottom = EFB_HEIGHT;
|
||||
|
||||
if (rc.left > rc.right)
|
||||
rc.right = rc.left;
|
||||
if (rc.top > rc.bottom)
|
||||
rc.bottom = rc.top;
|
||||
|
||||
g_renderer->SetScissorRect(rc);
|
||||
TargetRectangle target_rc = g_renderer->ConvertEFBRectangle(native_rc);
|
||||
g_renderer->SetScissorRect(target_rc);
|
||||
}
|
||||
|
||||
void SetViewport()
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
};
|
||||
|
||||
virtual void SetBlendingState(const BlendingState& state) {}
|
||||
virtual void SetScissorRect(const EFBRectangle& rc) {}
|
||||
virtual void SetScissorRect(const MathUtil::Rectangle<int>& rc) {}
|
||||
virtual void SetRasterizationState(const RasterizationState& state) {}
|
||||
virtual void SetDepthState(const DepthState& state) {}
|
||||
virtual void SetTexture(u32 index, const AbstractTexture* texture) {}
|
||||
|
Reference in New Issue
Block a user