Declare and use gl_PerVertex block for VTG per-vertex built-ins (#5576)

* Declare and use gl_PerVertex block for VTG per-vertex built-ins

* Shader cache version bump
This commit is contained in:
gdkchan 2023-08-16 18:16:25 -03:00 committed by GitHub
parent 0c445184c1
commit 17354d59d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 176 additions and 3 deletions

View file

@ -23,5 +23,18 @@ namespace Ryujinx.Graphics.Shader
{
return stage == ShaderStage.Vertex || stage == ShaderStage.Fragment || stage == ShaderStage.Compute;
}
/// <summary>
/// Checks if the shader stage is vertex, tessellation or geometry.
/// </summary>
/// <param name="stage">Shader stage</param>
/// <returns>True if the shader stage is vertex, tessellation or geometry, false otherwise</returns>
public static bool IsVtg(this ShaderStage stage)
{
return stage == ShaderStage.Vertex ||
stage == ShaderStage.TessellationControl ||
stage == ShaderStage.TessellationEvaluation ||
stage == ShaderStage.Geometry;
}
}
}