[llvm-branch-commits] [llvm] [DXIL] Add support for root signature flag element in DXContainer (PR #123147)

Damyan Pepper via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 30 15:50:57 PST 2025


================
@@ -144,6 +149,27 @@ void DXContainerGlobals::addSignature(Module &M,
   Globals.emplace_back(buildSignature(M, OutputSig, "dx.osg1", "OSG1"));
 }
 
+void DXContainerGlobals::addRootSignature(Module &M,
+                                          SmallVector<GlobalValue *> &Globals) {
+
+  std::optional<ModuleRootSignature> MRS =
+      getAnalysis<RootSignatureAnalysisWrapper>().getRootSignature();
+  if (!MRS.has_value())
+    return;
+
+  SmallString<256> Data;
+  raw_svector_ostream OS(Data);
+
+  RootSignatureHeader RSH;
+  RSH.Flags = MRS->Flags;
+
+  RSH.write(OS);
----------------
damyanp wrote:

I have questions around what's going on here, but it's confusing because this PR is targeting a branch in your repo and not llvm/llvm-project, so I'm not sure what the proposed change is here.

https://github.com/llvm/llvm-project/pull/123147


More information about the llvm-branch-commits mailing list