@@ -40,7 +40,7 @@ size_t RootSignatureDesc::getSize() const {
40
40
continue ;
41
41
std::visit (
42
42
[&Size](auto &Value) -> void {
43
- using T = std::decay_t <decltype (Value)>;
43
+ using T = std::decay_t <decltype (* Value)>;
44
44
Size += sizeof (T);
45
45
},
46
46
*P);
@@ -80,28 +80,28 @@ void RootSignatureDesc::write(raw_ostream &OS) const {
80
80
auto P = ParametersContainer.getParameter (H);
81
81
if (!P)
82
82
continue ;
83
- if (std::holds_alternative<dxbc::RootConstants>(*P)) {
84
- auto Constants = std::get<dxbc::RootConstants>(*P);
85
- support::endian::write (BOS, Constants. ShaderRegister ,
83
+ if (std::holds_alternative<const dxbc::RootConstants* >(*P)) {
84
+ auto * Constants = std::get<const dxbc::RootConstants* >(*P);
85
+ support::endian::write (BOS, Constants-> ShaderRegister ,
86
86
llvm::endianness::little);
87
- support::endian::write (BOS, Constants. RegisterSpace ,
87
+ support::endian::write (BOS, Constants-> RegisterSpace ,
88
88
llvm::endianness::little);
89
- support::endian::write (BOS, Constants. Num32BitValues ,
89
+ support::endian::write (BOS, Constants-> Num32BitValues ,
90
90
llvm::endianness::little);
91
- } else if (std::holds_alternative<dxbc::RST0::v0::RootDescriptor>(*P)) {
92
- auto Descriptor = std::get<dxbc::RST0::v0::RootDescriptor>(*P);
93
- support::endian::write (BOS, Descriptor. ShaderRegister ,
91
+ } else if (std::holds_alternative<const dxbc::RST0::v0::RootDescriptor* >(*P)) {
92
+ auto * Descriptor = std::get<const dxbc::RST0::v0::RootDescriptor* >(*P);
93
+ support::endian::write (BOS, Descriptor-> ShaderRegister ,
94
94
llvm::endianness::little);
95
- support::endian::write (BOS, Descriptor. RegisterSpace ,
95
+ support::endian::write (BOS, Descriptor-> RegisterSpace ,
96
96
llvm::endianness::little);
97
- } else if (std::holds_alternative<dxbc::RST0::v1::RootDescriptor>(*P)) {
98
- auto Descriptor = std::get<dxbc::RST0::v1::RootDescriptor>(*P);
97
+ } else if (std::holds_alternative<const dxbc::RST0::v1::RootDescriptor* >(*P)) {
98
+ auto * Descriptor = std::get<const dxbc::RST0::v1::RootDescriptor* >(*P);
99
99
100
- support::endian::write (BOS, Descriptor. ShaderRegister ,
100
+ support::endian::write (BOS, Descriptor-> ShaderRegister ,
101
101
llvm::endianness::little);
102
- support::endian::write (BOS, Descriptor. RegisterSpace ,
102
+ support::endian::write (BOS, Descriptor-> RegisterSpace ,
103
103
llvm::endianness::little);
104
- support::endian::write (BOS, Descriptor. Flags , llvm::endianness::little);
104
+ support::endian::write (BOS, Descriptor-> Flags , llvm::endianness::little);
105
105
}
106
106
}
107
107
assert (Storage.size () == getSize ());
0 commit comments