Merge
This commit is contained in:
commit
4802c66fad
4 changed files with 14 additions and 1 deletions
|
@ -41,6 +41,8 @@
|
|||
public bool DepthTestEnabled;
|
||||
public bool DepthWriteEnabled;
|
||||
public GalComparisonOp DepthFunc;
|
||||
public float DepthRangeNear;
|
||||
public float DepthRangeFar;
|
||||
|
||||
public bool StencilTestEnabled;
|
||||
public bool StencilTwoSideEnabled;
|
||||
|
|
|
@ -195,7 +195,13 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
|||
}
|
||||
}
|
||||
|
||||
if (New.StencilTestEnabled != _old.StencilTestEnabled)
|
||||
if (New.DepthRangeNear != _old.DepthRangeNear ||
|
||||
New.DepthRangeFar != _old.DepthRangeFar)
|
||||
{
|
||||
GL.DepthRange(New.DepthRangeNear, New.DepthRangeFar);
|
||||
}
|
||||
|
||||
if (New.StencilTestEnabled != _old.StencilTestEnabled)
|
||||
{
|
||||
Enable(EnableCap.StencilTest, New.StencilTestEnabled);
|
||||
}
|
||||
|
|
|
@ -371,6 +371,9 @@ namespace Ryujinx.Graphics
|
|||
{
|
||||
state.DepthFunc = (GalComparisonOp)ReadRegister(NvGpuEngine3DReg.DepthTestFunction);
|
||||
}
|
||||
|
||||
state.DepthRangeNear = ReadRegisterFloat(NvGpuEngine3DReg.DepthRangeNNear);
|
||||
state.DepthRangeFar = ReadRegisterFloat(NvGpuEngine3DReg.DepthRangeNFar);
|
||||
}
|
||||
|
||||
private void SetStencil(GalPipelineState state)
|
||||
|
|
|
@ -15,6 +15,8 @@ namespace Ryujinx.Graphics
|
|||
ViewportNTranslateZ = 0x285,
|
||||
ViewportNHoriz = 0x300,
|
||||
ViewportNVert = 0x301,
|
||||
DepthRangeNNear = 0x302,
|
||||
DepthRangeNFar = 0x303,
|
||||
VertexArrayFirst = 0x35d,
|
||||
VertexArrayCount = 0x35e,
|
||||
ClearNColor = 0x360,
|
||||
|
|
Loading…
Add table
Reference in a new issue