aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-01-26 21:26:23 -0300
committerGitHub <noreply@github.com>2021-01-27 11:26:23 +1100
commita8e9dd2f839bdcd20ec9b32b8647ce2a83e50ecb (patch)
treef99d8c8c92cd83ef9666361593c14f2194be321e /Ryujinx.Graphics.Shader/CodeGen
parentcaf049ed15f1c22d55aacfab79019538b2587e11 (diff)
Fix regression on shader atomic SSBO operations (#1967)
* Fix regression on shader atomic SSBO operations * Update comment
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
index 7d0f1aa5..622ac646 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
@@ -44,7 +44,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
{
// For shared memory access, the second argument is unused and should be ignored.
// It is there to make both storage and shared access have the same number of arguments.
- if (argIndex == 1 && (inst & Instruction.MrMask) == Instruction.MrShared)
+ // For storage, both inputs are consumed when the argument index is 0, so we should skip it here.
+ if (argIndex == 1 && (atomic || (inst & Instruction.MrMask) == Instruction.MrShared))
{
continue;
}