namespace Ryujinx.Graphics.Shader
{
public enum ShaderStage : byte
{
Compute,
Vertex,
TessellationControl,
TessellationEvaluation,
Geometry,
Fragment,
Count,
}
public static class ShaderStageExtensions
{
///
/// Checks if the shader stage supports render scale.
///
/// Shader stage
/// True if the shader stage supports render scale, false otherwise
public static bool SupportsRenderScale(this ShaderStage stage)
{
return stage == ShaderStage.Vertex || stage == ShaderStage.Fragment || stage == ShaderStage.Compute;
}
///
/// Checks if the shader stage is vertex, tessellation or geometry.
///
/// Shader stage
/// True if the shader stage is vertex, tessellation or geometry, false otherwise
public static bool IsVtg(this ShaderStage stage)
{
return stage == ShaderStage.Vertex ||
stage == ShaderStage.TessellationControl ||
stage == ShaderStage.TessellationEvaluation ||
stage == ShaderStage.Geometry;
}
}
}