0
0
Fork 0

Fix default value for unwritten shader outputs (#2412)

* Fix shader default output values

* Shader cache version bump
This commit is contained in:
gdkchan 2021-06-25 19:56:03 -03:00 committed by GitHub
parent ed2f5ede0f
commit 493648df31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -36,7 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
/// <summary>
/// Version of the codegen (to be changed when codegen or guest format change).
/// </summary>
private const ulong ShaderCodeGenVersion = 2404;
private const ulong ShaderCodeGenVersion = 2412;
// Progress reporting helpers
private volatile int _shaderCount;

View file

@ -76,14 +76,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
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;");
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_x = 0.0;");
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_y = 0.0;");
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_z = 0.0;");
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr}_w = 1.0;");
}
else
{
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr} = vec4(0);");
context.AppendLine($"{DefaultNames.OAttributePrefix}{attr} = vec4(0.0, 0.0, 0.0, 1.0);");
}
}
}