mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +00:00
22 lines
819 B
C#
22 lines
819 B
C#
using System;
|
|
using static Spv.Specification;
|
|
|
|
namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|
{
|
|
static class EnumConversion
|
|
{
|
|
public static ExecutionModel Convert(this ShaderStage stage)
|
|
{
|
|
return stage switch
|
|
{
|
|
ShaderStage.Compute => ExecutionModel.GLCompute,
|
|
ShaderStage.Vertex => ExecutionModel.Vertex,
|
|
ShaderStage.TessellationControl => ExecutionModel.TessellationControl,
|
|
ShaderStage.TessellationEvaluation => ExecutionModel.TessellationEvaluation,
|
|
ShaderStage.Geometry => ExecutionModel.Geometry,
|
|
ShaderStage.Fragment => ExecutionModel.Fragment,
|
|
_ => throw new ArgumentException($"Invalid shader stage \"{stage}\".")
|
|
};
|
|
}
|
|
}
|
|
}
|