Move support buffer update out of the backends (#5411)
* Move support buffer update out of the backends * Fix render scale init and remove redundant state from SupportBufferUpdater * Stop passing texture scale to the backends * XML docs for SupportBufferUpdater
This commit is contained in:
parent
fa32ef9275
commit
9c6071a645
51 changed files with 364 additions and 496 deletions
|
@ -111,12 +111,11 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
GL.Clear(ClearBufferMask.ColorBufferBit);
|
||||
|
||||
int srcX0, srcX1, srcY0, srcY1;
|
||||
float scale = viewConverted.ScaleFactor;
|
||||
|
||||
if (crop.Left == 0 && crop.Right == 0)
|
||||
{
|
||||
srcX0 = 0;
|
||||
srcX1 = (int)(viewConverted.Width / scale);
|
||||
srcX1 = viewConverted.Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -127,7 +126,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
if (crop.Top == 0 && crop.Bottom == 0)
|
||||
{
|
||||
srcY0 = 0;
|
||||
srcY1 = (int)(viewConverted.Height / scale);
|
||||
srcY1 = viewConverted.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -135,14 +134,6 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
srcY1 = crop.Bottom;
|
||||
}
|
||||
|
||||
if (scale != 1f)
|
||||
{
|
||||
srcX0 = (int)(srcX0 * scale);
|
||||
srcY0 = (int)(srcY0 * scale);
|
||||
srcX1 = (int)Math.Ceiling(srcX1 * scale);
|
||||
srcY1 = (int)Math.Ceiling(srcY1 * scale);
|
||||
}
|
||||
|
||||
float ratioX = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _height * crop.AspectRatioX / (_width * crop.AspectRatioY));
|
||||
float ratioY = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _width * crop.AspectRatioY / (_height * crop.AspectRatioX));
|
||||
|
||||
|
@ -408,7 +399,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
SwizzleComponent.Alpha);
|
||||
|
||||
_isBgra = forceBgra;
|
||||
_upscaledTexture = _renderer.CreateTexture(info, 1) as TextureView;
|
||||
_upscaledTexture = _renderer.CreateTexture(info) as TextureView;
|
||||
}
|
||||
|
||||
public void SetScalingFilterLevel(float level)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue