diff options
| author | venkataram-nv <vedavamadath@nvidia.com> | 2024-06-25 15:26:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-25 15:26:51 -0700 |
| commit | e2b56d015e9cd6c9401e38aff9a303121d50c1e1 (patch) | |
| tree | de167af979aac566cd482d4960f5582ad69e7a84 /tests | |
| parent | 8d2f6e4ddceb83009bb5f6b3d49001a2fd3cd761 (diff) | |
Add intrinsic for `IsHelperLane()` in HLSL (#4471)
Add InHelperLane() intrinsic for HLSL, GLSL, Metal and Spirv.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hlsl-intrinsic/helper-lane.slang | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/helper-lane.slang b/tests/hlsl-intrinsic/helper-lane.slang new file mode 100644 index 000000000..316bda5f9 --- /dev/null +++ b/tests/hlsl-intrinsic/helper-lane.slang @@ -0,0 +1,20 @@ +//TEST:SIMPLE(filecheck=HLSL): -entry main -target hlsl -stage fragment +//TEST:SIMPLE(filecheck=GLSL): -entry main -target glsl -stage fragment +//TEST:SIMPLE(filecheck=METAL): -entry main -target metal -stage fragment +//TEST:SIMPLE(filecheck=SPIRV): -entry main -target spirv -stage fragment +//TEST:SIMPLE(filecheck=SPIRV): -entry main -target spirv-asm -stage fragment + +float4 main() : SV_Target +{ + //HLSL: IsHelperLane() + + //GLSL: GL_EXT_demote_to_helper_invocation + //GLSL: gl_HelperInvocation() + + //METAL: simd_is_helper_thread() + + //SPIRV: DemoteToHelperInvocation + //SPIRV: SPV_EXT_demote_to_helper_invocation + //SPIRV: OpIsHelperInvocationEXT + return float4(IsHelperLane()); +} |
