diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs | 80 |
1 files changed, 69 insertions, 11 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs b/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs index fae670ea..82252ced 100644 --- a/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs +++ b/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs @@ -1,5 +1,7 @@ +using Ryujinx.Common.Memory; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Gpu.Engine.Threed; +using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.Gpu.Shader { @@ -26,19 +28,54 @@ namespace Ryujinx.Graphics.Gpu.Shader public readonly TessMode TessellationMode; /// <summary> - /// Indicates whenever the viewport transform is disabled. + /// Indicates whether alpha-to-coverage is enabled. + /// </summary> + public readonly bool AlphaToCoverageEnable; + + /// <summary> + /// Indicates whether alpha-to-coverage dithering is enabled. + /// </summary> + public readonly bool AlphaToCoverageDitherEnable; + + /// <summary> + /// Indicates whether the viewport transform is disabled. /// </summary> public readonly bool ViewportTransformDisable; /// <summary> - /// Indicates whenever alpha-to-coverage is enabled. + /// Depth mode zero to one or minus one to one. /// </summary> - public readonly bool AlphaToCoverageEnable; + public readonly bool DepthMode; /// <summary> - /// Indicates whenever alpha-to-coverage dithering is enabled. + /// Indicates if the point size is set on the shader or is fixed. /// </summary> - public readonly bool AlphaToCoverageDitherEnable; + public readonly bool ProgramPointSizeEnable; + + /// <summary> + /// Point size used if <see cref="ProgramPointSizeEnable" /> is false. + /// </summary> + public readonly float PointSize; + + /// <summary> + /// Indicates whether alpha test is enabled. + /// </summary> + public readonly bool AlphaTestEnable; + + /// <summary> + /// When alpha test is enabled, indicates the comparison that decides if the fragment should be discarded. + /// </summary> + public readonly CompareOp AlphaTestCompare; + + /// <summary> + /// When alpha test is enabled, indicates the value to compare with the fragment output alpha. + /// </summary> + public readonly float AlphaTestReference; + + /// <summary> + /// Type of the vertex attributes consumed by the shader. + /// </summary> + public Array32<AttributeType> AttributeTypes; /// <summary> /// Creates a new GPU graphics state. @@ -46,23 +83,44 @@ namespace Ryujinx.Graphics.Gpu.Shader /// <param name="earlyZForce">Early Z force enable</param> /// <param name="topology">Primitive topology</param> /// <param name="tessellationMode">Tessellation mode</param> - /// <param name="viewportTransformDisable">Indicates whenever the viewport transform is disabled</param> - /// <param name="alphaToCoverageEnable">Indicates whenever alpha-to-coverage is enabled</param> - /// <param name="alphaToCoverageDitherEnable">Indicates whenever alpha-to-coverage dithering is enabled</param> + /// <param name="alphaToCoverageEnable">Indicates whether alpha-to-coverage is enabled</param> + /// <param name="alphaToCoverageDitherEnable">Indicates whether alpha-to-coverage dithering is enabled</param> + /// <param name="viewportTransformDisable">Indicates whether the viewport transform is disabled</param> + /// <param name="depthMode">Depth mode zero to one or minus one to one</param> + /// <param name="programPointSizeEnable">Indicates if the point size is set on the shader or is fixed</param> + /// <param name="pointSize">Point size if not set from shader</param> + /// <param name="alphaTestEnable">Indicates whether alpha test is enabled</param> + /// <param name="alphaTestCompare">When alpha test is enabled, indicates the comparison that decides if the fragment should be discarded</param> + /// <param name="alphaTestReference">When alpha test is enabled, indicates the value to compare with the fragment output alpha</param> + /// <param name="attributeTypes">Type of the vertex attributes consumed by the shader</param> public GpuChannelGraphicsState( bool earlyZForce, PrimitiveTopology topology, TessMode tessellationMode, - bool viewportTransformDisable, bool alphaToCoverageEnable, - bool alphaToCoverageDitherEnable) + bool alphaToCoverageDitherEnable, + bool viewportTransformDisable, + bool depthMode, + bool programPointSizeEnable, + float pointSize, + bool alphaTestEnable, + CompareOp alphaTestCompare, + float alphaTestReference, + ref Array32<AttributeType> attributeTypes) { EarlyZForce = earlyZForce; Topology = topology; TessellationMode = tessellationMode; - ViewportTransformDisable = viewportTransformDisable; AlphaToCoverageEnable = alphaToCoverageEnable; AlphaToCoverageDitherEnable = alphaToCoverageDitherEnable; + ViewportTransformDisable = viewportTransformDisable; + DepthMode = depthMode; + ProgramPointSizeEnable = programPointSizeEnable; + PointSize = pointSize; + AlphaTestEnable = alphaTestEnable; + AlphaTestCompare = alphaTestCompare; + AlphaTestReference = alphaTestReference; + AttributeTypes = attributeTypes; } } }
\ No newline at end of file |