aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-08-11 16:33:43 -0300
committerGitHub <noreply@github.com>2021-08-11 21:33:43 +0200
commit0f6ec446ea3be41b1c22aa5c3870bd7a6c595d1f (patch)
treee441560dbdd560e9a020bb4b7606d3cd0698da02 /Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs
parentb5b7e23fc41e7045f9e803d6926e98ec7d049f0c (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.Shader/Translation/TranslationCounts.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs b/Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs
index 18f4725d..6751d7ea 100644
--- a/Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs
+++ b/Ryujinx.Graphics.Shader/Translation/TranslationCounts.cs
@@ -7,6 +7,12 @@ namespace Ryujinx.Graphics.Shader.Translation
public int TexturesCount { get; private set; }
public int ImagesCount { get; private set; }
+ public TranslationCounts()
+ {
+ // The first binding is reserved for the support buffer.
+ UniformBuffersCount = 1;
+ }
+
internal int IncrementUniformBuffersCount()
{
return UniformBuffersCount++;