Fixed behavior when ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED is used and ALLOCATION_DESC::ExtraHeapFlags contains D3D12_HEAP_FLAG_CREATE_NOT_ZEROED

It will use default pools now.
See #47
Also regenerated documentation.
This commit is contained in:
Adam Sawicki 2022-12-29 14:21:46 +01:00
parent d46d5fbd5c
commit 9f7b03d244
8 changed files with 280 additions and 33 deletions

View File

@ -84,18 +84,21 @@ $(function() {
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db">BuildStatsString</a>(WCHAR **ppStatsString, BOOL DetailedMap) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db">BuildStatsString</a>(WCHAR **ppStatsString, BOOL DetailedMap) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">CalculateStatistics</a>(TotalStatistics *pStats)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">CalculateStatistics</a>(TotalStatistics *pStats)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a>(Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a>(Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6">CreateAliasingResource1</a>(Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453">CreateAliasingResource2</a>(Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, DXGI_FORMAT *pCastableFormats, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">CreateAllocator</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">CreateAllocator</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a>(const POOL_DESC *pPoolDesc, Pool **ppPool)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a>(const POOL_DESC *pPoolDesc, Pool **ppPool)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">CreateResource</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">CreateResource</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">CreateResource2</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">CreateResource2</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA_DELETE</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747">CreateResource3</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, DXGI_FORMAT *pCastableFormats, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8392663494384c16d8bfa12b827b4f9c">FreeStatsString</a>(WCHAR *pStatsString) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA_DELETE</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a1ac113daec5f6ef28ecb1786cf544144">GetBudget</a>(Budget *pLocalBudget, Budget *pNonLocalBudget)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8392663494384c16d8bfa12b827b4f9c">FreeStatsString</a>(WCHAR *pStatsString) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ae276d2358a58a36f8c6639f837f29be5">GetD3D12Options</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a1ac113daec5f6ef28ecb1786cf544144">GetBudget</a>(Budget *pLocalBudget, Budget *pNonLocalBudget)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a434ae3147209953253da26687bfd62dc">GetMemoryCapacity</a>(UINT memorySegmentGroup) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ae276d2358a58a36f8c6639f837f29be5">GetD3D12Options</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">IsCacheCoherentUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a434ae3147209953253da26687bfd62dc">GetMemoryCapacity</a>(UINT memorySegmentGroup) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">IsUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">IsCacheCoherentUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">SetCurrentFrameIndex</a>(UINT frameIndex)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">IsUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">SetCurrentFrameIndex</a>(UINT frameIndex)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>

View File

@ -111,12 +111,21 @@ Public Member Functions</h2></td></tr>
<tr class="memitem:a7a1c79c79a7a573c438aa45c4a531b96"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">CreateResource2</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr> <tr class="memitem:a7a1c79c79a7a573c438aa45c4a531b96"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">CreateResource2</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:a7a1c79c79a7a573c438aa45c4a531b96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a" title="Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation functi...">Allocator::CreateResource</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">More...</a><br /></td></tr> <tr class="memdesc:a7a1c79c79a7a573c438aa45c4a531b96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a" title="Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation functi...">Allocator::CreateResource</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">More...</a><br /></td></tr>
<tr class="separator:a7a1c79c79a7a573c438aa45c4a531b96"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a7a1c79c79a7a573c438aa45c4a531b96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a323b2af320b01d0fdecfc515c75db747"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747">CreateResource3</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, DXGI_FORMAT *pCastableFormats, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:a323b2af320b01d0fdecfc515c75db747"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96" title="Similar to Allocator::CreateResource, but supports new structure D3D12_RESOURCE_DESC1.">Allocator::CreateResource2</a>, but there are initial layout instead of state and castable formats list. <a href="class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747">More...</a><br /></td></tr>
<tr class="separator:a323b2af320b01d0fdecfc515c75db747"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb8a10a5ea30171ce60128286aec5ee2"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">AllocateMemory</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation)</td></tr> <tr class="memitem:acb8a10a5ea30171ce60128286aec5ee2"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">AllocateMemory</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation)</td></tr>
<tr class="memdesc:acb8a10a5ea30171ce60128286aec5ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory without creating any resource placed in it. <a href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">More...</a><br /></td></tr> <tr class="memdesc:acb8a10a5ea30171ce60128286aec5ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory without creating any resource placed in it. <a href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">More...</a><br /></td></tr>
<tr class="separator:acb8a10a5ea30171ce60128286aec5ee2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:acb8a10a5ea30171ce60128286aec5ee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab45536f92410aedb7be44ea36b1b4717"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a> (<a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td></tr> <tr class="memitem:ab45536f92410aedb7be44ea36b1b4717"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a> (<a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:ab45536f92410aedb7be44ea36b1b4717"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new resource in place of an existing allocation. This is useful for memory aliasing. <a href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">More...</a><br /></td></tr> <tr class="memdesc:ab45536f92410aedb7be44ea36b1b4717"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new resource in place of an existing allocation. This is useful for memory aliasing. <a href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">More...</a><br /></td></tr>
<tr class="separator:ab45536f92410aedb7be44ea36b1b4717"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ab45536f92410aedb7be44ea36b1b4717"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3b83cc5707cb4ed92bc277069c4ddd6"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6">CreateAliasingResource1</a> (<a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:ad3b83cc5707cb4ed92bc277069c4ddd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717" title="Creates a new resource in place of an existing allocation. This is useful for memory aliasing.">Allocator::CreateAliasingResource</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6">More...</a><br /></td></tr>
<tr class="separator:ad3b83cc5707cb4ed92bc277069c4ddd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a562cbaa71cbd333cade09cd67ed82453"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453">CreateAliasingResource2</a> (<a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, DXGI_FORMAT *pCastableFormats, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:a562cbaa71cbd333cade09cd67ed82453"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6" title="Similar to Allocator::CreateAliasingResource, but supports new structure D3D12_RESOURCE_DESC1.">Allocator::CreateAliasingResource1</a>, but there are initial layout instead of state and castable formats list. <a href="class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453">More...</a><br /></td></tr>
<tr class="separator:a562cbaa71cbd333cade09cd67ed82453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a> *pPoolDesc, <a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> **ppPool)</td></tr> <tr class="memitem:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a> *pPoolDesc, <a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> **ppPool)</td></tr>
<tr class="memdesc:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates custom pool. <a href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">More...</a><br /></td></tr> <tr class="memdesc:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates custom pool. <a href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">More...</a><br /></td></tr>
<tr class="separator:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memSeparator" colspan="2">&#160;</td></tr>
@ -352,6 +361,142 @@ Public Member Functions</h2></td></tr>
</dl> </dl>
<p>Memory requirements of the new resource are checked for validation. If its size exceeds the end of <code>pAllocation</code> or required alignment is not fulfilled considering <code>pAllocation-&gt;GetOffset() + AllocationLocalOffset</code>, the function returns <code>E_INVALIDARG</code>. </p> <p>Memory requirements of the new resource are checked for validation. If its size exceeds the end of <code>pAllocation</code> or required alignment is not fulfilled considering <code>pAllocation-&gt;GetOffset() + AllocationLocalOffset</code>, the function returns <code>E_INVALIDARG</code>. </p>
</div>
</div>
<a id="ad3b83cc5707cb4ed92bc277069c4ddd6" name="ad3b83cc5707cb4ed92bc277069c4ddd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3b83cc5707cb4ed92bc277069c4ddd6">&#9670;&#160;</a></span>CreateAliasingResource1()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateAliasingResource1 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *&#160;</td>
<td class="paramname"><em>pAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UINT64&#160;</td>
<td class="paramname"><em>AllocationLocalOffset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC1 *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_RESOURCE_STATES&#160;</td>
<td class="paramname"><em>InitialResourceState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717" title="Creates a new resource in place of an existing allocation. This is useful for memory aliasing.">Allocator::CreateAliasingResource</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. </p>
<p >It internally uses <code>ID3D12Device8::CreatePlacedResource1</code>.</p>
<p >To work correctly, <code>ID3D12Device8</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div>
</div>
<a id="a562cbaa71cbd333cade09cd67ed82453" name="a562cbaa71cbd333cade09cd67ed82453"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a562cbaa71cbd333cade09cd67ed82453">&#9670;&#160;</a></span>CreateAliasingResource2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateAliasingResource2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *&#160;</td>
<td class="paramname"><em>pAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UINT64&#160;</td>
<td class="paramname"><em>AllocationLocalOffset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC1 *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_BARRIER_LAYOUT&#160;</td>
<td class="paramname"><em>InitialLayout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UINT32&#160;</td>
<td class="paramname"><em>NumCastableFormats</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">DXGI_FORMAT *&#160;</td>
<td class="paramname"><em>pCastableFormats</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6" title="Similar to Allocator::CreateAliasingResource, but supports new structure D3D12_RESOURCE_DESC1.">Allocator::CreateAliasingResource1</a>, but there are initial layout instead of state and castable formats list. </p>
<p >It internally uses <code>ID3D12Device10::CreatePlacedResource2</code>.</p>
<p >To work correctly, <code>ID3D12Device10</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div> </div>
</div> </div>
<a id="aac7b1f6bf53cbf4c4ce2264cb72ca515" name="aac7b1f6bf53cbf4c4ce2264cb72ca515"></a> <a id="aac7b1f6bf53cbf4c4ce2264cb72ca515" name="aac7b1f6bf53cbf4c4ce2264cb72ca515"></a>
@ -520,6 +665,80 @@ Public Member Functions</h2></td></tr>
<p >It internally uses <code>ID3D12Device8::CreateCommittedResource2</code> or <code>ID3D12Device8::CreatePlacedResource1</code>.</p> <p >It internally uses <code>ID3D12Device8::CreateCommittedResource2</code> or <code>ID3D12Device8::CreatePlacedResource1</code>.</p>
<p >To work correctly, <code>ID3D12Device8</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p> <p >To work correctly, <code>ID3D12Device8</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div>
</div>
<a id="a323b2af320b01d0fdecfc515c75db747" name="a323b2af320b01d0fdecfc515c75db747"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a323b2af320b01d0fdecfc515c75db747">&#9670;&#160;</a></span>CreateResource3()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateResource3 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC1 *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_BARRIER_LAYOUT&#160;</td>
<td class="paramname"><em>InitialLayout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UINT32&#160;</td>
<td class="paramname"><em>NumCastableFormats</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">DXGI_FORMAT *&#160;</td>
<td class="paramname"><em>pCastableFormats</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96" title="Similar to Allocator::CreateResource, but supports new structure D3D12_RESOURCE_DESC1.">Allocator::CreateResource2</a>, but there are initial layout instead of state and castable formats list. </p>
<p >It internally uses <code>ID3D12Device10::CreateCommittedResource3</code> or <code>ID3D12Device10::CreatePlacedResource2</code>.</p>
<p >To work correctly, <code>ID3D12Device10</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div> </div>
</div> </div>
<a id="a8392663494384c16d8bfa12b827b4f9c" name="a8392663494384c16d8bfa12b827b4f9c"></a> <a id="a8392663494384c16d8bfa12b827b4f9c" name="a8392663494384c16d8bfa12b827b4f9c"></a>

View File

@ -103,10 +103,13 @@ $(function() {
<li>CalculateStatistics()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9">D3D12MA::VirtualBlock</a></li> <li>CalculateStatistics()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9">D3D12MA::VirtualBlock</a></li>
<li>Clear()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">D3D12MA::VirtualBlock</a></li> <li>Clear()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">D3D12MA::VirtualBlock</a></li>
<li>CreateAliasingResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">D3D12MA::Allocator</a></li> <li>CreateAliasingResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">D3D12MA::Allocator</a></li>
<li>CreateAliasingResource1()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6">D3D12MA::Allocator</a></li>
<li>CreateAliasingResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453">D3D12MA::Allocator</a></li>
<li>CreateAllocator&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">D3D12MA::Allocator</a></li> <li>CreateAllocator&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">D3D12MA::Allocator</a></li>
<li>CreatePool()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">D3D12MA::Allocator</a></li> <li>CreatePool()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">D3D12MA::Allocator</a></li>
<li>CreateResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator</a></li> <li>CreateResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator</a></li>
<li>CreateResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">D3D12MA::Allocator</a></li> <li>CreateResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">D3D12MA::Allocator</a></li>
<li>CreateResource3()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747">D3D12MA::Allocator</a></li>
<li>CreateVirtualBlock&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74">D3D12MA::VirtualBlock</a></li> <li>CreateVirtualBlock&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74">D3D12MA::VirtualBlock</a></li>
<li>CustomPool&#160;:&#160;<a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934">D3D12MA::ALLOCATION_DESC</a></li> <li>CustomPool&#160;:&#160;<a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934">D3D12MA::ALLOCATION_DESC</a></li>
</ul> </ul>

View File

@ -88,9 +88,12 @@ $(function() {
<li>CalculateStatistics()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9">D3D12MA::VirtualBlock</a></li> <li>CalculateStatistics()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9">D3D12MA::VirtualBlock</a></li>
<li>Clear()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">D3D12MA::VirtualBlock</a></li> <li>Clear()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">D3D12MA::VirtualBlock</a></li>
<li>CreateAliasingResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">D3D12MA::Allocator</a></li> <li>CreateAliasingResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">D3D12MA::Allocator</a></li>
<li>CreateAliasingResource1()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6">D3D12MA::Allocator</a></li>
<li>CreateAliasingResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453">D3D12MA::Allocator</a></li>
<li>CreatePool()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">D3D12MA::Allocator</a></li> <li>CreatePool()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">D3D12MA::Allocator</a></li>
<li>CreateResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator</a></li> <li>CreateResource()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator</a></li>
<li>CreateResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">D3D12MA::Allocator</a></li> <li>CreateResource2()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96">D3D12MA::Allocator</a></li>
<li>CreateResource3()&#160;:&#160;<a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747">D3D12MA::Allocator</a></li>
</ul> </ul>

View File

@ -4,11 +4,14 @@ var searchData=
['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]], ['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]],
['configuration_2',['Configuration',['../configuration.html',1,'index']]], ['configuration_2',['Configuration',['../configuration.html',1,'index']]],
['createaliasingresource_3',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]], ['createaliasingresource_3',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]],
['createallocator_4',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459',1,'D3D12MA::Allocator::CreateAllocator()'],['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA::CreateAllocator()']]], ['createaliasingresource1_4',['CreateAliasingResource1',['../class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6',1,'D3D12MA::Allocator']]],
['createpool_5',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]], ['createaliasingresource2_5',['CreateAliasingResource2',['../class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453',1,'D3D12MA::Allocator']]],
['createresource_6',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]], ['createallocator_6',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459',1,'D3D12MA::Allocator::CreateAllocator()'],['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA::CreateAllocator()']]],
['createresource2_7',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96',1,'D3D12MA::Allocator']]], ['createpool_7',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]],
['createvirtualblock_8',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74',1,'D3D12MA::VirtualBlock::CreateVirtualBlock()'],['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA::CreateVirtualBlock()']]], ['createresource_8',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]],
['custom_20memory_20pools_9',['Custom memory pools',['../custom_pools.html',1,'index']]], ['createresource2_9',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96',1,'D3D12MA::Allocator']]],
['custompool_10',['CustomPool',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934',1,'D3D12MA::ALLOCATION_DESC']]] ['createresource3_10',['CreateResource3',['../class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747',1,'D3D12MA::Allocator']]],
['createvirtualblock_11',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74',1,'D3D12MA::VirtualBlock::CreateVirtualBlock()'],['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA::CreateVirtualBlock()']]],
['custom_20memory_20pools_12',['Custom memory pools',['../custom_pools.html',1,'index']]],
['custompool_13',['CustomPool',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934',1,'D3D12MA::ALLOCATION_DESC']]]
]; ];

View File

@ -3,9 +3,12 @@ var searchData=
['calculatestatistics_0',['CalculateStatistics',['../class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910',1,'D3D12MA::Pool::CalculateStatistics()'],['../class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22',1,'D3D12MA::Allocator::CalculateStatistics()'],['../class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9',1,'D3D12MA::VirtualBlock::CalculateStatistics(DetailedStatistics *pStats) const']]], ['calculatestatistics_0',['CalculateStatistics',['../class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910',1,'D3D12MA::Pool::CalculateStatistics()'],['../class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22',1,'D3D12MA::Allocator::CalculateStatistics()'],['../class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9',1,'D3D12MA::VirtualBlock::CalculateStatistics(DetailedStatistics *pStats) const']]],
['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]], ['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]],
['createaliasingresource_2',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]], ['createaliasingresource_2',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]],
['createallocator_3',['CreateAllocator',['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA']]], ['createaliasingresource1_3',['CreateAliasingResource1',['../class_d3_d12_m_a_1_1_allocator.html#ad3b83cc5707cb4ed92bc277069c4ddd6',1,'D3D12MA::Allocator']]],
['createpool_4',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]], ['createaliasingresource2_4',['CreateAliasingResource2',['../class_d3_d12_m_a_1_1_allocator.html#a562cbaa71cbd333cade09cd67ed82453',1,'D3D12MA::Allocator']]],
['createresource_5',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]], ['createallocator_5',['CreateAllocator',['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA']]],
['createresource2_6',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96',1,'D3D12MA::Allocator']]], ['createpool_6',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]],
['createvirtualblock_7',['CreateVirtualBlock',['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA']]] ['createresource_7',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]],
['createresource2_8',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#a7a1c79c79a7a573c438aa45c4a531b96',1,'D3D12MA::Allocator']]],
['createresource3_9',['CreateResource3',['../class_d3_d12_m_a_1_1_allocator.html#a323b2af320b01d0fdecfc515c75db747',1,'D3D12MA::Allocator']]],
['createvirtualblock_10',['CreateVirtualBlock',['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA']]]
]; ];

View File

@ -90,9 +90,9 @@ Creating virtual block</h1>
<div class="line"> </div> <div class="line"> </div>
<div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a> *block;</div> <div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a> *block;</div>
<div class="line">HRESULT hr = CreateVirtualBlock(&amp;blockDesc, &amp;block);</div> <div class="line">HRESULT hr = CreateVirtualBlock(&amp;blockDesc, &amp;block);</div>
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></div><div class="ttdoc">Represents pure allocation algorithm and a data structure with allocations in some memory block,...</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1453</div></div> <div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></div><div class="ttdoc">Represents pure allocation algorithm and a data structure with allocations in some memory block,...</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1507</div></div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html">D3D12MA::VIRTUAL_BLOCK_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1359</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html">D3D12MA::VIRTUAL_BLOCK_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1413</div></div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html_ac56491679f276a5a9956ed99bc4654e4"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html#ac56491679f276a5a9956ed99bc4654e4">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Total size of the block.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1367</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html_ac56491679f276a5a9956ed99bc4654e4"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html#ac56491679f276a5a9956ed99bc4654e4">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Total size of the block.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1421</div></div>
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a> </div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a>
Making virtual allocations</h1> Making virtual allocations</h1>
<p ><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html" title="Represents pure allocation algorithm and a data structure with allocations in some memory block,...">D3D12MA::VirtualBlock</a> object contains internal data structure that keeps track of free and occupied regions using the same code as the main D3D12 memory allocator. A single allocation is identified by a lightweight structure <a class="el" href="struct_d3_d12_m_a_1_1_virtual_allocation.html" title="Represents single memory allocation done inside VirtualBlock.">D3D12MA::VirtualAllocation</a>. You will also likely want to know the offset at which the allocation was made in the block.</p> <p ><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html" title="Represents pure allocation algorithm and a data structure with allocations in some memory block,...">D3D12MA::VirtualBlock</a> object contains internal data structure that keeps track of free and occupied regions using the same code as the main D3D12 memory allocator. A single allocation is identified by a lightweight structure <a class="el" href="struct_d3_d12_m_a_1_1_virtual_allocation.html" title="Represents single memory allocation done inside VirtualBlock.">D3D12MA::VirtualAllocation</a>. You will also likely want to know the offset at which the allocation was made in the block.</p>
@ -117,8 +117,8 @@ Making virtual allocations</h1>
<div class="line"> <span class="comment">// Allocation failed - no space for it could be found. Handle this error!</span></div> <div class="line"> <span class="comment">// Allocation failed - no space for it could be found. Handle this error!</span></div>
<div class="line">}</div> <div class="line">}</div>
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_a9281daf76e888ea1bd5247d5732e8179"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">D3D12MA::VirtualBlock::Allocate</a></div><div class="ttdeci">HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)</div><div class="ttdoc">Creates new allocation.</div></div> <div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_a9281daf76e888ea1bd5247d5732e8179"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">D3D12MA::VirtualBlock::Allocate</a></div><div class="ttdeci">HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)</div><div class="ttdoc">Creates new allocation.</div></div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1404</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1458</div></div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_a976b649e45abdd0769da0d79acde4bac"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#a976b649e45abdd0769da0d79acde4bac">D3D12MA::VIRTUAL_ALLOCATION_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1411</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_a976b649e45abdd0769da0d79acde4bac"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#a976b649e45abdd0769da0d79acde4bac">D3D12MA::VIRTUAL_ALLOCATION_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1465</div></div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_virtual_allocation_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a></div><div class="ttdoc">Represents single memory allocation done inside VirtualBlock.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:453</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_virtual_allocation_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a></div><div class="ttdoc">Represents single memory allocation done inside VirtualBlock.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:453</div></div>
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a> </div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a>
Deallocation</h1> Deallocation</h1>
@ -156,7 +156,7 @@ Alignment and units</h1>
<div class="line"><a class="code hl_struct" href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a> alloc;</div> <div class="line"><a class="code hl_struct" href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a> alloc;</div>
<div class="line">UINT64 allocOffset;</div> <div class="line">UINT64 allocOffset;</div>
<div class="line">hr = block-&gt;<a class="code hl_function" href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">Allocate</a>(&amp;allocDesc, &amp;alloc, &amp;allocOffset);</div> <div class="line">hr = block-&gt;<a class="code hl_function" href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">Allocate</a>(&amp;allocDesc, &amp;alloc, &amp;allocOffset);</div>
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_aaa95e62f2f399339a09dcbb312a42de0"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aaa95e62f2f399339a09dcbb312a42de0">D3D12MA::VIRTUAL_ALLOCATION_DESC::Alignment</a></div><div class="ttdeci">UINT64 Alignment</div><div class="ttdoc">Required alignment of the allocation.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1416</div></div> <div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_aaa95e62f2f399339a09dcbb312a42de0"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aaa95e62f2f399339a09dcbb312a42de0">D3D12MA::VIRTUAL_ALLOCATION_DESC::Alignment</a></div><div class="ttdeci">UINT64 Alignment</div><div class="ttdoc">Required alignment of the allocation.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1470</div></div>
</div><!-- fragment --><p >Alignments of different allocations made from one block may vary. However, if all alignments and sizes are always multiply of some size e.g. 4 B or <code>sizeof(MyDataStruct)</code>, you can express all sizes, alignments, and offsets in multiples of that size instead of individual bytes. It might be more convenient, but you need to make sure to use this new unit consistently in all the places:</p> </div><!-- fragment --><p >Alignments of different allocations made from one block may vary. However, if all alignments and sizes are always multiply of some size e.g. 4 B or <code>sizeof(MyDataStruct)</code>, you can express all sizes, alignments, and offsets in multiples of that size instead of individual bytes. It might be more convenient, but you need to make sure to use this new unit consistently in all the places:</p>
<ul> <ul>
<li><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html#ac56491679f276a5a9956ed99bc4654e4" title="Total size of the block.">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></li> <li><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html#ac56491679f276a5a9956ed99bc4654e4" title="Total size of the block.">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></li>

View File

@ -6636,6 +6636,7 @@ private:
const bool m_UseMutex; const bool m_UseMutex;
const bool m_AlwaysCommitted; const bool m_AlwaysCommitted;
const bool m_MsaaAlwaysCommitted; const bool m_MsaaAlwaysCommitted;
bool m_DefaultPoolsNotZeroed = false;
ID3D12Device* m_Device; // AddRef ID3D12Device* m_Device; // AddRef
#ifdef __ID3D12Device1_INTERFACE_DEFINED__ #ifdef __ID3D12Device1_INTERFACE_DEFINED__
ID3D12Device1* m_Device1 = NULL; // AddRef, optional ID3D12Device1* m_Device1 = NULL; // AddRef, optional
@ -6752,8 +6753,6 @@ AllocatorPimpl::AllocatorPimpl(const ALLOCATION_CALLBACKS& allocationCallbacks,
HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc) HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
{ {
bool notZeroedSupported = false;
#if D3D12MA_DXGI_1_4 #if D3D12MA_DXGI_1_4
desc.pAdapter->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Adapter3)); desc.pAdapter->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Adapter3));
#endif #endif
@ -6769,10 +6768,14 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
#ifdef __ID3D12Device8_INTERFACE_DEFINED__ #ifdef __ID3D12Device8_INTERFACE_DEFINED__
m_Device->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Device8)); m_Device->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Device8));
D3D12_FEATURE_DATA_D3D12_OPTIONS7 options7 = {}; if((desc.Flags & ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED) != 0)
if(SUCCEEDED(m_Device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS7, &options7, sizeof(options7))))
{ {
notZeroedSupported = true; D3D12_FEATURE_DATA_D3D12_OPTIONS7 options7 = {};
if(SUCCEEDED(m_Device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS7, &options7, sizeof(options7))))
{
// DEFAULT_POOLS_NOT_ZEROED both supported and enabled by the user.
m_DefaultPoolsNotZeroed = true;
}
} }
#endif #endif
@ -6810,7 +6813,7 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
CalcDefaultPoolParams(heapProps.Type, heapFlags, i); CalcDefaultPoolParams(heapProps.Type, heapFlags, i);
#ifdef __ID3D12Device8_INTERFACE_DEFINED__ #ifdef __ID3D12Device8_INTERFACE_DEFINED__
if ((desc.Flags & ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED) != 0 && notZeroedSupported) if(m_DefaultPoolsNotZeroed)
{ {
heapFlags |= D3D12_HEAP_FLAG_CREATE_NOT_ZEROED; heapFlags |= D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
} }
@ -8042,7 +8045,17 @@ HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, U
UINT AllocatorPimpl::CalcDefaultPoolIndex(const ALLOCATION_DESC& allocDesc, ResourceClass resourceClass) const UINT AllocatorPimpl::CalcDefaultPoolIndex(const ALLOCATION_DESC& allocDesc, ResourceClass resourceClass) const
{ {
const D3D12_HEAP_FLAGS extraHeapFlags = allocDesc.ExtraHeapFlags & ~RESOURCE_CLASS_HEAP_FLAGS; D3D12_HEAP_FLAGS extraHeapFlags = allocDesc.ExtraHeapFlags & ~RESOURCE_CLASS_HEAP_FLAGS;
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
// If allocator was created with ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED, also ignore
// D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
if(m_DefaultPoolsNotZeroed)
{
extraHeapFlags &= ~D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
}
#endif
if (extraHeapFlags != 0) if (extraHeapFlags != 0)
{ {
return UINT32_MAX; return UINT32_MAX;