From 1df78e7ad65459d990fa2dcf391da1296dfd886c Mon Sep 17 00:00:00 2001 From: gdk Date: Sun, 24 Nov 2019 14:20:48 -0300 Subject: Simplify shader uniform buffer access codegen --- Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs index e8b44961..bedfbaee 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs @@ -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(";"); } -- cgit v1.2.3