Simplify shader uniform buffer access codegen
This commit is contained in:
parent
16d88c21fc
commit
1df78e7ad6
3 changed files with 18 additions and 25 deletions
|
@ -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(";");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue