Skip to content

Commit 7aba6ed

Browse files
Merge branch 'master' into feature/resource-tight-alignment
2 parents 31086c7 + aca35f1 commit 7aba6ed

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

include/D3D12MemAlloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ struct CALLOCATION_DESC : public ALLOCATION_DESC
16931693
explicit CALLOCATION_DESC(D3D12_HEAP_TYPE heapType,
16941694
ALLOCATION_FLAGS flags = ALLOCATION_FLAG_NONE,
16951695
void* privateData = NULL,
1696-
D3D12_HEAP_FLAGS extraHeapFlags = D3D12_HEAP_FLAG_NONE) noexcept
1696+
D3D12_HEAP_FLAGS extraHeapFlags = D3D12MA_RECOMMENDED_HEAP_FLAGS) noexcept
16971697
{
16981698
Flags = flags;
16991699
HeapType = heapType;

src/D3D12MemAlloc.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7490,12 +7490,6 @@ HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, U
74907490
outPreferCommitted = true;
74917491
}
74927492
}
7493-
7494-
const D3D12_HEAP_FLAGS extraHeapFlags = allocDesc.ExtraHeapFlags & ~RESOURCE_CLASS_HEAP_FLAGS;
7495-
if (outBlockVector != NULL && extraHeapFlags != 0)
7496-
{
7497-
outBlockVector = NULL;
7498-
}
74997493
}
75007494

75017495
if ((allocDesc.Flags & ALLOCATION_FLAG_COMMITTED) != 0 ||
@@ -7525,12 +7519,7 @@ UINT AllocatorPimpl::CalcDefaultPoolIndex(const ALLOCATION_DESC& allocDesc, Reso
75257519
D3D12_HEAP_FLAGS extraHeapFlags = allocDesc.ExtraHeapFlags & ~RESOURCE_CLASS_HEAP_FLAGS;
75267520

75277521
#if D3D12MA_CREATE_NOT_ZEROED_AVAILABLE
7528-
// If allocator was created with ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED, also ignore
7529-
// D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
7530-
if(m_DefaultPoolsNotZeroed)
7531-
{
7532-
extraHeapFlags &= ~D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
7533-
}
7522+
extraHeapFlags &= ~D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
75347523
#endif
75357524

75367525
if (extraHeapFlags != 0)

0 commit comments

Comments
 (0)