xref: /llvm-project/clang/test/SemaHLSL/valid-shader-stages.hlsl (revision 43a9b92d79ab6a59c3cfaa926bb32f161ef2facc)
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -o - %s -verify
2
3// expected-no-diagnostics
4
5[shader("pixel")] void pixel() {}
6[shader("vertex")] void vertex() {}
7[shader("raygeneration")] void raygeneration() {}
8[shader("intersection")] void intersection() {}
9
10[numthreads(1,1,1)][shader("compute")] void compute() {}
11[numthreads(1,1,1)][shader("mesh")] void mesh() {}
12
13// Note: the rest of these have additional constraints that aren't implemented
14// yet, so here we just declare them to make sure the spelling works and
15// whatnot.
16[shader("geometry")] void geometry();
17[shader("hull")] void hull();
18[shader("domain")] void domain();
19[shader("callable")] void callable();
20[shader("closesthit")] void closesthit();
21[shader("anyhit")] void anyhit();
22[shader("miss")] void miss();
23
24[numthreads(1,1,1)][shader("amplification")] void amplification();
25