mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-29 03:53:05 +00:00
Warn when generating unsupported shader
This commit is contained in:
parent
d0d5c76f06
commit
27effab989
3 changed files with 9 additions and 3 deletions
|
@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
public CodeGenContext(StructuredProgramInfo info, ShaderConfig config)
|
public CodeGenContext(StructuredProgramInfo info, ShaderConfig config)
|
||||||
{
|
{
|
||||||
Info = info;
|
Info = info;
|
||||||
Config = Config;
|
Config = config;
|
||||||
|
|
||||||
_sb = new StringBuilder();
|
_sb = new StringBuilder();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using Ryujinx.Graphics.Shader.CodeGen.Glsl;
|
|
||||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||||
using Ryujinx.Graphics.Shader.Translation;
|
using Ryujinx.Graphics.Shader.Translation;
|
||||||
|
|
||||||
|
@ -7,7 +8,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
public static string Generate(StructuredProgramInfo info, ShaderConfig config)
|
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);
|
Declarations.Declare(context, info);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue