diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-10-01 02:35:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 02:35:52 -0300 |
commit | 9c2500de5ffa76d74e1761be9e6a1e50b36af7c5 (patch) | |
tree | 5c7f443b4cf5d424df67c5e5abfaaa2a71fa28e7 /Ryujinx.Graphics.Shader/Decoders/Decoder.cs | |
parent | dbe43c17199a96e86175c9dd39d6062ce58cefb4 (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/Decoders/Decoder.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Decoders/Decoder.cs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs index 69f9a520..1c329b59 100644 --- a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs +++ b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs @@ -306,18 +306,36 @@ namespace Ryujinx.Graphics.Shader.Decoders for (int elemIndex = 0; elemIndex < count; elemIndex++) { int attr = offset + elemIndex * 4; - if (attr >= AttributeConsts.UserAttributeBase && attr < AttributeConsts.UserAttributeEnd) + + if (perPatch) + { + if (attr >= AttributeConsts.UserAttributePerPatchBase && attr < AttributeConsts.UserAttributePerPatchEnd) + { + int userAttr = attr - AttributeConsts.UserAttributePerPatchBase; + int index = userAttr / 16; + + if (isStore) + { + config.SetOutputUserAttributePerPatch(index); + } + else + { + config.SetInputUserAttributePerPatch(index); + } + } + } + else if (attr >= AttributeConsts.UserAttributeBase && attr < AttributeConsts.UserAttributeEnd) { int userAttr = attr - AttributeConsts.UserAttributeBase; int index = userAttr / 16; if (isStore) { - config.SetOutputUserAttribute(index, perPatch); + config.SetOutputUserAttribute(index); } else { - config.SetInputUserAttribute(index, (userAttr >> 2) & 3, perPatch); + config.SetInputUserAttribute(index, (userAttr >> 2) & 3); } } |