ShaderStage.cs 747 B

123456789101112131415161718192021222324252627
  1. namespace Ryujinx.Graphics.Shader
  2. {
  3. public enum ShaderStage : byte
  4. {
  5. Compute,
  6. Vertex,
  7. TessellationControl,
  8. TessellationEvaluation,
  9. Geometry,
  10. Fragment,
  11. Count
  12. }
  13. public static class ShaderStageExtensions
  14. {
  15. /// <summary>
  16. /// Checks if the shader stage supports render scale.
  17. /// </summary>
  18. /// <param name="stage">Shader stage</param>
  19. /// <returns>True if the shader stage supports render scale, false otherwise</returns>
  20. public static bool SupportsRenderScale(this ShaderStage stage)
  21. {
  22. return stage == ShaderStage.Vertex || stage == ShaderStage.Fragment || stage == ShaderStage.Compute;
  23. }
  24. }
  25. }