From e2b56d015e9cd6c9401e38aff9a303121d50c1e1 Mon Sep 17 00:00:00 2001 From: venkataram-nv Date: Tue, 25 Jun 2024 15:26:51 -0700 Subject: Add intrinsic for `IsHelperLane()` in HLSL (#4471) Add InHelperLane() intrinsic for HLSL, GLSL, Metal and Spirv. --- tests/hlsl-intrinsic/helper-lane.slang | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/hlsl-intrinsic/helper-lane.slang (limited to 'tests') 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()); +} -- cgit v1.2.3