@@ -19,3 +19,46 @@ void bad_root_signature_3() {}
19
19
// expected-error@+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel}}
20
20
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_PIXEL), UAV(u0, visibility = SHADER_VISIBILITY_ALL)" )]
21
21
void bad_root_signature_4 () {}
22
+
23
+ // expected-error@+1 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All}}
24
+ [RootSignature ("RootConstants(num32BitConstants=4, b0), RootConstants(num32BitConstants=2, b0)" )]
25
+ void bad_root_signature_5 () {}
26
+
27
+ // expected-error@+1 {{resource ranges s[3;3] and s[3;3] overlap within space = 0 and visibility = All}}
28
+ [RootSignature ("StaticSampler(s3), StaticSampler(s3)" )]
29
+ void bad_root_signature_6 () {}
30
+
31
+ // expected-error@+1 {{resource ranges t[2;5] and t[0;3] overlap within space = 0 and visibility = All}}
32
+ [RootSignature ("DescriptorTable(SRV(t0, numDescriptors=4), SRV(t2, numDescriptors=4))" )]
33
+ void bad_root_signature_7 () {}
34
+
35
+ // expected-error@+1 {{resource ranges u[2;5] and u[0;4294967295] overlap within space = 0 and visibility = Hull}}
36
+ [RootSignature ("DescriptorTable(UAV(u0, numDescriptors=unbounded), visibility = SHADER_VISIBILITY_HULL), DescriptorTable(UAV(u2, numDescriptors=4))" )]
37
+ void bad_root_signature_8 () {}
38
+
39
+ // expected-error@+1 {{resource ranges b[0;2] and b[2;2] overlap within space = 0 and visibility = All}}
40
+ [RootSignature ("RootConstants(num32BitConstants=4, b2), DescriptorTable(CBV(b0, numDescriptors=3))" )]
41
+ void bad_root_signature_9 () {}
42
+
43
+ // expected-error@+1 {{resource ranges s[4;4294967295] and s[17;17] overlap within space = 0 and visibility = All}}
44
+ [RootSignature ("StaticSampler(s17), DescriptorTable(Sampler(s0, numDescriptors=3),Sampler(s4, numDescriptors=unbounded))" )]
45
+ void bad_root_signature_10 () {}
46
+
47
+ // expected-error@+1 {{resource ranges b[45;45] and b[4;4294967295] overlap within space = 0 and visibility = Geometry}}
48
+ [RootSignature ("DescriptorTable(CBV(b4, numDescriptors=unbounded)), CBV(b45, visibility = SHADER_VISIBILITY_GEOMETRY)" )]
49
+ void bad_root_signature_11 () {}
50
+
51
+ #define ReportFirstOverlap \
52
+ "DescriptorTable( " \
53
+ " CBV(b4, numDescriptors = 4), " \
54
+ " CBV(b1, numDescriptors = 2), " \
55
+ " CBV(b0, numDescriptors = 8), " \
56
+ ")"
57
+
58
+ // expected-error@+1 {{resource ranges b[0;7] and b[1;2] overlap within space = 0 and visibility = All}}
59
+ [RootSignature (ReportFirstOverlap)]
60
+ void bad_root_signature_12 () {}
61
+
62
+ // expected-error@+1 {{resource ranges s[2;2] and s[2;2] overlap within space = 0 and visibility = Vertex}}
63
+ [RootSignature ("StaticSampler(s2, visibility=SHADER_VISIBILITY_ALL), DescriptorTable(Sampler(s2), visibility=SHADER_VISIBILITY_VERTEX)" )]
64
+ void valid_root_signature_13 () {}
0 commit comments