From b46b63e06a36845175f68331edb5ddeeb34de27b Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 5 Jul 2022 19:58:36 -0300 Subject: Add support for alpha to coverage dithering (#3069) * Add support for alpha to coverage dithering * Shader cache version bump * Fix wrong alpha register * Ensure support buffer is cleared * New shader specialization based approach --- .../Shader/GpuChannelGraphicsState.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs') diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs b/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs index 92ec117f..fae670ea 100644 --- a/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs +++ b/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs @@ -30,6 +30,16 @@ namespace Ryujinx.Graphics.Gpu.Shader /// public readonly bool ViewportTransformDisable; + /// + /// Indicates whenever alpha-to-coverage is enabled. + /// + public readonly bool AlphaToCoverageEnable; + + /// + /// Indicates whenever alpha-to-coverage dithering is enabled. + /// + public readonly bool AlphaToCoverageDitherEnable; + /// /// Creates a new GPU graphics state. /// @@ -37,12 +47,22 @@ namespace Ryujinx.Graphics.Gpu.Shader /// Primitive topology /// Tessellation mode /// Indicates whenever the viewport transform is disabled - public GpuChannelGraphicsState(bool earlyZForce, PrimitiveTopology topology, TessMode tessellationMode, bool viewportTransformDisable) + /// Indicates whenever alpha-to-coverage is enabled + /// Indicates whenever alpha-to-coverage dithering is enabled + public GpuChannelGraphicsState( + bool earlyZForce, + PrimitiveTopology topology, + TessMode tessellationMode, + bool viewportTransformDisable, + bool alphaToCoverageEnable, + bool alphaToCoverageDitherEnable) { EarlyZForce = earlyZForce; Topology = topology; TessellationMode = tessellationMode; ViewportTransformDisable = viewportTransformDisable; + AlphaToCoverageEnable = alphaToCoverageEnable; + AlphaToCoverageDitherEnable = alphaToCoverageDitherEnable; } } } \ No newline at end of file -- cgit v1.2.3