yum-mirror/slang

Making it easier to work with shaders

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

Yong HeFix SPIRV for mesh shaders, checks for invalid target code&recursion. (#3788)f96a3fea6

master
450 B22 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly
2
3// CHECK: OpEntryPoint
4
5struct Vertex
6{
7  float4 pos : SV_Position;
8  [[vk::location(0)]] float3 color;
9};
10
11const static uint MAX_VERTS = 3;
12const static uint MAX_PRIMS = 1;
13
14[outputtopology("triangle")]
15[numthreads(3, 1, 1)]
16[shader("mesh")]
17void entry_mesh(
18    in uint tig : SV_GroupIndex,
19    out vertices Vertex verts[MAX_VERTS],
20    out indices uint3 triangles[MAX_PRIMS])
21{
22}