[llvm] [NFC] Refactoring MCDXBC to support out of order storage of root parameters (PR #137284)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 15:06:55 PDT 2025
================
@@ -75,31 +75,32 @@ static bool parseRootConstants(LLVMContext *Ctx, mcdxbc::RootSignatureDesc &RSD,
if (RootConstantNode->getNumOperands() != 5)
return reportError(Ctx, "Invalid format for RootConstants Element");
- mcdxbc::RootParameter NewParameter;
- NewParameter.Header.ParameterType =
+ dxbc::RootParameterHeader Header;
+ Header.ParameterType =
llvm::to_underlying(dxbc::RootParameterType::Constants32Bit);
if (std::optional<uint32_t> Val = extractMdIntValue(RootConstantNode, 1))
- NewParameter.Header.ShaderVisibility = *Val;
+ Header.ShaderVisibility = *Val;
else
return reportError(Ctx, "Invalid value for ShaderVisibility");
----------------
joaosaffran wrote:
There is no need to initialized `Header.ParameterOffset`, since those will be calculated when writing, in `RootSignatureDesc::write`
https://github.com/llvm/llvm-project/pull/137284
More information about the llvm-commits
mailing list