forked from Mirror/Ryujinx
Fix gl_in being used with built-in variables that are not per-vertex (#1624)
This commit is contained in:
parent
b4d8d893a4
commit
5264d55b39
2 changed files with 2 additions and 1 deletions
|
@ -206,7 +206,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
|
|
||||||
string name = builtInAttr.Name;
|
string name = builtInAttr.Name;
|
||||||
|
|
||||||
if (config.Stage == ShaderStage.Geometry && !isOutAttr)
|
if (config.Stage == ShaderStage.Geometry && (value & AttributeConsts.SpecialMask) == 0 && !isOutAttr)
|
||||||
{
|
{
|
||||||
name = $"gl_in[{indexExpr}].{name}";
|
name = $"gl_in[{indexExpr}].{name}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
|
|
||||||
// Note: Those attributes are used internally by the translator
|
// Note: Those attributes are used internally by the translator
|
||||||
// only, they don't exist on Maxwell.
|
// only, they don't exist on Maxwell.
|
||||||
|
public const int SpecialMask = 0xff << 24;
|
||||||
public const int FragmentOutputDepth = 0x1000000;
|
public const int FragmentOutputDepth = 0x1000000;
|
||||||
public const int FragmentOutputColorBase = 0x1000010;
|
public const int FragmentOutputColorBase = 0x1000010;
|
||||||
public const int FragmentOutputColorEnd = FragmentOutputColorBase + 8 * 16;
|
public const int FragmentOutputColorEnd = FragmentOutputColorBase + 8 * 16;
|
||||||
|
|
Loading…
Reference in a new issue