@@ -34,12 +34,12 @@ static bool parseRootConstants(LLVMContext *Ctx, mcdxbc::RootSignatureDesc &RSD,
3434 if (RootConstNode->getNumOperands () != 5 )
3535 return reportError (Ctx, " Invalid format for Root constants element" );
3636
37- dxbc ::RootParameter NewParam;
38- NewParam.ParameterType = dxbc::RootParameterType::Constants32Bit;
37+ mcdxbc ::RootParameter NewParam;
38+ NewParam.Header . ParameterType = dxbc::RootParameterType::Constants32Bit;
3939
4040 auto *ShaderVisibility =
4141 mdconst::extract<ConstantInt>(RootConstNode->getOperand (1 ));
42- NewParam.ShaderVisibility =
42+ NewParam.Header . ShaderVisibility =
4343 (dxbc::ShaderVisibility)ShaderVisibility->getZExtValue ();
4444
4545 auto *ShaderRegister =
@@ -122,15 +122,15 @@ static bool validate(LLVMContext *Ctx, const mcdxbc::RootSignatureDesc &RSD) {
122122
123123 for (const auto &P : RSD.Parameters ) {
124124 // Parameter Type cannot be set through metadata.
125- assert (
126- dxbc::RootSignatureValidations::isValidParameterType (P .ParameterType ));
125+ assert (dxbc::RootSignatureValidations::isValidParameterType (
126+ P. Header .ParameterType ));
127127
128128 if (!dxbc::RootSignatureValidations::isValidShaderVisibility (
129- P.ShaderVisibility )) {
129+ P.Header . ShaderVisibility )) {
130130 return reportError (
131131 Ctx,
132132 " Invalid Root Signature parameter shader visibility in metadata " +
133- Twine ((uint32_t )P.ShaderVisibility ));
133+ Twine ((uint32_t )P.Header . ShaderVisibility ));
134134 }
135135 }
136136 return false ;
@@ -250,12 +250,14 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
250250 OS << indent (Space) << " - Parameters: \n " ;
251251 Space++;
252252 for (const auto &P : RS.Parameters ) {
253- OS << indent (Space) << " Type: " << (uint32_t )P.ParameterType << " \n " ;
253+ OS << indent (Space) << " Type: " << (uint32_t )P.Header .ParameterType
254+ << " \n " ;
254255 OS << indent (Space)
255- << " ShaderVisibility: " << (uint32_t )P.ShaderVisibility << " \n " ;
256+ << " ShaderVisibility: " << (uint32_t )P.Header .ShaderVisibility
257+ << " \n " ;
256258 Space++;
257259
258- switch (P.ParameterType ) {
260+ switch (P.Header . ParameterType ) {
259261
260262 case dxbc::RootParameterType::Constants32Bit: {
261263 OS << indent (Space) << " - Constants: \n " ;
0 commit comments