1
1
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify
2
2
3
+ // expected-note@+2 {{overlapping resource range here}}
3
4
// expected-error@+1 {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All}}
4
5
[RootSignature ("CBV(b42), CBV(b42)" )]
5
6
void bad_root_signature_0 () {}
6
7
8
+ // expected-note@+2 {{overlapping resource range here}}
7
9
// expected-error@+1 {{resource ranges t[0;0] and t[0;0] overlap within space = 3 and visibility = All}}
8
10
[RootSignature ("SRV(t0, space = 3), SRV(t0, space = 3)" )]
9
11
void bad_root_signature_1 () {}
10
12
13
+ // expected-note@+2 {{overlapping resource range here}}
11
14
// expected-error@+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel}}
12
15
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_PIXEL), UAV(u0, visibility = SHADER_VISIBILITY_PIXEL)" )]
13
16
void bad_root_signature_2 () {}
14
17
18
+ // expected-note@+2 {{overlapping resource range here}}
15
19
// expected-error@+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel}}
16
20
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_ALL), UAV(u0, visibility = SHADER_VISIBILITY_PIXEL)" )]
17
21
void bad_root_signature_3 () {}
18
22
23
+ // expected-note@+2 {{overlapping resource range here}}
19
24
// expected-error@+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel}}
20
25
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_PIXEL), UAV(u0, visibility = SHADER_VISIBILITY_ALL)" )]
21
26
void bad_root_signature_4 () {}
22
27
28
+ // expected-note@+2 {{overlapping resource range here}}
23
29
// expected-error@+1 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All}}
24
30
[RootSignature ("RootConstants(num32BitConstants=4, b0), RootConstants(num32BitConstants=2, b0)" )]
25
31
void bad_root_signature_5 () {}
26
32
33
+ // expected-note@+2 {{overlapping resource range here}}
27
34
// expected-error@+1 {{resource ranges s[3;3] and s[3;3] overlap within space = 0 and visibility = All}}
28
35
[RootSignature ("StaticSampler(s3), StaticSampler(s3)" )]
29
36
void bad_root_signature_6 () {}
30
37
38
+ // expected-note@+2 {{overlapping resource range here}}
31
39
// expected-error@+1 {{resource ranges t[2;5] and t[0;3] overlap within space = 0 and visibility = All}}
32
40
[RootSignature ("DescriptorTable(SRV(t0, numDescriptors=4), SRV(t2, numDescriptors=4))" )]
33
41
void bad_root_signature_7 () {}
34
42
43
+ // expected-note@+2 {{overlapping resource range here}}
35
44
// expected-error@+1 {{resource ranges u[2;5] and u[0;unbounded) overlap within space = 0 and visibility = Hull}}
36
45
[RootSignature ("DescriptorTable(UAV(u0, numDescriptors=unbounded), visibility = SHADER_VISIBILITY_HULL), DescriptorTable(UAV(u2, numDescriptors=4))" )]
37
46
void bad_root_signature_8 () {}
38
47
48
+ // expected-note@+2 {{overlapping resource range here}}
39
49
// expected-error@+1 {{resource ranges b[0;2] and b[2;2] overlap within space = 0 and visibility = All}}
40
50
[RootSignature ("RootConstants(num32BitConstants=4, b2), DescriptorTable(CBV(b0, numDescriptors=3))" )]
41
51
void bad_root_signature_9 () {}
42
52
53
+ // expected-note@+2 {{overlapping resource range here}}
43
54
// expected-error@+1 {{resource ranges s[4;unbounded) and s[17;17] overlap within space = 0 and visibility = All}}
44
55
[RootSignature ("StaticSampler(s17), DescriptorTable(Sampler(s0, numDescriptors=3),Sampler(s4, numDescriptors=unbounded))" )]
45
56
void bad_root_signature_10 () {}
46
57
58
+ // expected-note@+2 {{overlapping resource range here}}
47
59
// expected-error@+1 {{resource ranges b[45;45] and b[4;unbounded) overlap within space = 0 and visibility = Geometry}}
48
60
[RootSignature ("DescriptorTable(CBV(b4, numDescriptors=unbounded)), CBV(b45, visibility = SHADER_VISIBILITY_GEOMETRY)" )]
49
61
void bad_root_signature_11 () {}
@@ -55,10 +67,12 @@ void bad_root_signature_11() {}
55
67
" CBV(b0, numDescriptors = 8), " \
56
68
")"
57
69
70
+ // expected-note@+2 {{overlapping resource range here}}
58
71
// expected-error@+1 {{resource ranges b[0;7] and b[1;2] overlap within space = 0 and visibility = All}}
59
72
[RootSignature (ReportFirstOverlap)]
60
73
void bad_root_signature_12 () {}
61
74
75
+ // expected-note@+2 {{overlapping resource range here}}
62
76
// expected-error@+1 {{resource ranges s[2;2] and s[2;2] overlap within space = 0 and visibility = Vertex}}
63
77
[RootSignature ("StaticSampler(s2, visibility=SHADER_VISIBILITY_ALL), DescriptorTable(Sampler(s2), visibility=SHADER_VISIBILITY_VERTEX)" )]
64
78
void valid_root_signature_13 () {}
0 commit comments