[GPU] Fix frame buffer being upside down in some cases
This commit is contained in:
parent
47100ec8c1
commit
42ebfdff7f
9 changed files with 96 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,12 @@ namespace Ryujinx.Graphics.Gpu
|
|||
FrameBufferNWidth = 0x202,
|
||||
FrameBufferNHeight = 0x203,
|
||||
FrameBufferNFormat = 0x204,
|
||||
ViewportScaleX = 0x280,
|
||||
ViewportScaleY = 0x281,
|
||||
ViewportScaleZ = 0x282,
|
||||
ViewportTranslateX = 0x283,
|
||||
ViewportTranslateY = 0x284,
|
||||
ViewportTranslateZ = 0x285,
|
||||
VertexAttribNFormat = 0x458,
|
||||
IBlendEnable = 0x4b9,
|
||||
BlendSeparateAlpha = 0x4cf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue