diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs index 1a4decf5..9f8dd7df 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs @@ -473,6 +473,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv var attrType = context.TypeVector(context.TypeFP32(), (LiteralInteger)4); attrType = context.TypeArray(attrType, context.Constant(context.TypeU32(), (LiteralInteger)MaxAttributes)); + if (context.Config.Stage == ShaderStage.TessellationControl) + { + attrType = context.TypeArray(attrType, context.Constant(context.TypeU32(), context.Config.ThreadsPerInputPrimitive)); + } + var spvType = context.TypePointer(StorageClass.Output, attrType); var spvVar = context.Variable(spvType, StorageClass.Output); @@ -543,6 +548,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv } } + if (context.Config.Stage == ShaderStage.TessellationControl && isOutAttr && !perPatch) + { + attrType = context.TypeArray(attrType, context.Constant(context.TypeU32(), context.Config.ThreadsPerInputPrimitive)); + } + var spvType = context.TypePointer(storageClass, attrType); var spvVar = context.Variable(spvType, storageClass); @@ -634,6 +644,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv attrType = context.TypeArray(attrType, context.Constant(context.TypeU32(), (LiteralInteger)arraySize)); } + if (context.Config.Stage == ShaderStage.TessellationControl && isOutAttr) + { + attrType = context.TypeArray(attrType, context.Constant(context.TypeU32(), context.Config.ThreadsPerInputPrimitive)); + } + var spvType = context.TypePointer(storageClass, attrType); var spvVar = context.Variable(spvType, storageClass); |
