aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-09-19 09:38:39 -0300
committerGitHub <noreply@github.com>2021-09-19 14:38:39 +0200
commitf08a280adef015e9a9a0e9273b4edffeb1157f3a (patch)
tree26baeacb8b094e77aa0d8cde15073d12e080305a /Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
parent7379bc2f39557929f283a423fe7f4b7390d08261 (diff)
Use shader subgroup extensions if shader ballot is not supported (#2627)
* Use shader subgroup extensions if shader ballot is not supported * Shader cache version bump + cleanup * The type is still required on the table
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
index 0781678a..ae264d87 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
@@ -1,9 +1,9 @@
float Helper_ShuffleUp(float x, uint index, uint mask, out bool valid)
{
uint segMask = (mask >> 8) & 0x1fu;
- uint minThreadId = gl_SubGroupInvocationARB & segMask;
- uint srcThreadId = gl_SubGroupInvocationARB - index;
+ uint minThreadId = $SUBGROUP_INVOCATION$ & segMask;
+ uint srcThreadId = $SUBGROUP_INVOCATION$ - index;
valid = int(srcThreadId) >= int(minThreadId);
- float v = readInvocationARB(x, srcThreadId);
+ float v = $SUBGROUP_BROADCAST$(x, srcThreadId);
return valid ? v : x;
} \ No newline at end of file