From 0f6ec446ea3be41b1c22aa5c3870bd7a6c595d1f Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 11 Aug 2021 16:33:43 -0300 Subject: Replace BGRA and scale uniforms with a uniform block (#2496) * Replace BGRA and scale uniforms with a uniform block * Setting the data again on program change is no longer needed * Optimize and resolve some warnings * Avoid redundant support buffer updates * Some optimizations to BindBuffers (now inlined) * Unify render scale arrays --- Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine') diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs index 4ff084e9..d9484cf6 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs @@ -957,9 +957,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed UpdateUserClipState(); } - int storageBufferBindingsCount = 0; - int uniformBufferBindingsCount = 0; - for (int stage = 0; stage < Constants.ShaderStages; stage++) { ShaderProgramInfo info = gs.Shaders[stage]?.Info; @@ -1015,21 +1012,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed _channel.BufferManager.SetGraphicsStorageBufferBindings(stage, info.SBuffers); _channel.BufferManager.SetGraphicsUniformBufferBindings(stage, info.CBuffers); - - if (info.SBuffers.Count != 0) - { - storageBufferBindingsCount = Math.Max(storageBufferBindingsCount, info.SBuffers.Max(x => x.Binding) + 1); - } - - if (info.CBuffers.Count != 0) - { - uniformBufferBindingsCount = Math.Max(uniformBufferBindingsCount, info.CBuffers.Max(x => x.Binding) + 1); - } } - _channel.BufferManager.SetGraphicsStorageBufferBindingsCount(storageBufferBindingsCount); - _channel.BufferManager.SetGraphicsUniformBufferBindingsCount(uniformBufferBindingsCount); - _context.Renderer.Pipeline.SetProgram(gs.HostProgram); } -- cgit v1.2.3