From 73e68edd09cc322579ec832576f766c836851fdf Mon Sep 17 00:00:00 2001 From: gdk Date: Sun, 24 Nov 2019 19:49:19 -0300 Subject: Revert "Simplify shader uniform buffer access codegen" This reverts commit 2fe9ebaf118d690be8d0cb302529dd359d7c402b. --- 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 bedfbaee..e8b44961 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("uniform " + ubName); + context.AppendLine("layout (std140) uniform " + ubName); context.EnterScope(); - string ubSize = "[" + NumberFormatter.FormatInt(Constants.ConstantBufferSize / 4) + "]"; + string ubSize = "[" + NumberFormatter.FormatInt(Constants.ConstantBufferSize / 16) + "]"; - context.AppendLine("precise float " + OperandManager.GetUbName(context.Config.Stage, cbufSlot) + ubSize + ";"); + context.AppendLine("vec4 " + OperandManager.GetUbName(context.Config.Stage, cbufSlot) + ubSize + ";"); context.LeaveScope(";"); } -- cgit v1.2.3