mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-10 04:07:49 +02:00
Move solution and projects to src
This commit is contained in:
22
src/Ryujinx.Graphics.Shader/CodeGen/Spirv/EnumConversion.cs
Normal file
22
src/Ryujinx.Graphics.Shader/CodeGen/Spirv/EnumConversion.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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}\".")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user