diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/diagnostics/metal-mesh-shader-output-ref.slang | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/diagnostics/metal-mesh-shader-output-ref.slang b/tests/diagnostics/metal-mesh-shader-output-ref.slang new file mode 100644 index 000000000..45926b1f8 --- /dev/null +++ b/tests/diagnostics/metal-mesh-shader-output-ref.slang @@ -0,0 +1,22 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target metal -entry meshMain + +struct VsOutput { + float4 pos : SV_Position; +}; + +[shader("mesh")] +[numthreads(1, 1, 1)] +[outputtopology("triangle")] +void meshMain(out vertices VsOutput verts[3], out indices uint3 tris[1]) +{ + SetMeshOutputCounts(3, 1); + + // Output vertices + for (uint i = 0; i < 3; i++) { +//CHECK: ([[# @LINE+1]]): error 56104 + verts[i].pos = float4(0.0); + } + + // Output indices + tris[0] = uint3(0, 1, 2); +} |
