[llvm] [DXIL] Add support for root signature flag element in DXContainer (PR #123147)
Damyan Pepper via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 12:56:20 PST 2025
================
@@ -145,20 +134,30 @@ static bool parse(LLVMContext *Ctx, ModuleRootSignature *MRS, NamedMDNode *Root,
}
static bool validate(LLVMContext *Ctx, ModuleRootSignature *MRS) {
- if (dxbc::RootSignatureValidations::validateRootFlag(MRS->Flags)) {
+ if (!dxbc::RootSignatureValidations::isValidRootFlag(MRS->Flags)) {
return reportError(Ctx, "Invalid Root Signature flag value");
}
return false;
}
std::optional<ModuleRootSignature>
-ModuleRootSignature::analyzeModule(Module &M, const Function *F) {
- ModuleRootSignature MRS;
+ModuleRootSignature::analyzeModule(Module &M, ModuleMetadataInfo MMI) {
+ if (MMI.ShaderProfile == Triple::Library)
+ return std::nullopt;
+
LLVMContext *Ctx = &M.getContext();
+ if (MMI.EntryPropertyVec.size() != 1) {
+ reportError(Ctx, "More than one entry function defined.");
+ return std::nullopt;
+ }
----------------
damyanp wrote:
Is there a test for this?
I have a general concern around why everything before this code allows there to be multiple entry points, but now this is the place which starts to enforce that there's only one.
https://github.com/llvm/llvm-project/pull/123147
More information about the llvm-commits
mailing list