From 619ac86bd03fcafdcae19f8fc5ad7d90780c194b Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 10 Sep 2022 10:20:23 -0300 Subject: Do not output ViewportIndex on SPIR-V if GPU does not support it (#3644) * Do not output ViewportIndex on SPIR-V if GPU does not support it * Bump shader cache version --- Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Ryujinx.Graphics.Shader/Translation') diff --git a/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs b/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs index 2a97ee52..6680a332 100644 --- a/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs +++ b/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs @@ -78,6 +78,11 @@ namespace Ryujinx.Graphics.Shader.Translation public static bool Validate(ShaderConfig config, int value, bool isOutAttr) { + if (value == AttributeConsts.ViewportIndex && !config.GpuAccessor.QueryHostSupportsViewportIndex()) + { + return false; + } + return From(config, value, isOutAttr).IsValid; } -- cgit v1.2.3