yum-mirror/slang

Making it easier to work with shaders

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

James Helferty (NVIDIA)Diagnostic for metal ref mesh output assignment (#8365)8d67365b3

master
475 B22 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target metal -entry meshMain
2
3struct VsOutput {
4  float4 pos : SV_Position;
5};
6
7[shader("mesh")]
8[numthreads(1, 1, 1)]
9[outputtopology("triangle")]
10void meshMain(out vertices VsOutput verts[3], out indices uint3 tris[1])
11{
12  SetMeshOutputCounts(3, 1);
13
14  // Output vertices
15  for (uint i = 0; i < 3; i++) {
16//CHECK: ([[# @LINE+1]]): error 56104
17    verts[i].pos = float4(0.0);
18  }
19
20  // Output indices
21  tris[0] = uint3(0, 1, 2);
22}