summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDarren Wihandi <65404740+fairywreath@users.noreply.github.com>2025-04-22 14:04:56 -0600
committerGitHub <noreply@github.com>2025-04-22 20:04:56 +0000
commited5940a629ae05e9571bfe355d22f0728347dcb4 (patch)
tree90a36c6543f0ee3748b80112a478897b027dddab /docs
parentd5220b327632a8aeeb9a89494bb37bd82fec30cb (diff)
Implement shader subgroup rotate intrinsics (#6878)
* Initial implementation for SPIRV, GLSL and Metal * test add bool test * Fix and improve subgroup rotate tests * Add proper GLSL extensions and proper Metal type checking * Clean up tests and add diagnostics test for subgroup type for Metal * Update wave-intrinsics docs
Diffstat (limited to 'docs')
-rw-r--r--docs/user-guide/a3-02-reference-capability-atoms.md12
-rw-r--r--docs/wave-intrinsics.md14
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/user-guide/a3-02-reference-capability-atoms.md b/docs/user-guide/a3-02-reference-capability-atoms.md
index 296614716..a9455761c 100644
--- a/docs/user-guide/a3-02-reference-capability-atoms.md
+++ b/docs/user-guide/a3-02-reference-capability-atoms.md
@@ -407,6 +407,9 @@ Extensions
`SPV_NV_shader_subgroup_partitioned`
> Represents the SPIR-V extension for shader subgroup partitioned.
+`SPV_KHR_subgroup_rotate`
+> Represents the SPIR-V extension enables rotating values across invocations within a subgroup.
+
`SPV_NV_ray_tracing_motion_blur`
> Represents the SPIR-V extension for ray tracing motion blur.
@@ -501,6 +504,9 @@ Extensions
`spvGroupNonUniformPartitionedNV`
> Represents the SPIR-V capability for group non-uniform partitioned operations.
+`spvGroupNonUniformRotateKHR`
+> Represents the SPIR-V capability for group non-uniform rotate operations.
+
`spvRayTracingMotionBlurNV`
> Represents the SPIR-V capability for ray tracing motion blur.
@@ -699,6 +705,9 @@ Extensions
`GL_KHR_shader_subgroup_vote`
> Represents the GL_KHR_shader_subgroup_vote extension.
+`GL_KHR_shader_subgroup_rotate`
+> Represents the GL_KHR_shader_subgroup_rotate extension.
+
`GL_NV_compute_shader_derivatives`
> Represents the GL_NV_compute_shader_derivatives extension.
@@ -1132,6 +1141,9 @@ Compound Capabilities
`subgroup_partitioned`
> Capabilities required to use GLSL-style subgroup operations 'subgroup_partitioned'
+`subgroup_rotate`
+> Capabilities required to use GLSL-style subgroup rotate operations 'subgroup_rotate'
+
`atomic_glsl_hlsl_nvapi_cuda_metal_float1`
> (All implemented targets) Capabilities required to use atomic operations of GLSL tier-1 float atomics
diff --git a/docs/wave-intrinsics.md b/docs/wave-intrinsics.md
index aa46f72a1..7f6fb7b77 100644
--- a/docs/wave-intrinsics.md
+++ b/docs/wave-intrinsics.md
@@ -236,6 +236,20 @@ void GroupMemoryBarrierWithWaveSync();
Synchronizes all lanes to the same GroupMemoryBarrierWithWaveSync in program flow. Orders group shared memory accesses such that accesses after the barrier can be seen by writes before.
+Wave Rotate Intrinsics
+======================
+
+These intrinsics are specific to Slang and were added to support the subgroup rotate functionalities provided by SPIRV (through the `GroupNonUniformRotateKHR` capability), GLSL (through the `GL_KHR_shader_subgroup_rotate
+` extension), and Metal.
+
+```
+// Supported on SPIRV, GLSL, and Metal targets.
+T WaveRotate(T value, uint delta);
+
+// Supported on SPIRV and GLSL targets.
+T WaveClusteredRotate(T value, uint delta, constexpr uint clusterSize);
+```
+
Wave Mask Intrinsics
====================