aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.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/CodeGenContext.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/CodeGenContext.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.cs
index d70a00ed..fe5e11f4 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/CodeGenContext.cs
@@ -382,17 +382,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
public Instruction GetAttributePerPatchElemPointer(int attr, bool isOutAttr, out AggregateType elemType)
{
var storageClass = isOutAttr ? StorageClass.Output : StorageClass.Input;
- var attrInfo = AttributeInfo.From(Config, attr, isOutAttr);
+ var attrInfo = AttributeInfo.FromPatch(Config, attr, isOutAttr);
int attrOffset = attrInfo.BaseValue;
- Instruction ioVariable;
-
- bool isUserAttr = attr >= AttributeConsts.UserAttributeBase && attr < AttributeConsts.UserAttributeEnd;
+ Instruction ioVariable = isOutAttr ? OutputsPerPatch[attrOffset] : InputsPerPatch[attrOffset];
elemType = attrInfo.Type & AggregateType.ElementTypeMask;
- ioVariable = isOutAttr ? OutputsPerPatch[attrOffset] : InputsPerPatch[attrOffset];
-
if ((attrInfo.Type & (AggregateType.Array | AggregateType.Vector)) == 0)
{
return ioVariable;
@@ -404,7 +400,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
public Instruction GetAttributePerPatch(AggregateType type, int attr, bool isOutAttr)
{
- if (!AttributeInfo.Validate(Config, attr, isOutAttr: false))
+ if (!AttributeInfo.ValidatePerPatch(Config, attr, isOutAttr: false))
{
return GetConstant(type, new AstOperand(IrOperandType.Constant, 0));
}