aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-09-10 10:20:23 -0300
committerGitHub <noreply@github.com>2022-09-10 13:20:23 +0000
commit619ac86bd03fcafdcae19f8fc5ad7d90780c194b (patch)
tree81638c9e0d617d7139c9924d9a5de3fa4bf1c33e /Ryujinx.Graphics.Shader/Translation
parent7a1ab71c7376bcc3d043c09c9ac1172637955e54 (diff)
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
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs5
1 files changed, 5 insertions, 0 deletions
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;
}