yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

venkataram-nvAdd intrinsic for `IsHelperLane()` in HLSL (#4471)e2b56d015

master
708 B20 linesraw
1//TEST:SIMPLE(filecheck=HLSL): -entry main -target hlsl -stage fragment
2//TEST:SIMPLE(filecheck=GLSL): -entry main -target glsl -stage fragment
3//TEST:SIMPLE(filecheck=METAL): -entry main -target metal -stage fragment
4//TEST:SIMPLE(filecheck=SPIRV): -entry main -target spirv -stage fragment
5//TEST:SIMPLE(filecheck=SPIRV): -entry main -target spirv-asm -stage fragment
6
7float4 main() : SV_Target
8{
9    //HLSL: IsHelperLane()
10
11    //GLSL: GL_EXT_demote_to_helper_invocation
12    //GLSL: gl_HelperInvocation()
13
14    //METAL: simd_is_helper_thread()
15
16    //SPIRV: DemoteToHelperInvocation
17    //SPIRV: SPV_EXT_demote_to_helper_invocation
18    //SPIRV: OpIsHelperInvocationEXT
19    return float4(IsHelperLane());
20}