5
5
// the Attr AST Node is created succesfully. If an invalid root signature was
6
6
// passed in then we would exit out of Sema before the Attr is created.
7
7
8
- #define SampleRS \
9
- "DescriptorTable( " \
10
- " CBV(b1), " \
11
- " SRV(t1, numDescriptors = 8, " \
12
- " flags = DESCRIPTORS_VOLATILE), " \
13
- " UAV(u1, numDescriptors = 0, " \
14
- " flags = DESCRIPTORS_VOLATILE) " \
15
- "), " \
16
- "DescriptorTable(Sampler(s0, numDescriptors = 4, space = 1))"
8
+ #define SampleRS "RootFlags( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | " \
9
+ "DENY_VERTEX_SHADER_ROOT_ACCESS), " \
10
+ "CBV(b0, space = 1, flags = DATA_STATIC), " \
11
+ "SRV(t0), " \
12
+ "UAV(u0), " \
13
+ "DescriptorTable( CBV(b1), " \
14
+ "SRV(t1, numDescriptors = 8, " \
15
+ " flags = DESCRIPTORS_VOLATILE), " \
16
+ "UAV(u1, numDescriptors = unbounded, " \
17
+ " flags = DESCRIPTORS_VOLATILE)), " \
18
+ "DescriptorTable(Sampler(s0, space=1, numDescriptors = 4)), " \
19
+ "RootConstants(num32BitConstants=3, b10), " \
20
+ "StaticSampler(s1)," \
21
+ "StaticSampler(s2, " \
22
+ "addressU = TEXTURE_ADDRESS_CLAMP, " \
23
+ "filter = FILTER_MIN_MAG_MIP_LINEAR )"
17
24
18
25
// CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit [[SAMPLE_RS_DECL:__hlsl_rootsig_decl_\d*]]
19
26
// CHECK-SAME: RootElements{
20
- // CHECK-SAME: CBV(b1, numDescriptors = 1, space = 0,
21
- // CHECK-SAME: offset = DescriptorTableOffsetAppend, flags = DataStaticWhileSetAtExecute),
22
- // CHECK-SAME: SRV(t1, numDescriptors = 8, space = 0,
23
- // CHECK-SAME: offset = DescriptorTableOffsetAppend, flags = DescriptorsVolatile),
24
- // CHECK-SAME: UAV(u1, numDescriptors = 0, space = 0,
25
- // CHECK-SAME: offset = DescriptorTableOffsetAppend, flags = DescriptorsVolatile),
26
- // CHECK-SAME: DescriptorTable(numClauses = 3, visibility = All),
27
- // CHECK-SAME: Sampler(s0, numDescriptors = 4, space = 1,
28
- // CHECK-SAME: offset = DescriptorTableOffsetAppend, flags = None),
29
- // CHECK-SAME: DescriptorTable(numClauses = 1, visibility = All)
30
- // CHECK-SAME: }
27
+ // CHECK-SAME: RootFlags(AllowInputAssemblerInputLayout | DenyVertexShaderRootAccess),
28
+ // CHECK-SAME: RootCBV(b0,
29
+ // CHECK-SAME: space = 1, visibility = All, flags = DataStatic
30
+ // CHECK-SAME: ),
31
+ // CHECK-SAME: RootSRV(t0,
32
+ // CHECK-SAME: space = 0, visibility = All, flags = DataStaticWhileSetAtExecute
33
+ // CHECK-SAME: ),
34
+ // CHECK-SAME: RootUAV(
35
+ // CHECK-SAME: u0, space = 0, visibility = All, flags = DataVolatile
36
+ // CHECK-SAME: ),
37
+ // CHECK-SAME: CBV(
38
+ // CHECK-SAME: b1, numDescriptors = 1, space = 0, offset = DescriptorTableOffsetAppend, flags = DataStaticWhileSetAtExecute
39
+ // CHECK-SAME: ),
40
+ // CHECK-SAME: SRV(
41
+ // CHECK-SAME: t1, numDescriptors = 8, space = 0, offset = DescriptorTableOffsetAppend, flags = DescriptorsVolatile
42
+ // CHECK-SAME: ),
43
+ // CHECK-SAME: UAV(
44
+ // CHECK-SAME: u1, numDescriptors = unbounded, space = 0, offset = DescriptorTableOffsetAppend, flags = DescriptorsVolatile
45
+ // CHECK-SAME: ),
46
+ // CHECK-SAME: DescriptorTable(
47
+ // CHECK-SAME: numClauses = 3, visibility = All
48
+ // CHECK-SAME: ),
49
+ // CHECK-SAME: Sampler(
50
+ // CHECK-SAME: s0, numDescriptors = 4, space = 1, offset = DescriptorTableOffsetAppend, flags = None
51
+ // CHECK-SAME: ),
52
+ // CHECK-SAME: DescriptorTable(
53
+ // CHECK-SAME: numClauses = 1, visibility = All
54
+ // CHECK-SAME: ),
55
+ // CHECK-SAME: RootConstants(
56
+ // CHECK-SAME: num32BitConstants = 3, b10, space = 0, visibility = All
57
+ // CHECK-SAME: ),
58
+ // CHECK-SAME: StaticSampler(
59
+ // CHECK-SAME: s1, filter = Anisotropic, addressU = Wrap, addressV = Wrap, addressW = Wrap,
60
+ // CHECK-SAME: mipLODBias = 0.000000e+00, maxAnisotropy = 16, comparisonFunc = LessEqual,
61
+ // CHECK-SAME: borderColor = OpaqueWhite, minLOD = 0.000000e+00, maxLOD = 3.402823e+38, space = 0, visibility = All
62
+ // CHECK-SAME: )}
31
63
32
64
// CHECK: -RootSignatureAttr 0x{{.*}} {{.*}} [[SAMPLE_RS_DECL]]
33
65
[RootSignature (SampleRS)]
@@ -44,14 +76,23 @@ void same_rs_main() {}
44
76
// link to the same root signature declaration
45
77
46
78
#define SampleSameRS \
47
- "DescriptorTable( " \
48
- " CBV(b1), " \
49
- " SRV(t1, numDescriptors = 8, " \
50
- " flags = DESCRIPTORS_VOLATILE), " \
51
- " UAV(u1, numDescriptors = 0, " \
52
- " flags = DESCRIPTORS_VOLATILE) " \
53
- "), " \
54
- "DescriptorTable(Sampler(s0, numDescriptors = 4, space = 1))"
79
+ "RootFlags( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | " \
80
+ "DENY_VERTEX_SHADER_ROOT_ACCESS), " \
81
+ "CBV(b0, space = 1, flags = DATA_STATIC), " \
82
+ "SRV(t0), " \
83
+ "UAV(u0), " \
84
+ "DescriptorTable( CBV(b1), " \
85
+ "SRV(t1, numDescriptors = 8, " \
86
+ " flags = DESCRIPTORS_VOLATILE), " \
87
+ "UAV(u1, numDescriptors = unbounded, " \
88
+ " flags = DESCRIPTORS_VOLATILE)), " \
89
+ "DescriptorTable(Sampler(s0, space=1, numDescriptors = 4)), " \
90
+ "RootConstants(num32BitConstants=3, b10), " \
91
+ "StaticSampler(s1)," \
92
+ "StaticSampler(s2, " \
93
+ "addressU = TEXTURE_ADDRESS_CLAMP, " \
94
+ "filter = FILTER_MIN_MAG_MIP_LINEAR )"
95
+
55
96
56
97
// CHECK: -RootSignatureAttr 0x{{.*}} {{.*}} [[SAMPLE_RS_DECL]]
57
98
[RootSignature (SampleSameRS)]
0 commit comments