Simplify shader uniform buffer access codegen

This commit is contained in:
gdk 2019-11-24 14:20:48 -03:00 committed by Thog
parent 16d88c21fc
commit 1df78e7ad6
3 changed files with 18 additions and 25 deletions

View file

@ -206,13 +206,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
context.CBufferDescriptors.Add(new BufferDescriptor(ubName, cbufSlot));
context.AppendLine("layout (std140) uniform " + ubName);
context.AppendLine("uniform " + ubName);
context.EnterScope();
string ubSize = "[" + NumberFormatter.FormatInt(Constants.ConstantBufferSize / 16) + "]";
string ubSize = "[" + NumberFormatter.FormatInt(Constants.ConstantBufferSize / 4) + "]";
context.AppendLine("vec4 " + OperandManager.GetUbName(context.Config.Stage, cbufSlot) + ubSize + ";");
context.AppendLine("precise float " + OperandManager.GetUbName(context.Config.Stage, cbufSlot) + ubSize + ";");
context.LeaveScope(";");
}