diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs index 50e24b97..64604a99 100644 --- a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs +++ b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs @@ -168,11 +168,32 @@ namespace Ryujinx.Graphics.Gpu.Shader PrimitiveTopology.TriangleFan => InputTopology.Triangles, PrimitiveTopology.TrianglesAdjacency or PrimitiveTopology.TriangleStripAdjacency => InputTopology.TrianglesAdjacency, - _ => InputTopology.Points, + PrimitiveTopology.Patches => _state.TessellationMode.UnpackPatchType() == TessPatchType.Isolines + ? InputTopology.Lines + : InputTopology.Triangles, + _ => InputTopology.Points }; } /// <summary> + /// Queries the tessellation evaluation shader primitive winding order. + /// </summary> + /// <returns>True if the primitive winding order is clockwise, false if counter-clockwise</returns> + public bool QueryTessCw() => _state.TessellationMode.UnpackCw(); + + /// <summary> + /// Queries the tessellation evaluation shader abstract patch type. + /// </summary> + /// <returns>Abstract patch type</returns> + public TessPatchType QueryTessPatchType() => _state.TessellationMode.UnpackPatchType(); + + /// <summary> + /// Queries the tessellation evaluation shader spacing between tessellated vertices of the patch. + /// </summary> + /// <returns>Spacing between tessellated vertices of the patch</returns> + public TessSpacing QueryTessSpacing() => _state.TessellationMode.UnpackSpacing(); + + /// <summary> /// Gets the texture descriptor for a given texture on the pool. /// </summary> /// <param name="handle">Index of the texture (this is the word offset of the handle in the constant buffer)</param> |