aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-07-28 19:01:11 -0300
committerGitHub <noreply@github.com>2020-07-29 08:01:11 +1000
commit991784868f278b62f7e847321f0cfd7309fe2f79 (patch)
treed861d050233c3c54f8c8dc3dc64d3f4e002ca427 /Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs
parent43c13057da7726c324f2b5d674e5e1308eb1f6a7 (diff)
Fix shader regression on Intel iGPUs by reverting layout changes (#1425)
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs
index 2105560a..673fe6a3 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/GlslGenerator.cs
@@ -56,10 +56,17 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
continue;
}
- context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_x = 0;");
- context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_y = 0;");
- context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_z = 0;");
- context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_w = 0;");
+ if ((context.Config.Flags & TranslationFlags.Feedback) != 0)
+ {
+ context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_x = 0;");
+ context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_y = 0;");
+ context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_z = 0;");
+ context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_w = 0;");
+ }
+ else
+ {
+ context.AppendLine($"{DefaultNames.OAttributePrefix}{attr} = vec4(0);");
+ }
}
}
@@ -123,7 +130,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
if (assignment.Destination is AstOperand operand && operand.Type == OperandType.Attribute)
{
- dest = OperandManager.GetOutAttributeName(operand, context.Config.Stage);
+ dest = OperandManager.GetOutAttributeName(operand, context.Config);
}
else
{