Warn when generating unsupported shader
This commit is contained in:
parent
d0d5c76f06
commit
27effab989
3 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||
using Ryujinx.Graphics.Shader.Translation;
|
||||
|
||||
|
@ -7,7 +8,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||
{
|
||||
public static string Generate(StructuredProgramInfo info, ShaderConfig config)
|
||||
{
|
||||
CodeGenContext context = new CodeGenContext(info, 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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue