@@ -6287,6 +6287,8 @@ _Use_decl_annotations_ HRESULT ValidateLoadModuleFromContainerLazy(
62876287_Use_decl_annotations_
62886288HRESULT ValidateDxilContainer (const void *pContainer,
62896289 uint32_t ContainerSize,
6290+ const void *pOptDebugBitcode,
6291+ uint32_t OptDebugBitcodeSize,
62906292 llvm::raw_ostream &DiagStream) {
62916293 LLVMContext Ctx, DbgCtx;
62926294 std::unique_ptr<llvm::Module> pModule, pDebugModule;
@@ -6301,6 +6303,12 @@ HRESULT ValidateDxilContainer(const void *pContainer,
63016303 IFR (ValidateLoadModuleFromContainer (pContainer, ContainerSize, pModule, pDebugModule,
63026304 Ctx, DbgCtx, DiagStream));
63036305
6306+ if (!pDebugModule && pOptDebugBitcode) {
6307+ // TODO: lazy load for perf
6308+ IFR (ValidateLoadModule ((const char *)pOptDebugBitcode, OptDebugBitcodeSize,
6309+ pDebugModule, DbgCtx, DiagStream, /* bLazyLoad*/ false ));
6310+ }
6311+
63046312 // Validate DXIL Module
63056313 IFR (ValidateDxilModule (pModule.get (), pDebugModule.get ()));
63066314
@@ -6312,4 +6320,10 @@ HRESULT ValidateDxilContainer(const void *pContainer,
63126320 IsDxilContainerLike (pContainer, ContainerSize), ContainerSize);
63136321}
63146322
6323+ _Use_decl_annotations_
6324+ HRESULT ValidateDxilContainer (const void *pContainer,
6325+ uint32_t ContainerSize,
6326+ llvm::raw_ostream &DiagStream) {
6327+ return ValidateDxilContainer (pContainer, ContainerSize, nullptr , 0 , DiagStream);
6328+ }
63156329} // namespace hlsl
0 commit comments