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 DepthTestEnabled;
|
||||||
public bool DepthWriteEnabled;
|
public bool DepthWriteEnabled;
|
||||||
public GalComparisonOp DepthFunc;
|
public GalComparisonOp DepthFunc;
|
||||||
|
public float DepthRangeNear;
|
||||||
|
public float DepthRangeFar;
|
||||||
|
|
||||||
public bool StencilTestEnabled;
|
public bool StencilTestEnabled;
|
||||||
public bool StencilTwoSideEnabled;
|
public bool StencilTwoSideEnabled;
|
||||||
|
|
|
@ -195,6 +195,12 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (New.DepthRangeNear != _old.DepthRangeNear ||
|
||||||
|
New.DepthRangeFar != _old.DepthRangeFar)
|
||||||
|
{
|
||||||
|
GL.DepthRange(New.DepthRangeNear, New.DepthRangeFar);
|
||||||
|
}
|
||||||
|
|
||||||
if (New.StencilTestEnabled != _old.StencilTestEnabled)
|
if (New.StencilTestEnabled != _old.StencilTestEnabled)
|
||||||
{
|
{
|
||||||
Enable(EnableCap.StencilTest, New.StencilTestEnabled);
|
Enable(EnableCap.StencilTest, New.StencilTestEnabled);
|
||||||
|
|
|
@ -371,6 +371,9 @@ namespace Ryujinx.Graphics
|
||||||
{
|
{
|
||||||
state.DepthFunc = (GalComparisonOp)ReadRegister(NvGpuEngine3DReg.DepthTestFunction);
|
state.DepthFunc = (GalComparisonOp)ReadRegister(NvGpuEngine3DReg.DepthTestFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.DepthRangeNear = ReadRegisterFloat(NvGpuEngine3DReg.DepthRangeNNear);
|
||||||
|
state.DepthRangeFar = ReadRegisterFloat(NvGpuEngine3DReg.DepthRangeNFar);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetStencil(GalPipelineState state)
|
private void SetStencil(GalPipelineState state)
|
||||||
|
|
|
@ -15,6 +15,8 @@ namespace Ryujinx.Graphics
|
||||||
ViewportNTranslateZ = 0x285,
|
ViewportNTranslateZ = 0x285,
|
||||||
ViewportNHoriz = 0x300,
|
ViewportNHoriz = 0x300,
|
||||||
ViewportNVert = 0x301,
|
ViewportNVert = 0x301,
|
||||||
|
DepthRangeNNear = 0x302,
|
||||||
|
DepthRangeNFar = 0x303,
|
||||||
VertexArrayFirst = 0x35d,
|
VertexArrayFirst = 0x35d,
|
||||||
VertexArrayCount = 0x35e,
|
VertexArrayCount = 0x35e,
|
||||||
ClearNColor = 0x360,
|
ClearNColor = 0x360,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue