summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTianyu Li <ltyucb@gmail.com>2025-08-21 01:32:13 +0800
committerGitHub <noreply@github.com>2025-08-20 17:32:13 +0000
commit82e3fc9c1064f06780f6449154c7cf8f663fceac (patch)
tree99ad135852e66f8f6d20384ca479f936e2475fcf /tests
parenta26a11ff5c3f14401bbbbbc4b6e3731056618138 (diff)
Add Metal support for WaveGetActiveMask and WaveActiveCountBits (#8218)
## Summary - Add Metal platform support for `WaveGetActiveMask()` and `WaveActiveCountBits()` wave intrinsics - Update capability requirements to include Metal platform for subgroup ballot operations - Implement Metal-specific intrinsic assembly using `simd_ballot()` and `simd_vote` APIs ## Changes - **source/slang/hlsl.meta.slang**: - Add Metal target case for `WaveGetActiveMask()` using `simd_ballot(true)` - Update capability requirements from `cuda_glsl_hlsl_spirv` to `cuda_glsl_hlsl_metal_spirv` for wave ballot functions - **source/slang/slang-capabilities.capdef**: - Add `metal` to `subgroup_ballot_activemask` capability alias
Diffstat (limited to 'tests')
-rw-r--r--tests/hlsl-intrinsic/wave-active-count-bits.slang1
-rw-r--r--tests/hlsl-intrinsic/wave-mask/wave-get-active.slang1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/wave-active-count-bits.slang b/tests/hlsl-intrinsic/wave-active-count-bits.slang
index a7aa48687..7e8da0907 100644
--- a/tests/hlsl-intrinsic/wave-active-count-bits.slang
+++ b/tests/hlsl-intrinsic/wave-active-count-bits.slang
@@ -5,6 +5,7 @@
//TEST:COMPARE_COMPUTE_EX:-slang -compute -cuda -profile cs_6_0 -shaderobj -render-feature hardware-device
//TEST(vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -render-feature hardware-device
//TEST:COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 -shaderobj
+//TEST:COMPARE_COMPUTE_EX:-metal -compute -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer;
diff --git a/tests/hlsl-intrinsic/wave-mask/wave-get-active.slang b/tests/hlsl-intrinsic/wave-mask/wave-get-active.slang
index 91debe999..2ff9ef9e3 100644
--- a/tests/hlsl-intrinsic/wave-mask/wave-get-active.slang
+++ b/tests/hlsl-intrinsic/wave-mask/wave-get-active.slang
@@ -4,6 +4,7 @@
//TEST:COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 -shaderobj
//TEST(vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
//TEST:COMPARE_COMPUTE_EX:-cuda -compute -shaderobj
+//TEST:COMPARE_COMPUTE_EX:-metal -compute -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer;