yum-mirror/slang

Making it easier to work with shaders

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

Yong HeMake fvk-invert-y work on mesh shader ouptuts. (#5760)bd50f9947

master
632 B24 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -fvk-invert-y
2
3// CHECK: %[[CONST:[0-9]+]] = OpConstantComposite %v4float %float_0 %float_n1 %float_0 %float_0
4// CHECK: OpStore {{.*}} %[[CONST]]
5
6struct PS_IN
7{
8	float4 vPositionPs : SV_Position;
9};
10
11[ shader("mesh") ]
12[ outputtopology( "line" ) ]
13[ numthreads( 64, 1, 1 ) ]
14void main(
15	uint nThreadId : SV_DispatchThreadID,
16	uint nGroupThreadId : SV_GroupThreadID,
17	uint nGroupId : SV_GroupID,
18	out vertices PS_IN outputVerts[ 128 ],
19	out indices uint2 outputIB[ 64  ] )
20{
21	SetMeshOutputCounts( 128, 64 );
22
23    outputVerts[ 2 * nGroupThreadId ].vPositionPs = float4( 0, 1, 0, 0 );
24}