aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Program.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-10 11:03:38 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commitd274328c3192fd85b9eec661b00f1599d673776c (patch)
tree0d947cbb00c42d85af4af4bc41422d896f493004 /Ryujinx.Graphics.OpenGL/Program.cs
parentd620aa7d1b39177b0c549c3e7a1a5736a980912f (diff)
Fix image units bindings and shader dump in the presence of NOPs
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Program.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Program.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Program.cs b/Ryujinx.Graphics.OpenGL/Program.cs
index 61b1645a..820910a9 100644
--- a/Ryujinx.Graphics.OpenGL/Program.cs
+++ b/Ryujinx.Graphics.OpenGL/Program.cs
@@ -79,6 +79,7 @@ namespace Ryujinx.Graphics.OpenGL
int ubBindingPoint = 1;
int sbBindingPoint = 0;
int textureUnit = 0;
+ int imageUnit = 0;
for (int index = 0; index < shaders.Length; index++)
{
@@ -151,13 +152,13 @@ namespace Ryujinx.Graphics.OpenGL
continue;
}
- GL.Uniform1(location, textureUnit);
+ GL.Uniform1(location, imageUnit);
int uIndex = (int)shader.Stage << ImgStageShift | imageIndex++;
- _textureUnits[uIndex] = textureUnit;
+ _imageUnits[uIndex] = imageUnit;
- textureUnit++;
+ imageUnit++;
}
}
}
@@ -184,7 +185,7 @@ namespace Ryujinx.Graphics.OpenGL
public int GetImageUnit(ShaderStage stage, int index)
{
- return _textureUnits[(int)stage << ImgStageShift | index];
+ return _imageUnits[(int)stage << ImgStageShift | index];
}
private void CheckProgramLink()