diff --git a/docs/html/class_d3_d12_m_a_1_1_allocation-members.html b/docs/html/class_d3_d12_m_a_1_1_allocation-members.html index 0e0838e..4e4bc60 100644 --- a/docs/html/class_d3_d12_m_a_1_1_allocation-members.html +++ b/docs/html/class_d3_d12_m_a_1_1_allocation-members.html @@ -101,7 +101,6 @@ $(function() {
TRUE
if the memory of the allocation was filled with zeros when the allocation was created. Represents single memory allocation.
@@ -385,40 +382,6 @@ Public Member FunctionsReleases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null).
-
-
|
- -inline | -
Returns TRUE
if the memory of the allocation was filled with zeros when the allocation was created.
Returns TRUE
only if the allocator is sure that the entire memory where the allocation was created was filled with zeros at the moment the allocation was made.
Returns FALSE
if the memory could potentially contain garbage data. If it's a render-target or depth-stencil texture, it then needs proper initialization with ClearRenderTargetView
, ClearDepthStencilView
, DiscardResource
, or a copy operation, as described on page "ID3D12Device::CreatePlacedResource method - Notes on the required resource initialization" in Microsoft documentation. Please note that rendering a fullscreen triangle or quad to the texture as a render target is not a proper way of initialization!
See also articles:
-D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA
was found to be true. BOOL D3D12MA::Allocator::IsGPUUploadHeapSupported | +( | +) | +const | +
Returns true if GPU Upload Heaps are supported on the current system.
+When true, you can use D3D12_HEAP_TYPE_GPU_UPLOAD
.
This flag is fetched from D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported
.
#define D3D12MA_OPTIONS16_SUPPORTED 1
is needed for the compilation of this library. Otherwise the flag is always false.
By default, allocations are laid out in memory blocks next to each other if possible (considering required alignment returned by ID3D12Device::GetResourceAllocationInfo
).
To create a custom pool, fill in structure D3D12MA::POOL_DESC and call function D3D12MA::Allocator::CreatePool to obtain object D3D12MA::Pool. Example:
To allocate resources out of a custom pool, only set member D3D12MA::ALLOCATION_DESC::CustomPool. Example:
Although functions like D3D12MA::Allocator::CreateResource() create an allocation and a buffer/texture at once, these are just a shortcut for allocating memory and creating a placed resource. Defragmentation works on memory allocations only. You must handle the rest manually. Defragmentation is an iterative process that should repreat "passes" as long as related functions return S_FALSE
not S_OK
. In each pass:
Version 2.1.0-development (2023-07-05)
-Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
+
Version 2.1.0-development (2024-07-05)
+Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All rights reserved.
License: MIT
Documentation of all members: D3D12MemAlloc.h
(5.) Right before destroying the D3D12 device, destroy the allocator object.
Objects of this library must be destroyed by calling Release
method. They are somewhat compatible with COM: they implement IUnknown
interface with its virtual methods: AddRef
, Release
, QueryInterface
, and they are reference-counted internally. You can use smart pointers designed for COM with objects of this library - e.g. CComPtr
or Microsoft::WRL::ComPtr
. The reference counter is thread-safe. QueryInterface
method supports only IUnknown
, as classes of this library don't define their own GUIDs.
You can query for more detailed statistics per heap type, memory segment group, and totals, including minimum and maximum allocation size and unused range size, by calling function D3D12MA::Allocator::CalculateStatistics() and inspecting structure D3D12MA::TotalStatistics. This function is slower though, as it has to traverse all the internal data structures, so it should be used only for debugging purposes.
You can query for statistics of a custom pool using function D3D12MA::Pool::GetStatistics() or D3D12MA::Pool::CalculateStatistics().
You can query for information about a specific allocation using functions of the D3D12MA::Allocation class, e.g. GetSize()
, GetOffset()
, GetHeap()
.
This is the complete list of members for D3D12MA::TotalStatistics, including all inherited members.
HeapType | D3D12MA::TotalStatistics | |
HeapType | D3D12MA::TotalStatistics | |
MemorySegmentGroup | D3D12MA::TotalStatistics | |
Total | D3D12MA::TotalStatistics |
Public Attributes | |
DetailedStatistics | HeapType [4] |
One element for each type of heap located at the following indices: | |
DetailedStatistics | HeapType [5] |
One element for each type of heap located at the following indices: | |
DetailedStatistics | MemorySegmentGroup [2] |
One element for each memory segment group located at the following indices: | |
DetailedStatistics D3D12MA::TotalStatistics::HeapType[4] | +DetailedStatistics D3D12MA::TotalStatistics::HeapType[5] |
D3D12_HEAP_TYPE_DEFAULT
D3D12_HEAP_TYPE_UPLOAD
D3D12_HEAP_TYPE_READBACK
D3D12_HEAP_TYPE_CUSTOM
D3D12_HEAP_TYPE_CUSTOM
D3D12_HEAP_TYPE_GPU_UPLOAD
Meaning of these segment groups is:
IsUMA() == FALSE
(discrete graphics card):DXGI_MEMORY_SEGMENT_GROUP_LOCAL
(index 0) represents GPU memory (resources allocated in D3D12_HEAP_TYPE_DEFAULT
or D3D12_MEMORY_POOL_L1
).DXGI_MEMORY_SEGMENT_GROUP_LOCAL
(index 0) represents GPU memory (resources allocated in D3D12_HEAP_TYPE_DEFAULT
, D3D12_HEAP_TYPE_GPU_UPLOAD
or D3D12_MEMORY_POOL_L1
).DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL
(index 1) represents system memory (resources allocated in D3D12_HEAP_TYPE_UPLOAD
, D3D12_HEAP_TYPE_READBACK
, or D3D12_MEMORY_POOL_L0
).D3D12MA::VirtualBlock 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 D3D12MA::VirtualAllocation. You will also likely want to know the offset at which the allocation was made in the block.
@@ -119,9 +119,9 @@ Making virtual allocationsWhen no longer needed, an allocation can be freed by calling D3D12MA::VirtualBlock::FreeAllocation.
@@ -158,7 +158,7 @@ Alignment and unitsAlignments 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 sizeof(MyDataStruct)
, 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: