11// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -x hlsl -ast-dump -verify -o - %s
22
33[numthreads (8 ,8 ,1 )]
4- // expected-error@+1 {{attribute 'sv_dispatchthreadid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
4+ // expected-error@+1 {{attribute 'SV_DispatchThreadID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
55void CSMain (float ID : SV_DispatchThreadID ) {
66
77}
@@ -11,71 +11,71 @@ struct ST {
1111 float b;
1212};
1313[numthreads (8 ,8 ,1 )]
14- // expected-error@+1 {{attribute 'sv_dispatchthreadid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
14+ // expected-error@+1 {{attribute 'SV_DispatchThreadID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
1515void CSMain2 (ST ID : SV_DispatchThreadID ) {
1616
1717}
1818
1919void foo () {
20- // expected-warning@+1 {{'sv_dispatchthreadid ' attribute only applies to parameters and non-static data members}}
20+ // expected-warning@+1 {{'SV_DispatchThreadID ' attribute only applies to parameters and non-static data members}}
2121 uint V : SV_DispatchThreadID ;
2222
2323}
2424
2525struct ST2 {
26- // expected-warning@+1 {{'sv_dispatchthreadid ' attribute only applies to parameters and non-static data members}}
26+ // expected-warning@+1 {{'SV_DispatchThreadID ' attribute only applies to parameters and non-static data members}}
2727 static uint X : SV_DispatchThreadID ;
2828 uint s : SV_DispatchThreadID ;
2929};
3030
3131[numthreads (8 ,8 ,1 )]
32- // expected-error@+1 {{attribute 'sv_groupid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
32+ // expected-error@+1 {{attribute 'SV_GroupID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
3333void CSMain_GID (float ID : SV_GroupID ) {
3434}
3535
3636[numthreads (8 ,8 ,1 )]
37- // expected-error@+1 {{attribute 'sv_groupid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
37+ // expected-error@+1 {{attribute 'SV_GroupID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
3838void CSMain2_GID (ST GID : SV_GroupID ) {
3939
4040}
4141
4242void foo_GID () {
43- // expected-warning@+1 {{'sv_groupid ' attribute only applies to parameters and non-static data members}}
43+ // expected-warning@+1 {{'SV_GroupID ' attribute only applies to parameters and non-static data members}}
4444 uint GIS : SV_GroupID ;
4545}
4646
4747struct ST2_GID {
48- // expected-warning@+1 {{'sv_groupid ' attribute only applies to parameters and non-static data members}}
48+ // expected-warning@+1 {{'SV_GroupID ' attribute only applies to parameters and non-static data members}}
4949 static uint GID : SV_GroupID ;
5050 uint s_gid : SV_GroupID ;
5151};
5252
5353[numthreads (8 ,8 ,1 )]
54- // expected-error@+1 {{attribute 'sv_groupthreadid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
54+ // expected-error@+1 {{attribute 'SV_GroupThreadID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
5555void CSMain_GThreadID (float ID : SV_GroupThreadID ) {
5656}
5757
5858[numthreads (8 ,8 ,1 )]
59- // expected-error@+1 {{attribute 'sv_groupthreadid ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
59+ // expected-error@+1 {{attribute 'SV_GroupThreadID ' only applies to a field or parameter of type 'uint/uint2/uint3'}}
6060void CSMain2_GThreadID (ST GID : SV_GroupThreadID ) {
6161
6262}
6363
6464void foo_GThreadID () {
65- // expected-warning@+1 {{'sv_groupthreadid ' attribute only applies to parameters and non-static data members}}
65+ // expected-warning@+1 {{'SV_GroupThreadID ' attribute only applies to parameters and non-static data members}}
6666 uint GThreadIS : SV_GroupThreadID ;
6767}
6868
6969struct ST2_GThreadID {
70- // expected-warning@+1 {{'sv_groupthreadid ' attribute only applies to parameters and non-static data members}}
70+ // expected-warning@+1 {{'SV_GroupThreadID ' attribute only applies to parameters and non-static data members}}
7171 static uint GThreadID : SV_GroupThreadID ;
7272 uint s_gthreadid : SV_GroupThreadID ;
7373};
7474
7575
7676[shader ("vertex" )]
77- // expected-error@+4 {{attribute 'sv_groupindex ' is unsupported in 'vertex' shaders, requires compute}}
78- // expected-error@+3 {{attribute 'sv_dispatchthreadid ' is unsupported in 'vertex' shaders, requires compute}}
79- // expected-error@+2 {{attribute 'sv_groupid ' is unsupported in 'vertex' shaders, requires compute}}
80- // expected-error@+1 {{attribute 'sv_groupthreadid ' is unsupported in 'vertex' shaders, requires compute}}
77+ // expected-error@+4 {{attribute 'SV_GroupIndex ' is unsupported in 'vertex' shaders, requires compute}}
78+ // expected-error@+3 {{attribute 'SV_DispatchThreadID ' is unsupported in 'vertex' shaders, requires compute}}
79+ // expected-error@+2 {{attribute 'SV_GroupID ' is unsupported in 'vertex' shaders, requires compute}}
80+ // expected-error@+1 {{attribute 'SV_GroupThreadID ' is unsupported in 'vertex' shaders, requires compute}}
8181void vs_main (int GI : SV_GroupIndex , uint ID : SV_DispatchThreadID , uint GID : SV_GroupID , uint GThreadID : SV_GroupThreadID ) {}
0 commit comments