File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6616,6 +6616,14 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
66166616 m_D3D12Architecture.CacheCoherentUMA = FALSE ;
66176617 }
66186618
6619+ #ifdef __ID3D12Device8_INTERFACE_DEFINED__
6620+ D3D12_FEATURE_DATA_D3D12_OPTIONS7 o = {};
6621+ hr = m_Device->CheckFeatureSupport (D3D12_FEATURE_D3D12_OPTIONS7, &o, sizeof (o));
6622+ D3D12_HEAP_FLAGS additionalFlags = (hr == S_OK) ? D3D12_HEAP_FLAG_CREATE_NOT_ZEROED : D3D12_HEAP_FLAG_NONE;
6623+ #else
6624+ constexpr D3D12_HEAP_FLAGS additionalFlags = D3D12_HEAP_FLAG_NONE;
6625+ #endif
6626+
66196627 D3D12_HEAP_PROPERTIES heapProps = {};
66206628 const UINT defaultPoolCount = GetDefaultPoolCount ();
66216629 for (UINT i = 0 ; i < defaultPoolCount; ++i)
@@ -6625,7 +6633,7 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
66256633
66266634#ifdef __ID3D12Device8_INTERFACE_DEFINED__
66276635 if (desc.Flags & ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED)
6628- heapFlags |= D3D12_HEAP_FLAG_CREATE_NOT_ZEROED ;
6636+ heapFlags |= additionalFlags ;
66296637#endif
66306638
66316639 m_BlockVectors[i] = D3D12MA_NEW (GetAllocs (), BlockVector)(
You can’t perform that action at this time.
0 commit comments