aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-12-08 14:08:07 -0300
committerGitHub <noreply@github.com>2022-12-08 14:08:07 -0300
commit8428bb6541d300d82522fd19c2ef3e6f2ba52ece (patch)
tree35dbb4f92c572601a28281d08e8de8858360a609 /Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl
parent9a0330f7f8d6c45de3b88afbe3e86e5fa3878e8e (diff)
Fix shader FSWZADD instruction (#4069)1.1.451
* Fix shader FSWZADD instruction * Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl
index ed00dfec..057cb6ca 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/SwizzleAdd.glsl
@@ -2,6 +2,6 @@ float Helper_SwizzleAdd(float x, float y, int mask)
{
vec4 xLut = vec4(1.0, -1.0, 1.0, 0.0);
vec4 yLut = vec4(1.0, 1.0, -1.0, 1.0);
- int lutIdx = mask >> int($SUBGROUP_INVOCATION$ & 3u) * 2;
+ int lutIdx = (mask >> (int($SUBGROUP_INVOCATION$ & 3u) * 2)) & 3;
return x * xLut[lutIdx] + y * yLut[lutIdx];
} \ No newline at end of file