using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.Engine.Threed;
namespace Ryujinx.Graphics.Gpu.Shader
{
/// <summary>
/// State used by the <see cref="GpuAccessor"/>.
/// </summary>
struct GpuChannelGraphicsState
// New fields should be added to the end of the struct to keep disk shader cache compatibility.
/// Early Z force enable.
public readonly bool EarlyZForce;
/// Primitive topology of current draw.
public readonly PrimitiveTopology Topology;
/// Tessellation mode.
public readonly TessMode TessellationMode;
/// Indicates whenever the viewport transform is disabled.
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.
/// <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>
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;
}