diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-01-27 20:59:47 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-28 10:59:47 +1100 |
| commit | 4b7c7dab9e33faaf4eb58342f1f7ad8ada354591 (patch) | |
| tree | d912e9e3434fb3ba53afad5fee216eadde731cc6 /Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl | |
| parent | dcce4070719a3798bb96d3aa02b9ba02a7fecc16 (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/ShuffleDown.glsl')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl index 46750f20..a79b90e2 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/ShuffleDown.glsl @@ -1,9 +1,10 @@ -float Helper_ShuffleDown(float x, uint index, uint mask) +float Helper_ShuffleDown(float x, uint index, uint mask, out bool valid) { uint clamp = mask & 0x1fu; uint segMask = (mask >> 8) & 0x1fu; uint minThreadId = gl_SubGroupInvocationARB & segMask; uint maxThreadId = minThreadId | (clamp & ~segMask); uint srcThreadId = gl_SubGroupInvocationARB + index; - return (srcThreadId <= maxThreadId) ? readInvocationARB(x, srcThreadId) : x; + valid = srcThreadId <= maxThreadId; + return valid ? readInvocationARB(x, srcThreadId) : x; }
\ No newline at end of file |
