[GPU] Fix frame buffer being upside down in some cases

This commit is contained in:
gdkchan 2018-04-14 00:39:24 -03:00
parent 47100ec8c1
commit 42ebfdff7f
9 changed files with 96 additions and 5 deletions

View file

@ -147,6 +147,17 @@ namespace Ryujinx.Graphics.Gpu
Gpu.Renderer.BindShader(Tag);
}
int RawSX = ReadRegister(NvGpuEngine3dReg.ViewportScaleX);
int RawSY = ReadRegister(NvGpuEngine3dReg.ViewportScaleY);
float SX = BitConverter.Int32BitsToSingle(RawSX);
float SY = BitConverter.Int32BitsToSingle(RawSY);
float SignX = MathF.Sign(SX);
float SignY = MathF.Sign(SY);
Gpu.Renderer.SetUniform2F(GalConsts.FlipUniformName, SignX, SignY);
return Tags;
}