1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-21 07:12:01 +00:00

Do not initialize geometry shader passthrough attributes (#3196)

This commit is contained in:
gdkchan 2022-03-14 19:35:41 -03:00 committed by GitHub
parent aac7bbd378
commit 1f93fd52d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,10 +218,17 @@ namespace Ryujinx.Graphics.Shader.Translation
while (usedAttributes != UInt128.Zero) while (usedAttributes != UInt128.Zero)
{ {
int index = usedAttributes.TrailingZeroCount(); int index = usedAttributes.TrailingZeroCount();
int vecIndex = index / 4;
InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: false);
usedAttributes &= ~UInt128.Pow2(index); usedAttributes &= ~UInt128.Pow2(index);
// We don't need to initialize passthrough attributes.
if ((context.Config.PassthroughAttributes & (1 << vecIndex)) != 0)
{
continue;
}
InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: false);
} }
UInt128 usedAttributesPerPatch = context.Config.NextInputAttributesPerPatchComponents; UInt128 usedAttributesPerPatch = context.Config.NextInputAttributesPerPatchComponents;