@@ -16,25 +16,24 @@ namespace {
16
16
TEST (HLSLRootSignatureTest, DescriptorCBVClauseDump) {
17
17
DescriptorTableClause Clause;
18
18
Clause.Type = ClauseType::CBuffer;
19
- Clause.Reg = { RegisterType::BReg, 0 };
19
+ Clause.Reg = {RegisterType::BReg, 0 };
20
20
Clause.setDefaultFlags ();
21
21
22
22
std::string Out;
23
23
llvm::raw_string_ostream OS (Out);
24
24
Clause.dump (OS);
25
25
OS.flush ();
26
26
27
- std::string Expected =
28
- " CBV(b0, numDescriptors = 1, space = 0, "
29
- " offset = DescriptorTableOffsetAppend, "
30
- " flags = DataStaticWhileSetAtExecute)" ;
27
+ std::string Expected = " CBV(b0, numDescriptors = 1, space = 0, "
28
+ " offset = DescriptorTableOffsetAppend, "
29
+ " flags = DataStaticWhileSetAtExecute)" ;
31
30
EXPECT_EQ (Out, Expected);
32
31
}
33
32
34
33
TEST (HLSLRootSignatureTest, DescriptorSRVClauseDump) {
35
34
DescriptorTableClause Clause;
36
35
Clause.Type = ClauseType::SRV;
37
- Clause.Reg = { RegisterType::TReg, 0 };
36
+ Clause.Reg = {RegisterType::TReg, 0 };
38
37
Clause.NumDescriptors = 2 ;
39
38
Clause.Space = 42 ;
40
39
Clause.Offset = 3 ;
@@ -46,15 +45,14 @@ TEST(HLSLRootSignatureTest, DescriptorSRVClauseDump) {
46
45
OS.flush ();
47
46
48
47
std::string Expected =
49
- " SRV(t0, numDescriptors = 2, space = 42, offset = 3, flags = None)" ;
48
+ " SRV(t0, numDescriptors = 2, space = 42, offset = 3, flags = None)" ;
50
49
EXPECT_EQ (Out, Expected);
51
50
}
52
51
53
-
54
52
TEST (HLSLRootSignatureTest, DescriptorUAVClauseDump) {
55
53
DescriptorTableClause Clause;
56
54
Clause.Type = ClauseType::UAV;
57
- Clause.Reg = { RegisterType::UReg, 92374 };
55
+ Clause.Reg = {RegisterType::UReg, 92374 };
58
56
Clause.NumDescriptors = 3298 ;
59
57
Clause.Space = 932847 ;
60
58
Clause.Offset = 1 ;
@@ -66,19 +64,19 @@ TEST(HLSLRootSignatureTest, DescriptorUAVClauseDump) {
66
64
OS.flush ();
67
65
68
66
std::string Expected =
69
- " UAV(u92374, numDescriptors = 3298, space = 932847, offset = 1, flags = "
70
- " DescriptorsVolatile | "
71
- " DataVolatile | "
72
- " DataStaticWhileSetAtExecute | "
73
- " DataStatic | "
74
- " DescriptorsStaticKeepingBufferBoundsChecks)" ;
67
+ " UAV(u92374, numDescriptors = 3298, space = 932847, offset = 1, flags = "
68
+ " DescriptorsVolatile | "
69
+ " DataVolatile | "
70
+ " DataStaticWhileSetAtExecute | "
71
+ " DataStatic | "
72
+ " DescriptorsStaticKeepingBufferBoundsChecks)" ;
75
73
EXPECT_EQ (Out, Expected);
76
74
}
77
75
78
76
TEST (HLSLRootSignatureTest, DescriptorSamplerClauseDump) {
79
77
DescriptorTableClause Clause;
80
78
Clause.Type = ClauseType::Sampler;
81
- Clause.Reg = { RegisterType::SReg, 0 };
79
+ Clause.Reg = {RegisterType::SReg, 0 };
82
80
Clause.NumDescriptors = 2 ;
83
81
Clause.Space = 42 ;
84
82
Clause.Offset = DescriptorTableOffsetAppend;
@@ -89,9 +87,9 @@ TEST(HLSLRootSignatureTest, DescriptorSamplerClauseDump) {
89
87
Clause.dump (OS);
90
88
OS.flush ();
91
89
92
- std::string Expected =
93
- " Sampler(s0, numDescriptors = 2, space = 42, offset = DescriptorTableOffsetAppend, "
94
- " flags = DescriptorsVolatile)" ;
90
+ std::string Expected = " Sampler(s0, numDescriptors = 2, space = 42, offset = "
91
+ " DescriptorTableOffsetAppend, "
92
+ " flags = DescriptorsVolatile)" ;
95
93
EXPECT_EQ (Out, Expected);
96
94
}
97
95
@@ -106,7 +104,7 @@ TEST(HLSLRootSignatureTest, DescriptorTableDump) {
106
104
OS.flush ();
107
105
108
106
std::string Expected =
109
- " DescriptorTable(numClauses = 4, visibility = Geometry)" ;
107
+ " DescriptorTable(numClauses = 4, visibility = Geometry)" ;
110
108
EXPECT_EQ (Out, Expected);
111
109
}
112
110
0 commit comments