aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-10-01 02:35:52 -0300
committerGitHub <noreply@github.com>2022-10-01 02:35:52 -0300
commit9c2500de5ffa76d74e1761be9e6a1e50b36af7c5 (patch)
tree5c7f443b4cf5d424df67c5e5abfaaa2a71fa28e7 /Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs
parentdbe43c17199a96e86175c9dd39d6062ce58cefb4 (diff)
Fix incorrect tessellation inputs/outputs (#3728)1.1.283
* Fix incorrect tessellation inputs/outputs * Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs
index 23c6af81..fad7f9b8 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/SpirvGenerator.cs
@@ -191,7 +191,15 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
break;
}
- if (context.Config.GpuAccessor.QueryTessCw())
+ bool tessCw = context.Config.GpuAccessor.QueryTessCw();
+
+ if (context.Config.Options.TargetApi == TargetApi.Vulkan)
+ {
+ // We invert the front face on Vulkan backend, so we need to do that here aswell.
+ tessCw = !tessCw;
+ }
+
+ if (tessCw)
{
context.AddExecutionMode(spvFunc, ExecutionMode.VertexOrderCw);
}
@@ -375,9 +383,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
}
else if (dest.Type == OperandType.Attribute || dest.Type == OperandType.AttributePerPatch)
{
- if (AttributeInfo.Validate(context.Config, dest.Value, isOutAttr: true))
+ bool perPatch = dest.Type == OperandType.AttributePerPatch;
+
+ if (AttributeInfo.Validate(context.Config, dest.Value, isOutAttr: true, perPatch))
{
- bool perPatch = dest.Type == OperandType.AttributePerPatch;
AggregateType elemType;
var elemPointer = perPatch