Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
address feedback, no tests yet
Browse files Browse the repository at this point in the history
bob80905 committed Jan 13, 2025
1 parent 7dc1d0d commit 3c4b566
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/DxilContainer/DxcContainerBuilder.cpp
Original file line number Diff line number Diff line change
@@ -104,10 +104,11 @@ HRESULT STDMETHODCALLTYPE DxcContainerBuilder::RemovePart(UINT32 fourCC) {

HRESULT STDMETHODCALLTYPE
DxcContainerBuilder::SerializeContainer(IDxcOperationResult **ppResult) {
DxcThreadMalloc TM(m_pMalloc);
if (ppResult == nullptr)
return E_INVALIDARG;

DxcThreadMalloc TM(m_pMalloc);

try {
// Allocate memory for new dxil container.
uint32_t ContainerSize = ComputeContainerSize();
@@ -165,11 +166,9 @@ DxcContainerBuilder::SerializeContainer(IDxcOperationResult **ppResult) {
}

// Add Hash.
LPVOID PTR = pResult->GetBufferPointer();
if (!IsDxilContainerLike(PTR, pResult->GetBufferSize()))
return E_FAIL;

HashAndUpdate((DxilContainerHeader *)PTR);
if (SUCCEEDED(valHR))
HashAndUpdate(IsDxilContainerLike(pResult->GetBufferPointer(),
pResult->GetBufferSize()));

IFT(DxcResult::Create(
valHR, DXC_OUT_OBJECT,

0 comments on commit 3c4b566

Please sign in to comment.