diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-08-11 16:33:43 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 21:33:43 +0200 |
| commit | 0f6ec446ea3be41b1c22aa5c3870bd7a6c595d1f (patch) | |
| tree | e441560dbdd560e9a020bb4b7606d3cd0698da02 /Ryujinx.Graphics.Gpu/Engine | |
| parent | b5b7e23fc41e7045f9e803d6926e98ec7d049f0c (diff) | |
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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 16 |
1 files changed, 0 insertions, 16 deletions
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); } |
