@@ -93,6 +93,40 @@ TEST(HLSLRootSignatureTest, DescriptorSamplerClauseDump) {
93
93
EXPECT_EQ (Out, Expected);
94
94
}
95
95
96
+ TEST (HLSLRootSignatureTest, DescriptorCBVV10ClauseDump) {
97
+ DescriptorTableClause Clause;
98
+ Clause.Type = ClauseType::CBuffer;
99
+ Clause.Reg = {RegisterType::BReg, 0 };
100
+ Clause.setDefaultFlags (llvm::dxbc::RootSignatureVersion::V1_0);
101
+
102
+ std::string Out;
103
+ llvm::raw_string_ostream OS (Out);
104
+ OS << Clause;
105
+ OS.flush ();
106
+
107
+ std::string Expected = " CBV(b0, numDescriptors = 1, space = 0, "
108
+ " offset = DescriptorTableOffsetAppend, "
109
+ " flags = DescriptorsVolatile | DataVolatile)" ;
110
+ EXPECT_EQ (Out, Expected);
111
+ }
112
+
113
+ TEST (HLSLRootSignatureTest, DescriptorSamplerV10ClauseDump) {
114
+ DescriptorTableClause Clause;
115
+ Clause.Type = ClauseType::Sampler;
116
+ Clause.Reg = {RegisterType::SReg, 0 };
117
+ Clause.setDefaultFlags (llvm::dxbc::RootSignatureVersion::V1_0);
118
+
119
+ std::string Out;
120
+ llvm::raw_string_ostream OS (Out);
121
+ OS << Clause;
122
+ OS.flush ();
123
+
124
+ std::string Expected = " Sampler(s0, numDescriptors = 1, space = 0, offset = "
125
+ " DescriptorTableOffsetAppend, "
126
+ " flags = DescriptorsVolatile)" ;
127
+ EXPECT_EQ (Out, Expected);
128
+ }
129
+
96
130
TEST (HLSLRootSignatureTest, DescriptorTableDump) {
97
131
DescriptorTable Table;
98
132
Table.NumClauses = 4 ;
@@ -125,6 +159,40 @@ TEST(HLSLRootSignatureTest, RootCBVDump) {
125
159
EXPECT_EQ (Out, Expected);
126
160
}
127
161
162
+ TEST (HLSLRootSignatureTest, RootSRV10Dump) {
163
+ RootDescriptor Descriptor;
164
+ Descriptor.Type = DescriptorType::SRV;
165
+ Descriptor.Reg = {RegisterType::TReg, 0 };
166
+ Descriptor.setDefaultFlags (llvm::dxbc::RootSignatureVersion::V1_0);
167
+
168
+ std::string Out;
169
+ llvm::raw_string_ostream OS (Out);
170
+ OS << Descriptor;
171
+ OS.flush ();
172
+
173
+ std::string Expected = " RootSRV(t0, space = 0, "
174
+ " visibility = All, "
175
+ " flags = DataVolatile)" ;
176
+ EXPECT_EQ (Out, Expected);
177
+ }
178
+
179
+ TEST (HLSLRootSignatureTest, RootUAVV10Dump) {
180
+ RootDescriptor Descriptor;
181
+ Descriptor.Type = DescriptorType::UAV;
182
+ Descriptor.Reg = {RegisterType::UReg, 0 };
183
+ Descriptor.setDefaultFlags (llvm::dxbc::RootSignatureVersion::V1_0);
184
+
185
+ std::string Out;
186
+ llvm::raw_string_ostream OS (Out);
187
+ OS << Descriptor;
188
+ OS.flush ();
189
+
190
+ std::string Expected = " RootUAV(u0, space = 0, "
191
+ " visibility = All, "
192
+ " flags = DataVolatile)" ;
193
+ EXPECT_EQ (Out, Expected);
194
+ }
195
+
128
196
TEST (HLSLRootSignatureTest, RootSRVDump) {
129
197
RootDescriptor Descriptor;
130
198
Descriptor.Type = DescriptorType::SRV;
0 commit comments