aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/Translator.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/Translation/Translator.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/Translation/Translator.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/Translator.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Translator.cs b/Ryujinx.Graphics.Shader/Translation/Translator.cs
index 8657c0f7..78fd9498 100644
--- a/Ryujinx.Graphics.Shader/Translation/Translator.cs
+++ b/Ryujinx.Graphics.Shader/Translation/Translator.cs
@@ -204,14 +204,12 @@ namespace Ryujinx.Graphics.Shader.Translation
InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: false);
}
- UInt128 usedAttributesPerPatch = context.Config.NextInputAttributesPerPatchComponents;
- while (usedAttributesPerPatch != UInt128.Zero)
+ if (context.Config.NextUsedInputAttributesPerPatch != null)
{
- int index = usedAttributesPerPatch.TrailingZeroCount();
-
- InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: true);
-
- usedAttributesPerPatch &= ~UInt128.Pow2(index);
+ foreach (int vecIndex in context.Config.NextUsedInputAttributesPerPatch.OrderBy(x => x))
+ {
+ InitializeOutput(context, AttributeConsts.UserAttributePerPatchBase + vecIndex * 16, perPatch: true);
+ }
}
if (config.NextUsesFixedFuncAttributes)
@@ -236,7 +234,7 @@ namespace Ryujinx.Graphics.Shader.Translation
for (int c = 0; c < 4; c++)
{
int attrOffset = baseAttr + c * 4;
- context.Copy(perPatch ? AttributePerPatch(attrOffset) : Attribute(attrOffset), ConstF(c == 3 ? 1f : 0f));
+ InitializeOutputComponent(context, attrOffset, perPatch);
}
}