aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-01-27 20:59:47 -0300
committerGitHub <noreply@github.com>2021-01-28 10:59:47 +1100
commit4b7c7dab9e33faaf4eb58342f1f7ad8ada354591 (patch)
treed912e9e3434fb3ba53afad5fee216eadde731cc6 /Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
parentdcce4070719a3798bb96d3aa02b9ba02a7fecc16 (diff)
Support multiple destination operands on shader IR and shuffle predicates (#1964)
* Support multiple destination operands on shader IR and shuffle predicates * Cache version change
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
index 2bc83469..4e74f217 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleUp.glsl
@@ -1,8 +1,9 @@
-float Helper_ShuffleUp(float x, uint index, uint mask)
+float Helper_ShuffleUp(float x, uint index, uint mask, out bool valid)
{
uint clamp = mask & 0x1fu;
uint segMask = (mask >> 8) & 0x1fu;
uint minThreadId = gl_SubGroupInvocationARB & segMask;
uint srcThreadId = gl_SubGroupInvocationARB - index;
- return (srcThreadId >= minThreadId) ? readInvocationARB(x, srcThreadId) : x;
+ valid = srcThreadId >= minThreadId;
+ return valid ? readInvocationARB(x, srcThreadId) : x;
} \ No newline at end of file