Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins (#2817)
* Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins * Shader cache version bump * Fix back color value on fragment shader * Disable IPA multiplication for fixed function attributes and back color selection
This commit is contained in:
parent
3dee712164
commit
911ea38e93
8 changed files with 220 additions and 38 deletions
|
@ -232,6 +232,22 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
|
||||
usedAttributesPerPatch &= ~(1 << index);
|
||||
}
|
||||
|
||||
if (config.NextUsesFixedFuncAttributes)
|
||||
{
|
||||
for (int i = 0; i < 4 + AttributeConsts.TexCoordCount; i++)
|
||||
{
|
||||
int index = config.GetFreeUserAttribute(isOutput: true, i);
|
||||
if (index < 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
InitializeOutput(context, AttributeConsts.UserAttributeBase + index * 16, perPatch: false);
|
||||
|
||||
config.SetOutputUserAttributeFixedFunc(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void InitializeOutput(EmitterContext context, int baseAttr, bool perPatch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue