[llvm] [HLSL] Adding support for root descriptors in root signature metadata representation (PR #139781)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 09:35:51 PDT 2025
================
@@ -105,6 +113,56 @@ static bool parseRootConstants(LLVMContext *Ctx, mcdxbc::RootSignatureDesc &RSD,
return false;
}
+static bool parseRootDescriptors(LLVMContext *Ctx,
+ mcdxbc::RootSignatureDesc &RSD,
+ MDNode *RootDescriptorNode) {
+
+ if (RootDescriptorNode->getNumOperands() != 5)
+ return reportError(Ctx, "Invalid format for RootConstants Element");
+
+ std::optional<StringRef> ElementText =
+ extractMdStringValue(RootDescriptorNode, 0);
----------------
bogner wrote:
I don't see how that test would cover this. That test checks that the register space is in range (ie, it tests the `verifyRegisterSpace` function. The "first element is not a string" error here isn't reached in the current tests.
https://github.com/llvm/llvm-project/pull/139781
More information about the llvm-commits
mailing list