[llvm] [DirectX] use DXILMetadataAnalysis to build PSVRuntimeInfo (PR #107101)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 12:17:30 PDT 2024


================
@@ -143,23 +145,35 @@ void DXContainerGlobals::addPipelineStateValidationInfo(
   SmallString<256> Data;
   raw_svector_ostream OS(Data);
   PSVRuntimeInfo PSV;
-  Triple TT(M.getTargetTriple());
   PSV.BaseData.MinimumWaveLaneCount = 0;
   PSV.BaseData.MaximumWaveLaneCount = std::numeric_limits<uint32_t>::max();
+
+  dxil::ModuleMetadataInfo &MMI =
+      getAnalysis<DXILMetadataAnalysisWrapperPass>().getModuleMetadata();
+  assert(MMI.EntryPropertyVec.size() != 0 ||
+         MMI.ShaderStage == Triple::Library);
----------------
bogner wrote:

What stops us from getting here with zero entry points? I guess we'll have diagnosed that and errored out earlier? Similarly, what if there are multiple entry points? Is that only possible for library shaders?

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


More information about the llvm-commits mailing list