Debian Codegraph @

clang/test/SemaHLSL/Semantics/groupindex.hlsl

raw
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -o - %s -verify
2
3 // expected-no-error
4 [shader("compute")][numthreads(32,1,1)]
5 void compute(int GI : SV_GroupIndex) {}
6
7 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'pixel' shaders}}
8 [shader("pixel")]
9 void pixel(int GI : SV_GroupIndex) {}
10
11 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'vertex' shaders}}
12 [shader("vertex")]
13 void vertex(int GI : SV_GroupIndex) {}
14
15 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'geometry' shaders}}
16 [shader("geometry")]
17 void geometry(int GI : SV_GroupIndex) {}
18
19 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'domain' shaders}}
20 [shader("domain")]
21 void domain(int GI : SV_GroupIndex) {}
22
23 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'amplification' shaders}}
24 [shader("amplification")][numthreads(32,1,1)]
25 void amplification(int GI : SV_GroupIndex) {}
26
27 // expected-error@+2 {{attribute 'SV_GroupIndex' is unsupported in 'mesh' shaders}}
28 [shader("mesh")][numthreads(32,1,1)]
29 void mesh(int GI : SV_GroupIndex) {}