@@ -21,8 +21,8 @@ struct RootParameterInfo {
2121
2222 RootParameterInfo () = default ;
2323
24- RootParameterInfo (dxbc::RootParameterHeader H , size_t L )
25- : Header(H ), Location(L ) {}
24+ RootParameterInfo (dxbc::RootParameterHeader Header , size_t Location )
25+ : Header(Header ), Location(Location ) {}
2626};
2727
2828struct RootParametersContainer {
@@ -31,29 +31,34 @@ struct RootParametersContainer {
3131 SmallVector<dxbc::RootConstants> Constants;
3232 SmallVector<dxbc::RTS0::v2::RootDescriptor> Descriptors;
3333
34- void addInfo (dxbc::RootParameterHeader H , size_t L ) {
35- ParametersInfo.push_back (RootParameterInfo (H, L ));
34+ void addInfo (dxbc::RootParameterHeader Header , size_t Location ) {
35+ ParametersInfo.push_back (RootParameterInfo (Header, Location ));
3636 }
3737
38- void addParameter (dxbc::RootParameterHeader H, dxbc::RootConstants C) {
39- addInfo (H, Constants.size ());
40- Constants.push_back (C);
38+ void addParameter (dxbc::RootParameterHeader Header,
39+ dxbc::RootConstants Constant) {
40+ addInfo (Header, Constants.size ());
41+ Constants.push_back (Constant);
4142 }
4243
43- void addParameter (dxbc::RootParameterHeader H,
44- dxbc::RTS0::v2::RootDescriptor D) {
45- addInfo (H, Descriptors.size ());
46- Descriptors.push_back (D);
44+ void addInvalidParameter (dxbc::RootParameterHeader Header) {
45+ addInfo (Header, -1 );
46+ }
47+
48+ void addParameter (dxbc::RootParameterHeader Header,
49+ dxbc::RTS0::v2::RootDescriptor Descriptor) {
50+ addInfo (Header, Descriptors.size ());
51+ Descriptors.push_back (Descriptor);
4752 }
4853
4954 const std::pair<uint32_t , uint32_t >
50- getTypeAndLocForParameter (uint32_t Index ) const {
51- const RootParameterInfo &Info = ParametersInfo[Index ];
55+ getTypeAndLocForParameter (uint32_t Location ) const {
56+ const RootParameterInfo &Info = ParametersInfo[Location ];
5257 return {Info.Header .ParameterType , Info.Location };
5358 }
5459
55- const dxbc::RootParameterHeader &getHeader (size_t Index ) const {
56- const RootParameterInfo &Info = ParametersInfo[Index ];
60+ const dxbc::RootParameterHeader &getHeader (size_t Location ) const {
61+ const RootParameterInfo &Info = ParametersInfo[Location ];
5762 return Info.Header ;
5863 }
5964
0 commit comments