0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 18:05:46 +00:00

Scale scissor used for clears (#3002)

This commit is contained in:
gdkchan 2022-01-16 20:23:00 -03:00 committed by GitHub
parent 929a97d432
commit fb853f13e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -535,6 +535,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
scissorH = Math.Min(scissorH, scissorState.Y2 - scissorState.Y1);
}
float scale = _channel.TextureManager.RenderTargetScale;
if (scale != 1f)
{
scissorX = (int)(scissorX * scale);
scissorY = (int)(scissorY * scale);
scissorW = (int)MathF.Ceiling(scissorW * scale);
scissorH = (int)MathF.Ceiling(scissorH * scale);
}
_context.Renderer.Pipeline.SetScissor(0, true, scissorX, scissorY, scissorW, scissorH);
}

View file

@ -477,8 +477,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
{
x = (int)(x * scale);
y = (int)(y * scale);
width = (int)Math.Ceiling(width * scale);
height = (int)Math.Ceiling(height * scale);
width = (int)MathF.Ceiling(width * scale);
height = (int)MathF.Ceiling(height * scale);
}
_context.Renderer.Pipeline.SetScissor(index, true, x, y, width, height);