Initial tessellation shader support (#2534)
* Initial tessellation shader support * Nits * Re-arrange built-in table * This is not needed anymore * PR feedback
This commit is contained in:
parent
7603dbe3c8
commit
d512ce122c
42 changed files with 775 additions and 148 deletions
|
@ -830,6 +830,21 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
GL.LineWidth(width);
|
||||
}
|
||||
|
||||
public unsafe void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
||||
{
|
||||
GL.PatchParameter(PatchParameterInt.PatchVertices, vertices);
|
||||
|
||||
fixed (float* pOuterLevel = defaultOuterLevel)
|
||||
{
|
||||
GL.PatchParameter(PatchParameterFloat.PatchDefaultOuterLevel, pOuterLevel);
|
||||
}
|
||||
|
||||
fixed (float* pInnerLevel = defaultInnerLevel)
|
||||
{
|
||||
GL.PatchParameter(PatchParameterFloat.PatchDefaultInnerLevel, pInnerLevel);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin)
|
||||
{
|
||||
// GL_POINT_SPRITE was deprecated in core profile 3.2+ and causes GL_INVALID_ENUM when set.
|
||||
|
@ -861,6 +876,19 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
GL.PointSize(Math.Max(float.Epsilon, size));
|
||||
}
|
||||
|
||||
public void SetPolygonMode(GAL.PolygonMode frontMode, GAL.PolygonMode backMode)
|
||||
{
|
||||
if (frontMode == backMode)
|
||||
{
|
||||
GL.PolygonMode(MaterialFace.FrontAndBack, frontMode.Convert());
|
||||
}
|
||||
else
|
||||
{
|
||||
GL.PolygonMode(MaterialFace.Front, frontMode.Convert());
|
||||
GL.PolygonMode(MaterialFace.Back, backMode.Convert());
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPrimitiveRestart(bool enable, int index)
|
||||
{
|
||||
if (!enable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue