mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-20 15:30:17 +00:00
24 lines
No EOL
741 B
C#
24 lines
No EOL
741 B
C#
using Ryujinx.Common.Logging;
|
|
using Ryujinx.Graphics.Shader.StructuredIr;
|
|
using Ryujinx.Graphics.Shader.Translation;
|
|
|
|
namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|
{
|
|
static class MslGenerator
|
|
{
|
|
public static string Generate(StructuredProgramInfo info, ShaderConfig config)
|
|
{
|
|
if (config.Stage is not (ShaderStage.Vertex or ShaderStage.Fragment or ShaderStage.Compute))
|
|
{
|
|
Logger.Warning?.Print(LogClass.Gpu, $"Attempted to generate unsupported shader type {config.Stage}!");
|
|
return "";
|
|
}
|
|
|
|
CodeGenContext context = new(info, config);
|
|
|
|
Declarations.Declare(context, info);
|
|
|
|
return context.GetCode();
|
|
}
|
|
}
|
|
} |