diff --git a/CHANGELOG.md b/CHANGELOG.md index f8ae061..f26d5f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# 3.1.0 (2026-02-23) + +- Added supported for resource tight alignment (feature added in Agility SDK 1.618.1). It is used automatically when available. + - Added function `Allocator::IsTightAlignmentSupported`. + - Added `ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT`. +- Fixes and improvements in the internal function `AllocatorPimpl::GetResourceAllocationInfo` (which decides when to use small alignment or tight alignment), including: + - Added support for 1D and 3D textures when `D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 2` (#78, #79). + - Fix for cases when `D3D12_TEXTURE_LAYOUT_64KB_*_SWIZZLE` is used (#86). +- Fixes for build errors in MinGW (#77). +- Fixes and improvements in documentation and tests. + # 3.0.1 (2025-05-08) - Fixed macros `D3D12MA_RECOMMENDED_ALLOCATOR_FLAGS`, `D3D12MA_RECOMMENDED_POOL_FLAGS` (#73). diff --git a/CMakeLists.txt b/CMakeLists.txt index 831d43f..6d61b21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -project(D3D12MemoryAllocator VERSION 3.0.2) +project(D3D12MemoryAllocator VERSION 3.1.0) set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/LICENSE.txt b/LICENSE.txt index eb08d9e..3d5a69a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bin/D3D12Sample.exe b/bin/D3D12Sample.exe index 628c38d..8b4bb3d 100644 Binary files a/bin/D3D12Sample.exe and b/bin/D3D12Sample.exe differ diff --git a/docs/html/_d3_d12_mem_alloc_8h.html b/docs/html/_d3_d12_mem_alloc_8h.html index 36f1863..2a34c7a 100644 --- a/docs/html/_d3_d12_mem_alloc_8h.html +++ b/docs/html/_d3_d12_mem_alloc_8h.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: C:/Code/D3D12MemoryAllocator/REPO/include/D3D12MemAlloc.h File Reference @@ -31,7 +31,7 @@ - + @@ -90,88 +90,88 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Classes

struct  D3D12MA::ALLOCATION_CALLBACKS
struct  D3D12MA::ALLOCATION_CALLBACKS
 Custom callbacks to CPU memory allocation functions. More...
struct  D3D12MA::ALLOCATION_DESC
struct  D3D12MA::ALLOCATION_DESC
 Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource. More...
struct  D3D12MA::Statistics
struct  D3D12MA::Statistics
 Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total. More...
struct  D3D12MA::DetailedStatistics
struct  D3D12MA::DetailedStatistics
 More detailed statistics than D3D12MA::Statistics. More...
struct  D3D12MA::TotalStatistics
struct  D3D12MA::TotalStatistics
 General statistics from current state of the allocator - total memory usage across all memory heaps and segments. More...
struct  D3D12MA::Budget
struct  D3D12MA::Budget
 Statistics of current memory usage and available budget for a specific memory segment group. More...
struct  D3D12MA::VirtualAllocation
struct  D3D12MA::VirtualAllocation
 Represents single memory allocation done inside VirtualBlock. More...
class  D3D12MA::Allocation
class  D3D12MA::Allocation
 Represents single memory allocation. More...
struct  D3D12MA::DEFRAGMENTATION_DESC
struct  D3D12MA::DEFRAGMENTATION_DESC
 Parameters for defragmentation. More...
struct  D3D12MA::DEFRAGMENTATION_MOVE
struct  D3D12MA::DEFRAGMENTATION_MOVE
 Single move of an allocation to be done for defragmentation. More...
struct  D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO
struct  D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO
 Parameters for incremental defragmentation steps. More...
struct  D3D12MA::DEFRAGMENTATION_STATS
struct  D3D12MA::DEFRAGMENTATION_STATS
 Statistics returned for defragmentation process by function DefragmentationContext::GetStats(). More...
class  D3D12MA::DefragmentationContext
class  D3D12MA::DefragmentationContext
 Represents defragmentation process in progress. More...
struct  D3D12MA::POOL_DESC
struct  D3D12MA::POOL_DESC
 Parameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool. More...
class  D3D12MA::Pool
class  D3D12MA::Pool
 Custom memory pool. More...
struct  D3D12MA::ALLOCATOR_DESC
struct  D3D12MA::ALLOCATOR_DESC
 Parameters of created Allocator object. To be used with CreateAllocator(). More...
class  D3D12MA::Allocator
class  D3D12MA::Allocator
 Represents main object of this library initialized for particular ID3D12Device. More...
struct  D3D12MA::VIRTUAL_BLOCK_DESC
struct  D3D12MA::VIRTUAL_BLOCK_DESC
 Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock(). More...
struct  D3D12MA::VIRTUAL_ALLOCATION_DESC
struct  D3D12MA::VIRTUAL_ALLOCATION_DESC
 Parameters of created virtual allocation to be passed to VirtualBlock::Allocate(). More...
struct  D3D12MA::VIRTUAL_ALLOCATION_INFO
struct  D3D12MA::VIRTUAL_ALLOCATION_INFO
 Parameters of an existing virtual allocation, returned by VirtualBlock::GetAllocationInfo(). More...
class  D3D12MA::VirtualBlock
class  D3D12MA::VirtualBlock
 Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory. More...
struct  D3D12MA::CALLOCATION_DESC
struct  D3D12MA::CALLOCATION_DESC
 Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure. More...
struct  D3D12MA::CPOOL_DESC
struct  D3D12MA::CPOOL_DESC
 Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure. More...
struct  D3D12MA::CVIRTUAL_BLOCK_DESC
struct  D3D12MA::CVIRTUAL_BLOCK_DESC
 Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure. More...
struct  D3D12MA::CVIRTUAL_ALLOCATION_DESC
struct  D3D12MA::CVIRTUAL_ALLOCATION_DESC
 Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure. More...
- +

Namespaces

namespace  D3D12MA
namespace  D3D12MA
- + - + - + - + - + - +

Macros

#define D3D12MA_DXGI_1_4   1
#define D3D12MA_DXGI_1_4   1
 Define this macro to 0 to disable usage of DXGI 1.4 (which is used for IDXGIAdapter3 and query for memory budget).
#define D3D12MA_CREATE_NOT_ZEROED_AVAILABLE   1
#define D3D12MA_CREATE_NOT_ZEROED_AVAILABLE   1
 This macro is defined to 0 or 1 automatically. Define it to 0 to disable support for D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
#define D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT   1
#define D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT   1
 When defined to value other than 0, the library will try to use D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT or D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT for created textures when possible, which can save memory because some small textures may get their alignment 4 KB and their size a multiply of 4 KB instead of 64 KB.
#define D3D12MA_RECOMMENDED_ALLOCATOR_FLAGS   (D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED | D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED)
#define D3D12MA_RECOMMENDED_ALLOCATOR_FLAGS   (D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED | D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED)
 Set of flags recommended for use in D3D12MA::ALLOCATOR_DESC::Flags for optimal performance.
#define D3D12MA_RECOMMENDED_HEAP_FLAGS   (D3D12_HEAP_FLAG_NONE)
#define D3D12MA_RECOMMENDED_HEAP_FLAGS   (D3D12_HEAP_FLAG_NONE)
 Set of flags recommended for use in D3D12MA::POOL_DESC::HeapFlags for optimal performance.
#define D3D12MA_RECOMMENDED_POOL_FLAGS   (D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED)
#define D3D12MA_RECOMMENDED_POOL_FLAGS   (D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED)
 Set of flags recommended for use in D3D12MA::POOL_DESC::Flags for optimal performance.
- + - + - +

Typedefs

typedef UINT64 D3D12MA::AllocHandle
typedef UINT64 D3D12MA::AllocHandle
 Unique identifier of single allocation done inside the memory heap.
using D3D12MA::ALLOCATE_FUNC_PTR = void* (*)(size_t Size, size_t Alignment, void* pPrivateData)
using D3D12MA::ALLOCATE_FUNC_PTR = void* (*)(size_t Size, size_t Alignment, void* pPrivateData)
 Pointer to custom callback function that allocates CPU memory.
using D3D12MA::FREE_FUNC_PTR = void (*)(void* pMemory, void* pPrivateData)
using D3D12MA::FREE_FUNC_PTR = void (*)(void* pMemory, void* pPrivateData)
 Pointer to custom callback function that deallocates CPU memory.
- - - + - - + - - - + - - + - - + - +

Enumerations

enum  D3D12MA::ALLOCATION_FLAGS {
+
enum  D3D12MA::ALLOCATION_FLAGS {
  D3D12MA::ALLOCATION_FLAG_NONE = 0 , D3D12MA::ALLOCATION_FLAG_COMMITTED = 0x1 , D3D12MA::ALLOCATION_FLAG_NEVER_ALLOCATE = 0x2 @@ -188,19 +188,19 @@ , D3D12MA::ALLOCATION_FLAG_STRATEGY_MASK
}
 Bit flags to be used with ALLOCATION_DESC::Flags. More...
enum  D3D12MA::DEFRAGMENTATION_FLAGS { D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_FAST = 0x1 +
 Bit flags to be used with ALLOCATION_DESC::Flags. More...
enum  D3D12MA::DEFRAGMENTATION_FLAGS { D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_FAST = 0x1 , D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED = 0x2 , D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_FULL = 0x4 , D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_MASK }
 Flags to be passed as DEFRAGMENTATION_DESC::Flags. More...
enum  D3D12MA::DEFRAGMENTATION_MOVE_OPERATION { D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_COPY = 0 +
 Flags to be passed as DEFRAGMENTATION_DESC::Flags. More...
enum  D3D12MA::DEFRAGMENTATION_MOVE_OPERATION { D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_COPY = 0 , D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_IGNORE = 1 , D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_DESTROY = 2 }
 Operation performed on single defragmentation move. More...
enum  D3D12MA::POOL_FLAGS {
+
enum  D3D12MA::POOL_FLAGS {
  D3D12MA::POOL_FLAG_NONE = 0 , D3D12MA::POOL_FLAG_ALGORITHM_LINEAR = 0x1 , D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x2 @@ -209,8 +209,8 @@   D3D12MA::POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
}
 Bit flags to be used with POOL_DESC::Flags. More...
enum  D3D12MA::ALLOCATOR_FLAGS {
+
 Bit flags to be used with POOL_DESC::Flags. More...
enum  D3D12MA::ALLOCATOR_FLAGS {
  D3D12MA::ALLOCATOR_FLAG_NONE = 0 , D3D12MA::ALLOCATOR_FLAG_SINGLETHREADED = 0x1 , D3D12MA::ALLOCATOR_FLAG_ALWAYS_COMMITTED = 0x2 @@ -221,13 +221,13 @@ , D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT = 0x20
}
 Bit flags to be used with ALLOCATOR_DESC::Flags. More...
enum  D3D12MA::VIRTUAL_BLOCK_FLAGS { D3D12MA::VIRTUAL_BLOCK_FLAG_NONE = 0 +
 Bit flags to be used with ALLOCATOR_DESC::Flags. More...
enum  D3D12MA::VIRTUAL_BLOCK_FLAGS { D3D12MA::VIRTUAL_BLOCK_FLAG_NONE = 0 , D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR = POOL_FLAG_ALGORITHM_LINEAR , D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_MASK }
 Bit flags to be used with VIRTUAL_BLOCK_DESC::Flags. More...
enum  D3D12MA::VIRTUAL_ALLOCATION_FLAGS {
+
 Bit flags to be used with VIRTUAL_BLOCK_DESC::Flags. More...
enum  D3D12MA::VIRTUAL_ALLOCATION_FLAGS {
  D3D12MA::VIRTUAL_ALLOCATION_FLAG_NONE = 0 , D3D12MA::VIRTUAL_ALLOCATION_FLAG_UPPER_ADDRESS = ALLOCATION_FLAG_UPPER_ADDRESS , D3D12MA::VIRTUAL_ALLOCATION_FLAG_STRATEGY_MIN_MEMORY = ALLOCATION_FLAG_STRATEGY_MIN_MEMORY @@ -237,13 +237,13 @@ , D3D12MA::VIRTUAL_ALLOCATION_FLAG_STRATEGY_MASK = ALLOCATION_FLAG_STRATEGY_MASK
}
 Bit flags to be used with VIRTUAL_ALLOCATION_DESC::Flags. More...
 Bit flags to be used with VIRTUAL_ALLOCATION_DESC::Flags. More...
- + - +

Functions

D3D12MA_API HRESULT D3D12MA::CreateAllocator (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
D3D12MA_API HRESULT D3D12MA::CreateAllocator (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
 Creates new main D3D12MA::Allocator object and returns it through ppAllocator.
D3D12MA_API HRESULT D3D12MA::CreateVirtualBlock (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)
D3D12MA_API HRESULT D3D12MA::CreateVirtualBlock (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)
 Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.

Macro Definition Documentation

@@ -341,9 +341,9 @@

D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT or D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT for created textures when possible, which can save memory because some small textures may get their alignment 4 KB and their size a multiply of 4 KB instead of 64 KB.

@@ -351,7 +351,7 @@

diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 1566741..7b7e1fd 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class List @@ -31,7 +31,7 @@ - + @@ -77,37 +77,37 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- - - - - + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
 ND3D12MA
 CAllocationRepresents single memory allocation
 CALLOCATION_CALLBACKSCustom callbacks to CPU memory allocation functions
 CALLOCATION_DESCParameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource
 CAllocatorRepresents main object of this library initialized for particular ID3D12Device
 CALLOCATOR_DESCParameters of created Allocator object. To be used with CreateAllocator()
 CALLOCATION_CALLBACKSCustom callbacks to CPU memory allocation functions
 CALLOCATION_DESCParameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource
 CStatisticsCalculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total
 CDetailedStatisticsMore detailed statistics than D3D12MA::Statistics
 CTotalStatisticsGeneral statistics from current state of the allocator - total memory usage across all memory heaps and segments
 CBudgetStatistics of current memory usage and available budget for a specific memory segment group
 CCALLOCATION_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure
 CCPOOL_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure
 CCVIRTUAL_ALLOCATION_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure
 CCVIRTUAL_BLOCK_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure
 CDEFRAGMENTATION_DESCParameters for defragmentation
 CDEFRAGMENTATION_MOVESingle move of an allocation to be done for defragmentation
 CDEFRAGMENTATION_PASS_MOVE_INFOParameters for incremental defragmentation steps
 CDEFRAGMENTATION_STATSStatistics returned for defragmentation process by function DefragmentationContext::GetStats()
 CDefragmentationContextRepresents defragmentation process in progress
 CDetailedStatisticsMore detailed statistics than D3D12MA::Statistics
 CPoolCustom memory pool
 CPOOL_DESCParameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool
 CStatisticsCalculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total
 CTotalStatisticsGeneral statistics from current state of the allocator - total memory usage across all memory heaps and segments
 CVIRTUAL_ALLOCATION_DESCParameters of created virtual allocation to be passed to VirtualBlock::Allocate()
 CVIRTUAL_ALLOCATION_INFOParameters of an existing virtual allocation, returned by VirtualBlock::GetAllocationInfo()
 CVIRTUAL_BLOCK_DESCParameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock()
 CVirtualAllocationRepresents single memory allocation done inside VirtualBlock
 CVirtualBlockRepresents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory
 CVirtualAllocationRepresents single memory allocation done inside VirtualBlock
 CAllocationRepresents single memory allocation
 CDEFRAGMENTATION_DESCParameters for defragmentation
 CDEFRAGMENTATION_MOVESingle move of an allocation to be done for defragmentation
 CDEFRAGMENTATION_PASS_MOVE_INFOParameters for incremental defragmentation steps
 CDEFRAGMENTATION_STATSStatistics returned for defragmentation process by function DefragmentationContext::GetStats()
 CDefragmentationContextRepresents defragmentation process in progress
 CPOOL_DESCParameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool
 CPoolCustom memory pool
 CALLOCATOR_DESCParameters of created Allocator object. To be used with CreateAllocator()
 CAllocatorRepresents main object of this library initialized for particular ID3D12Device
 CVIRTUAL_BLOCK_DESCParameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock()
 CVIRTUAL_ALLOCATION_DESCParameters of created virtual allocation to be passed to VirtualBlock::Allocate()
 CVIRTUAL_ALLOCATION_INFOParameters of an existing virtual allocation, returned by VirtualBlock::GetAllocationInfo()
 CVirtualBlockRepresents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory
 CCALLOCATION_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure
 CCPOOL_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure
 CCVIRTUAL_BLOCK_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure
 CCVIRTUAL_ALLOCATION_DESCHelper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure
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 288ed6d..d4f8f83 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 @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -104,7 +104,7 @@ diff --git a/docs/html/class_d3_d12_m_a_1_1_allocation.html b/docs/html/class_d3_d12_m_a_1_1_allocation.html index 45634b9..fe7e28e 100644 --- a/docs/html/class_d3_d12_m_a_1_1_allocation.html +++ b/docs/html/class_d3_d12_m_a_1_1_allocation.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::Allocation Class Reference @@ -31,7 +31,7 @@ - + @@ -95,25 +95,25 @@ - + - + - + - + - + - + - + - + - + - +

Public Member Functions

UINT64 GetOffset () const
UINT64 GetOffset () const
 Returns offset in bytes from the start of memory heap.
UINT64 GetAlignment () const
UINT64 GetAlignment () const
 Returns alignment that resource was created with.
UINT64 GetSize () const
UINT64 GetSize () const
 Returns size in bytes of the allocation.
ID3D12Resource * GetResource () const
ID3D12Resource * GetResource () const
 Returns D3D12 resource associated with this object.
void SetResource (ID3D12Resource *pResource)
void SetResource (ID3D12Resource *pResource)
 Releases the resource currently pointed by the allocation (if not null), sets it to new one, incrementing its reference counter (if not null).
ID3D12Heap * GetHeap () const
ID3D12Heap * GetHeap () const
 Returns memory heap that the resource is created in.
void SetPrivateData (void *pPrivateData)
void SetPrivateData (void *pPrivateData)
 Changes custom pointer for an allocation to a new value.
void * GetPrivateData () const
void * GetPrivateData () const
 Get custom pointer associated with the allocation.
void SetName (LPCWSTR Name)
void SetName (LPCWSTR Name)
 Associates a name with the allocation object. This name is for use in debug diagnostics and tools.
LPCWSTR GetName () const
LPCWSTR GetName () const
 Returns the name associated with the allocation object.

Detailed Description

@@ -371,7 +371,7 @@

Releases the resource currently pointed by the allocation (if not null), sets it to new one, incrementing its reference counter (if not null).

-
Warning
This is an advanced feature that should be used only in special cases, e.g. during Defragmentation. Typically, an allocation object should reference the resource that was created together with it. If you swap it to another resource of different size, Statistics and budgets can be calculated incorrectly.
+
Warning
This is an advanced feature that should be used only in special cases, e.g. during Defragmentation. Typically, an allocation object should reference the resource that was created together with it. If you swap it to another resource of different size, Statistics and budgets can be calculated incorrectly.
@@ -481,7 +481,7 @@

- +
Allocation* D3D12MA::Allocation::nextAllocation* D3D12MA::Allocation::next
@@ -508,7 +508,7 @@

diff --git a/docs/html/class_d3_d12_m_a_1_1_allocator-members.html b/docs/html/class_d3_d12_m_a_1_1_allocator-members.html index 4e80d94..032e349 100644 --- a/docs/html/class_d3_d12_m_a_1_1_allocator-members.html +++ b/docs/html/class_d3_d12_m_a_1_1_allocator-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -106,7 +106,7 @@ diff --git a/docs/html/class_d3_d12_m_a_1_1_allocator.html b/docs/html/class_d3_d12_m_a_1_1_allocator.html index 997e7d0..6263297 100644 --- a/docs/html/class_d3_d12_m_a_1_1_allocator.html +++ b/docs/html/class_d3_d12_m_a_1_1_allocator.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::Allocator Class Reference @@ -31,7 +31,7 @@ - + @@ -95,45 +95,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Public Member Functions

const D3D12_FEATURE_DATA_D3D12_OPTIONS & GetD3D12Options () const
const D3D12_FEATURE_DATA_D3D12_OPTIONS & GetD3D12Options () const
 Returns cached options retrieved from D3D12 device.
BOOL IsUMA () const
BOOL IsUMA () const
 Returns true if D3D12_FEATURE_DATA_ARCHITECTURE1::UMA was found to be true.
BOOL IsCacheCoherentUMA () const
BOOL IsCacheCoherentUMA () const
 Returns true if D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA was found to be true.
BOOL IsGPUUploadHeapSupported () const
BOOL IsGPUUploadHeapSupported () const
 Returns true if GPU Upload Heaps are supported on the current system.
BOOL IsTightAlignmentSupported () const
BOOL IsTightAlignmentSupported () const
 Returns true if resource tight alignment is supported on the current system. When supported, it is automatically used by the library, unless ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT flag was specified on allocator creation. This flag is fetched from D3D12_FEATURE_DATA_TIGHT_ALIGNMENT::SupportTier.
UINT64 GetMemoryCapacity (UINT memorySegmentGroup) const
UINT64 GetMemoryCapacity (UINT memorySegmentGroup) const
 Returns total amount of memory of specific segment group, in bytes.
HRESULT CreateResource (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
HRESULT CreateResource (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
 Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation function.
HRESULT CreateResource2 (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
HRESULT CreateResource2 (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
 Similar to Allocator::CreateResource, but supports new structure D3D12_RESOURCE_DESC1.
HRESULT CreateResource3 (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, const DXGI_FORMAT *pCastableFormats, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
HRESULT CreateResource3 (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, const DXGI_FORMAT *pCastableFormats, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)
 Similar to Allocator::CreateResource2, but there are initial layout instead of state and castable formats list.
HRESULT AllocateMemory (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, Allocation **ppAllocation)
HRESULT AllocateMemory (const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, Allocation **ppAllocation)
 Allocates memory without creating any resource placed in it.
HRESULT CreateAliasingResource (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)
HRESULT CreateAliasingResource (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)
 Creates a new resource in place of an existing allocation. This is useful for memory aliasing.
HRESULT CreateAliasingResource1 (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)
HRESULT CreateAliasingResource1 (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)
 Similar to Allocator::CreateAliasingResource, but supports new structure D3D12_RESOURCE_DESC1.
HRESULT CreateAliasingResource2 (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, const DXGI_FORMAT *pCastableFormats, REFIID riidResource, void **ppvResource)
HRESULT CreateAliasingResource2 (Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_BARRIER_LAYOUT InitialLayout, const D3D12_CLEAR_VALUE *pOptimizedClearValue, UINT32 NumCastableFormats, const DXGI_FORMAT *pCastableFormats, REFIID riidResource, void **ppvResource)
 Similar to Allocator::CreateAliasingResource1, but there are initial layout instead of state and castable formats list.
HRESULT CreatePool (const POOL_DESC *pPoolDesc, Pool **ppPool)
HRESULT CreatePool (const POOL_DESC *pPoolDesc, Pool **ppPool)
 Creates custom pool.
void SetCurrentFrameIndex (UINT frameIndex)
void SetCurrentFrameIndex (UINT frameIndex)
 Sets the index of the current frame.
void GetBudget (Budget *pLocalBudget, Budget *pNonLocalBudget)
void GetBudget (Budget *pLocalBudget, Budget *pNonLocalBudget)
 Retrieves information about current memory usage and budget.
void CalculateStatistics (TotalStatistics *pStats)
void CalculateStatistics (TotalStatistics *pStats)
 Retrieves statistics from current state of the allocator.
void BuildStatsString (WCHAR **ppStatsString, BOOL DetailedMap) const
void BuildStatsString (WCHAR **ppStatsString, BOOL DetailedMap) const
 Builds and returns statistics as a string in JSON format.
void FreeStatsString (WCHAR *pStatsString) const
void FreeStatsString (WCHAR *pStatsString) const
 Frees memory of a string returned from Allocator::BuildStatsString.
void BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext)
void BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext)
 Begins defragmentation process of the default pools.

Detailed Description

@@ -187,7 +187,7 @@

- DefragmentationContext ** ppContext ) + DefragmentationContext ** ppContext )
@@ -200,7 +200,7 @@

Defragmentation.

+

For more information about defragmentation, see documentation chapter: Defragmentation.

@@ -440,7 +440,7 @@

- Pool ** ppPool ) + Pool ** ppPool )
@@ -509,7 +509,7 @@

Note
This function creates a new resource. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of it, e.g. using the Virtual allocator feature.
+
Note
This function creates a new resource. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of it, e.g. using the Virtual allocator feature.

@@ -859,7 +859,7 @@

diff --git a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html index 6cfb1dd..38e4511 100644 --- a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html +++ b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -88,7 +88,7 @@ diff --git a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html index 7ab0038..067d8ba 100644 --- a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html +++ b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DefragmentationContext Class Reference @@ -31,7 +31,7 @@ - + @@ -95,11 +95,11 @@ - + - + - +

Public Member Functions

HRESULT BeginPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)
HRESULT BeginPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)
 Starts single defragmentation pass.
HRESULT EndPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)
HRESULT EndPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)
 Ends single defragmentation pass.
void GetStats (DEFRAGMENTATION_STATS *pStats)
void GetStats (DEFRAGMENTATION_STATS *pStats)
 Returns statistics of the defragmentation performed so far.

Detailed Description

@@ -193,7 +193,7 @@

diff --git a/docs/html/class_d3_d12_m_a_1_1_pool-members.html b/docs/html/class_d3_d12_m_a_1_1_pool-members.html index 9acf601..7a7ad20 100644 --- a/docs/html/class_d3_d12_m_a_1_1_pool-members.html +++ b/docs/html/class_d3_d12_m_a_1_1_pool-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -91,7 +91,7 @@ diff --git a/docs/html/class_d3_d12_m_a_1_1_pool.html b/docs/html/class_d3_d12_m_a_1_1_pool.html index 07742d9..2caed56 100644 --- a/docs/html/class_d3_d12_m_a_1_1_pool.html +++ b/docs/html/class_d3_d12_m_a_1_1_pool.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::Pool Class Reference @@ -31,7 +31,7 @@ - + @@ -95,17 +95,17 @@ - + - + - + - + - + - +

Public Member Functions

POOL_DESC GetDesc () const
POOL_DESC GetDesc () const
 Returns copy of parameters of the pool.
void GetStatistics (Statistics *pStats)
void GetStatistics (Statistics *pStats)
 Retrieves basic statistics of the custom pool that are fast to calculate.
void CalculateStatistics (DetailedStatistics *pStats)
void CalculateStatistics (DetailedStatistics *pStats)
 Retrieves detailed statistics of the custom pool that are slower to calculate.
void SetName (LPCWSTR Name)
void SetName (LPCWSTR Name)
 Associates a name with the pool. This name is for use in debug diagnostics and tools.
LPCWSTR GetName () const
LPCWSTR GetName () const
 Returns the name associated with the pool object.
HRESULT BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext)
HRESULT BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext)
 Begins defragmentation process of the current pool.

Detailed Description

@@ -145,7 +145,7 @@

E_NOINTERFACE if defragmentation is not supported. -

For more information about defragmentation, see documentation chapter: Defragmentation.

+

For more information about defragmentation, see documentation chapter: Defragmentation.

@@ -267,7 +267,7 @@

diff --git a/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html b/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html index 1e40ead..968aeb2 100644 --- a/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html +++ b/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -96,7 +96,7 @@ diff --git a/docs/html/class_d3_d12_m_a_1_1_virtual_block.html b/docs/html/class_d3_d12_m_a_1_1_virtual_block.html index 0cb9114..de58557 100644 --- a/docs/html/class_d3_d12_m_a_1_1_virtual_block.html +++ b/docs/html/class_d3_d12_m_a_1_1_virtual_block.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::VirtualBlock Class Reference @@ -31,7 +31,7 @@ - + @@ -95,25 +95,25 @@ - + - + - + - + - + - + - + - + - + - +

Public Member Functions

BOOL IsEmpty () const
BOOL IsEmpty () const
 Returns true if the block is empty - contains 0 allocations.
void GetAllocationInfo (VirtualAllocation allocation, VIRTUAL_ALLOCATION_INFO *pInfo) const
void GetAllocationInfo (VirtualAllocation allocation, VIRTUAL_ALLOCATION_INFO *pInfo) const
 Returns information about an allocation - its offset, size and custom pointer.
HRESULT Allocate (const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)
HRESULT Allocate (const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)
 Creates new allocation.
void FreeAllocation (VirtualAllocation allocation)
void FreeAllocation (VirtualAllocation allocation)
 Frees the allocation.
void Clear ()
void Clear ()
 Frees all the allocations.
void SetAllocationPrivateData (VirtualAllocation allocation, void *pPrivateData)
void SetAllocationPrivateData (VirtualAllocation allocation, void *pPrivateData)
 Changes custom pointer for an allocation to a new value.
void GetStatistics (Statistics *pStats) const
void GetStatistics (Statistics *pStats) const
 Retrieves basic statistics of the virtual block that are fast to calculate.
void CalculateStatistics (DetailedStatistics *pStats) const
void CalculateStatistics (DetailedStatistics *pStats) const
 Retrieves detailed statistics of the virtual block that are slower to calculate.
void BuildStatsString (WCHAR **ppStatsString) const
void BuildStatsString (WCHAR **ppStatsString) const
 Builds and returns statistics as a string in JSON format, including the list of allocations with their parameters.
void FreeStatsString (WCHAR *pStatsString) const
void FreeStatsString (WCHAR *pStatsString) const
 Frees memory of a string returned from VirtualBlock::BuildStatsString.

Detailed Description

@@ -364,7 +364,7 @@

diff --git a/docs/html/classes.html b/docs/html/classes.html index e85eb86..7988851 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Index @@ -31,7 +31,7 @@ - + @@ -104,7 +104,7 @@ diff --git a/docs/html/configuration.html b/docs/html/configuration.html index 3ab9ada..b5c3d39 100644 --- a/docs/html/configuration.html +++ b/docs/html/configuration.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Configuration @@ -31,7 +31,7 @@ - + @@ -129,14 +129,14 @@

If your bug goes away after enabling margins, it means it may be caused by memory being overwritten outside of allocation boundaries. It is not 100% certain though. Change in application behavior may also be caused by different order and distribution of allocations across memory blocks after margins are applied.

Margins work with all memory heap types.

Margin is applied only to placed allocations made out of memory heaps and not to committed allocations, which have their own, implicit memory heap of specific size. It is thus not applied to allocations made using D3D12MA::ALLOCATION_FLAG_COMMITTED flag or those automatically decided to put into committed allocations, e.g. due to its large size.

-

Margins appear in JSON dump as part of free space.

+

Margins appear in JSON dump as part of free space.

Note that enabling margins increases memory usage and fragmentation.

-

Margins do not apply to Virtual allocator.

+

Margins do not apply to Virtual allocator.

diff --git a/docs/html/custom_pools.html b/docs/html/custom_pools.html index 0bfd570..d02565b 100644 --- a/docs/html/custom_pools.html +++ b/docs/html/custom_pools.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Custom memory pools @@ -31,7 +31,7 @@ - + @@ -128,7 +128,7 @@

diff --git a/docs/html/defragmentation.html b/docs/html/defragmentation.html index b82dbde..25cabdd 100644 --- a/docs/html/defragmentation.html +++ b/docs/html/defragmentation.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Defragmentation @@ -31,7 +31,7 @@ - + @@ -199,7 +199,7 @@ diff --git a/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html index 6e6d46e..b66498a 100644 --- a/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: C:/Code/D3D12MemoryAllocator/REPO/include Directory Reference @@ -31,7 +31,7 @@ - + @@ -81,12 +81,12 @@ - +

Files

 
D3D12MemAlloc.h
 
D3D12MemAlloc.h
diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css index 5d2eecd..788923a 100644 --- a/docs/html/doxygen.css +++ b/docs/html/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.14.0*/ +/* The standard CSS for doxygen 1.16.1*/ html { /* page base colors */ @@ -19,7 +19,6 @@ html { --header-separator-color: #C4CFE5; --group-header-separator-color: #D9E0EE; --group-header-color: #354C7B; ---inherit-header-color: gray; --footer-foreground-color: #2A3D61; --footer-logo-width: 75px; @@ -28,8 +27,6 @@ html { --title-background-color: white; --title-separator-color: #C4CFE5; ---directory-separator-color: #9CAFD4; ---separator-color: #4A6AAA; --blockquote-background-color: #F7F8FB; --blockquote-border-color: #9CAFD4; @@ -39,10 +36,6 @@ html { --icon-background-color: #728DC1; --icon-foreground-color: white; -/* ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg');*/ --icon-folder-open-fill-color: #C4CFE5; --icon-folder-fill-color: #D8DFEE; --icon-folder-border-color: #4665A2; @@ -51,7 +44,6 @@ html { /* brief member declaration list */ --memdecl-background-color: #F9FAFC; ---memdecl-separator-color: #DEE4F0; --memdecl-foreground-color: #555; --memdecl-template-color: #4665A2; --memdecl-border-color: #D5DDEC; @@ -61,7 +53,6 @@ html { --memdef-title-background-color: #E2E8F2; --memdef-proto-background-color: #EEF1F7; --memdef-proto-text-color: #253555; ---memdef-doc-background-color: white; --memdef-param-name-color: #602020; --memdef-template-color: #4665A2; @@ -83,21 +74,17 @@ html { --nav-breadcrumb-separator-color: #C4CFE5; --nav-breadcrumb-active-bg: #EEF1F7; --nav-breadcrumb-color: #354C7B; ---nav-breadcrumb-border-color: #E1E7F2; --nav-splitbar-bg-color: #DCE2EF; --nav-splitbar-handle-color: #9CAFD4; --nav-font-size-level1: 13px; --nav-font-size-level2: 10px; --nav-font-size-level3: 9px; --nav-text-normal-color: #283A5D; ---nav-text-hover-color: white; ---nav-text-active-color: white; --nav-menu-button-color: #364D7C; --nav-menu-background-color: white; --nav-menu-foreground-color: #555555; --nav-menu-active-bg: #DCE2EF; --nav-menu-active-color: #9CAFD4; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.5); --nav-arrow-color: #B6C4DF; --nav-arrow-selected-color: #90A5CE; @@ -145,8 +132,6 @@ html { --code-vhdl-char-color: #000000; --code-vhdl-keyword-color: #700070; --code-vhdl-logic-color: #FF0000; ---code-link-color: #4665A2; ---code-external-link-color: #4665A2; --fragment-foreground-color: black; --fragment-background-color: #FBFCFD; --fragment-border-color: #C4CFE5; @@ -158,6 +143,7 @@ html { --fragment-lineno-link-hover-fg-color: #4665A2; --fragment-lineno-link-hover-bg-color: #C8C8C8; --fragment-copy-ok-color: #2EC82E; +--fragment-highlight-filter: -3; --tooltip-foreground-color: black; --tooltip-background-color: rgba(255,255,255,0.8); --tooltip-arrow-background-color: white; @@ -201,6 +187,11 @@ html { --invariant-color-bg: #d8f1e3; --invariant-color-hl: #44b86f; --invariant-color-text: #265532; +--satisfies-color-hl: #b61825; +--satisfies-color-bg: #f8d1cc; +--verifies-color-hl: #b61825; +--verifies-color-bg: #f8d1cc; + } @media (prefers-color-scheme: dark) { @@ -225,7 +216,6 @@ html { --header-separator-color: #141C2E; --group-header-separator-color: #1D2A43; --group-header-color: #90A5CE; ---inherit-header-color: #A0A0A0; --footer-foreground-color: #5B7AB7; --footer-logo-width: 60px; @@ -234,8 +224,6 @@ html { --title-background-color: #090D16; --title-separator-color: #212F4B; ---directory-separator-color: #283A5D; ---separator-color: #283A5D; --blockquote-background-color: #101826; --blockquote-border-color: #283A5D; @@ -253,7 +241,6 @@ html { /* brief member declaration list */ --memdecl-background-color: #0B101A; ---memdecl-separator-color: #2C3F65; --memdecl-foreground-color: #BBB; --memdecl-template-color: #7C95C6; --memdecl-border-color: #233250; @@ -263,7 +250,6 @@ html { --memdef-title-background-color: #1B2840; --memdef-proto-background-color: #19243A; --memdef-proto-text-color: #9DB0D4; ---memdef-doc-background-color: black; --memdef-param-name-color: #D28757; --memdef-template-color: #7C95C6; @@ -285,21 +271,17 @@ html { --nav-breadcrumb-separator-color: #212F4B; --nav-breadcrumb-active-bg: #1D2A43; --nav-breadcrumb-color: #90A5CE; ---nav-breadcrumb-border-color: #2A3D61; --nav-splitbar-bg-color: #283A5D; --nav-splitbar-handle-color: #4665A2; --nav-font-size-level1: 13px; --nav-font-size-level2: 10px; --nav-font-size-level3: 9px; --nav-text-normal-color: #B6C4DF; ---nav-text-hover-color: #DCE2EF; ---nav-text-active-color: #DCE2EF; --nav-menu-button-color: #B6C4DF; --nav-menu-background-color: #05070C; --nav-menu-foreground-color: #BBBBBB; --nav-menu-active-bg: #1D2A43; --nav-menu-active-color: #C9D3E7; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.2); --nav-arrow-color: #4665A2; --nav-arrow-selected-color: #6884BD; @@ -347,8 +329,6 @@ html { --code-vhdl-char-color: #C0C0C0; --code-vhdl-keyword-color: #CF53C9; --code-vhdl-logic-color: #FF0000; ---code-link-color: #79C0FF; ---code-external-link-color: #79C0FF; --fragment-foreground-color: #C9D1D9; --fragment-background-color: #090D16; --fragment-border-color: #30363D; @@ -360,6 +340,7 @@ html { --fragment-lineno-link-hover-fg-color: #8E96A1; --fragment-lineno-link-hover-bg-color: #505050; --fragment-copy-ok-color: #0EA80E; +--fragment-highlight-filter: 5; --tooltip-foreground-color: #C9D1D9; --tooltip-background-color: #202020; --tooltip-arrow-background-color: #202020; @@ -403,6 +384,11 @@ html { --invariant-color-bg: #303a35; --invariant-color-hl: #76ce96; --invariant-color-text: #cceed5; +--satisfies-color-hl: #ad2617; +--satisfies-color-bg: #2e1917; +--verifies-color-hl: #ad2617; +--verifies-color-bg: #2e1917; + }} body { background-color: var(--page-background-color); @@ -483,6 +469,7 @@ dt { p.startli, p.startdd { margin-top: 2px; + margin-bottom: 0px; } th p.starttd, th p.intertd, th p.endtd { @@ -674,6 +661,11 @@ a.code.hl_event { /* style for links to event names in code snippets */ } a.code.hl_sequence { /* style for links to sequence names in code snippets */ } a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } +div.embeddoc { + font-family: var(--font-family-monospace); + padding-left: 10px; +} + /* @end */ dl.el { @@ -681,15 +673,35 @@ dl.el { } ul.check { - list-style:none; - text-indent: -16px; - padding-left: 38px; + list-style: none; + padding-left: 40px; + margin: 0; +} + +ul.check li { + position: relative; +} + +li.unchecked::before, li.checked::before { + position: absolute; + left: -18px; + top: 0; } -li.unchecked:before { - content: "\2610\A0"; + +li.unchecked::before { + content: "☐"; +} + +li.checked::before { + content: "☑"; +} + +ul.check li > p { + display: inline; } -li.checked:before { - content: "\2611\A0"; + +ul.check li > p:not(:first-child) { + display: block; } ol { @@ -744,6 +756,7 @@ pre.fragment { span.tt { white-space: pre; font-family: var(--font-family-monospace); + background-color: var(--fragment-background-color); } .clipboard { @@ -1159,6 +1172,8 @@ tr:not(:first-child) > td.ititle { border-bottom: 1px solid var(--memdecl-border-color); padding-left: 10px; transition: none; + vertical-align: top; + text-align: right; } .memItemRight { @@ -1167,6 +1182,7 @@ tr:not(:first-child) > td.ititle { border-bottom: 1px solid var(--memdecl-border-color); padding-right: 10px; transition: none; + vertical-align: bottom; } tr.heading + tr[class^='memitem'] td.memItemLeft, @@ -1720,7 +1736,6 @@ table.fieldtable { text-align: right; } - .fieldtable td.fielddoc { border-bottom: 1px solid var(--memdef-border-color); } @@ -1750,6 +1765,41 @@ table.fieldtable { border-bottom: 1px solid var(--memdef-border-color); } +/* style requirements page */ + +div.req_title { + text-decoration-line: underline; + text-decoration-style: solid; + text-decoration-color: var(--table-cell-border-color); + text-decoration-thickness: 1px; + font-weight: bold; +} + +table.reqlist tr > td:first-child { + text-align: right; + font-weight: bold; +} + +div.missing_satisfies { + border-left: 8px solid var(--satisfies-color-hl); + border-radius: 4px; + background: var(--satisfies-color-bg); + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; +} + +div.missing_verifies { + border-left: 8px solid var(--verifies-color-hl); + border-radius: 4px; + background: var(--verifies-color-bg); + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; +} + /* ----------- navigation breadcrumb styling ----------- */ #nav-path ul { @@ -1914,6 +1964,10 @@ dl.warning dt, dl.attention dt, dl.important dt { color: var(--warning-color-hl); } +dl.warning .tt, dl.attention .tt, dl.important .tt { + background-color: hsl(from var(--warning-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + dl.note, dl.remark { background: var(--note-color-bg); border-left: 8px solid var(--note-color-hl); @@ -1924,6 +1978,10 @@ dl.note dt, dl.remark dt { color: var(--note-color-hl); } +dl.note .tt, dl.remark .tt { + background-color: hsl(from var(--note-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + dl.todo { background: var(--todo-color-bg); border-left: 8px solid var(--todo-color-hl); @@ -1934,6 +1992,10 @@ dl.todo dt { color: var(--todo-color-hl); } +dl.todo .tt { + background-color: hsl(from var(--todo-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + dl.test { background: var(--test-color-bg); border-left: 8px solid var(--test-color-hl); @@ -1944,6 +2006,10 @@ dl.test dt { color: var(--test-color-hl); } +dl.test .tt { + background-color: hsl(from var(--test-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + dl.bug dt a { color: var(--bug-color-hl) !important; } @@ -1958,6 +2024,10 @@ dl.bug dt a { color: var(--bug-color-hl) !important; } +dl.bug .tt { + background-color: hsl(from var(--bug-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + dl.deprecated { background: var(--deprecated-color-bg); border-left: 8px solid var(--deprecated-color-hl); @@ -1968,12 +2038,11 @@ dl.deprecated dt a { color: var(--deprecated-color-hl) !important; } -dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, -dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, -dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { - margin-inline-start: 0px; +dl.deprecated .tt { + background-color: hsl(from var(--deprecated-color-bg) h s calc(l + var(--fragment-highlight-filter))); } + dl.invariant, dl.pre, dl.post { background: var(--invariant-color-bg); border-left: 8px solid var(--invariant-color-hl); @@ -1984,6 +2053,16 @@ dl.invariant dt, dl.pre dt, dl.post dt { color: var(--invariant-color-hl); } +dl.invariant .tt, dl.pre .tt, dl.post .tt { + background-color: hsl(from var(--invariant-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + #projectrow { diff --git a/docs/html/doxygen_crawl.html b/docs/html/doxygen_crawl.html index c4ffff1..6f07608 100644 --- a/docs/html/doxygen_crawl.html +++ b/docs/html/doxygen_crawl.html @@ -4,7 +4,7 @@ Validator / crawler helper - + diff --git a/docs/html/faq.html b/docs/html/faq.html index 4948020..ec4be52 100644 --- a/docs/html/faq.html +++ b/docs/html/faq.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Frequently asked questions @@ -31,7 +31,7 @@ - + @@ -86,7 +86,7 @@

D3D12MA helps with handling one aspect of DX12 usage, which is GPU memory management - allocation of ID3D12Heap objects and creation of ID3D12Resource objects - buffers and textures.

Do I need to use D3D12MA?

You don't need to, but it may be beneficial in many cases. DX12 is a complex and low-level API, so libraries like this that abstract certain aspects of the API and bring them to a higher level are useful. When developing any non-trivial graphics application, you may benefit from using a memory allocator. Using D3D12MA can save time compared to implementing your own.

-

In DX12 you can create each resource separately with its own implicit memory heap by calling CreateCommittedResource, but this may not be the optimal solution. For more information, see Committed versus placed resources.

+

In DX12 you can create each resource separately with its own implicit memory heap by calling CreateCommittedResource, but this may not be the optimal solution. For more information, see Committed versus placed resources.

When should I not use D3D12MA?

While D3D12MA is useful for many applications that use the DX12 API, there are cases when it may be a better choice not to use it. For example, if the application is very simple, e.g. serving as a sample or a learning exercise to help you understand or teach others the basics of DX12, and it creates only a small number of buffers and textures, then including D3D12MA may be an overkill. Developing your own memory allocator may also be a good learning exercise.

What are the benefits of using D3D12MA?

@@ -145,13 +145,13 @@
  • Try making your allocation using pure DX12 functions like CreateCommittedResource() rather than D3D12MA and see if the bug persists.
  • I found some compilation warnings. How can we fix them?

    -

    Seeing compiler warnings may be annoying to some developers, but it is a design decision to not fix all of them. Due to the nature of the C++ language, certain preprocessor macros can make some variables unused, function parameters unreferenced, or conditional expressions constant in some configurations. The code of this library should not be bigger or more complicated just to silence these warnings. It is recommended to disable such warnings instead. For more information, see Features not supported.

    +

    Seeing compiler warnings may be annoying to some developers, but it is a design decision to not fix all of them. Due to the nature of the C++ language, certain preprocessor macros can make some variables unused, function parameters unreferenced, or conditional expressions constant in some configurations. The code of this library should not be bigger or more complicated just to silence these warnings. It is recommended to disable such warnings instead. For more information, see Features not supported.

    However, if you observe a warning that is really dangerous, e.g., about an implicit conversion from a larger to a smaller integer type, please report it and it will be fixed ASAP.

    diff --git a/docs/html/files.html b/docs/html/files.html index 5ce45bf..0dd807c 100644 --- a/docs/html/files.html +++ b/docs/html/files.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: File List @@ -31,7 +31,7 @@ - + @@ -83,7 +83,7 @@ diff --git a/docs/html/functions.html b/docs/html/functions.html index de18e05..f3f3f9d 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Members @@ -31,7 +31,7 @@ - + @@ -251,7 +251,7 @@

    - u -

      diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index 9bc7749..5ec93e3 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Members - Functions @@ -31,7 +31,7 @@ - + @@ -151,7 +151,7 @@

      - s -

        diff --git a/docs/html/functions_rela.html b/docs/html/functions_rela.html index f21eddd..4920bfa 100644 --- a/docs/html/functions_rela.html +++ b/docs/html/functions_rela.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Members - Related Symbols @@ -31,7 +31,7 @@ - + @@ -79,7 +79,7 @@ diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html index fe4ed5f..0c1a6ea 100644 --- a/docs/html/functions_vars.html +++ b/docs/html/functions_vars.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Members - Variables @@ -31,7 +31,7 @@ - + @@ -191,7 +191,7 @@

        - u -

          diff --git a/docs/html/general_considerations.html b/docs/html/general_considerations.html index 05a30ff..39a4dd9 100644 --- a/docs/html/general_considerations.html +++ b/docs/html/general_considerations.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: General considerations @@ -31,7 +31,7 @@ - + @@ -100,7 +100,7 @@

          Virtual allocator to manage descriptors and their ranges inside a descriptor heap. +
        • Descriptor allocation. Although also called "heaps", objects that represent descriptors are separate part of the D3D12 API from buffers and textures. You can still use Virtual allocator to manage descriptors and their ranges inside a descriptor heap.
        • Support for reserved (tiled) resources. We don't recommend using them. For more information, see [1].
        • Support for ID3D12Device::Evict and MakeResident. We don't recommend using them. You can call them on the D3D12 objects manually. Plese keep in mind, however, that eviction happens on the level of entire ID3D12Heap memory blocks and not individual buffers or textures which may be placed inside them.
        • Handling CPU memory allocation failures. When dynamically creating small C++ objects in CPU memory (not the GPU memory), allocation failures are not handled gracefully, because that would complicate code significantly and is usually not needed in desktop PC applications anyway. Success of an allocation is just checked with an assert.
        • @@ -112,7 +112,7 @@

          diff --git a/docs/html/globals.html b/docs/html/globals.html index 27989c1..40eb6d9 100644 --- a/docs/html/globals.html +++ b/docs/html/globals.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: File Members @@ -31,7 +31,7 @@ - + @@ -82,7 +82,7 @@ diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html index 00db10d..4d32b9b 100644 --- a/docs/html/globals_defs.html +++ b/docs/html/globals_defs.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: File Members @@ -31,7 +31,7 @@ - + @@ -82,7 +82,7 @@ diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html index 5785855..88b596e 100644 --- a/docs/html/hierarchy.html +++ b/docs/html/hierarchy.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Class Hierarchy @@ -31,7 +31,7 @@ - + @@ -107,7 +107,7 @@ diff --git a/docs/html/index.html b/docs/html/index.html index d99307f..c11d82c 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12 Memory Allocator @@ -31,7 +31,7 @@ - + @@ -74,47 +74,47 @@
          D3D12 Memory Allocator
          -

          Version 3.1.0-development (2025-XX-XX)

          -

          Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved.
          +

          diff --git a/docs/html/linear_algorithm.html b/docs/html/linear_algorithm.html index 0bc59b0..93f913c 100644 --- a/docs/html/linear_algorithm.html +++ b/docs/html/linear_algorithm.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Linear allocation algorithm @@ -31,7 +31,7 @@
          - + @@ -111,12 +111,12 @@

          Ring buffer is available only in pools with one memory block - D3D12MA::POOL_DESC::MaxBlockCount must be 1. Otherwise behavior is undefined.

          Additional considerations

          -

          Linear algorithm can also be used with Virtual allocator. See flag D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR.

          +

          Linear algorithm can also be used with Virtual allocator. See flag D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR.

          diff --git a/docs/html/namespace_d3_d12_m_a.html b/docs/html/namespace_d3_d12_m_a.html index d801b62..3d028a6 100644 --- a/docs/html/namespace_d3_d12_m_a.html +++ b/docs/html/namespace_d3_d12_m_a.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA Namespace Reference @@ -31,7 +31,7 @@ - + @@ -82,69 +82,69 @@ - - - + - + - - - - - + + + + + + + - - - - - - - - - + + + + + - + - + - + - + - - - - - + - - - - - + + + + + + + + + - + - - - - - + + + + + + + + +

          Classes

          class  Allocation
           Represents single memory allocation. More...
          struct  ALLOCATION_CALLBACKS
          struct  ALLOCATION_CALLBACKS
           Custom callbacks to CPU memory allocation functions. More...
          struct  ALLOCATION_DESC
          struct  ALLOCATION_DESC
           Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource. More...
          class  Allocator
           Represents main object of this library initialized for particular ID3D12Device. More...
          struct  ALLOCATOR_DESC
           Parameters of created Allocator object. To be used with CreateAllocator(). More...
          struct  Budget
          struct  Statistics
           Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total. More...
          struct  DetailedStatistics
           More detailed statistics than D3D12MA::Statistics. More...
          struct  TotalStatistics
           General statistics from current state of the allocator - total memory usage across all memory heaps and segments. More...
          struct  Budget
           Statistics of current memory usage and available budget for a specific memory segment group. More...
          struct  CALLOCATION_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure. More...
          struct  CPOOL_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure. More...
          struct  CVIRTUAL_ALLOCATION_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure. More...
          struct  CVIRTUAL_BLOCK_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure. More...
          struct  DEFRAGMENTATION_DESC
          struct  VirtualAllocation
           Represents single memory allocation done inside VirtualBlock. More...
          class  Allocation
           Represents single memory allocation. More...
          struct  DEFRAGMENTATION_DESC
           Parameters for defragmentation. More...
          struct  DEFRAGMENTATION_MOVE
          struct  DEFRAGMENTATION_MOVE
           Single move of an allocation to be done for defragmentation. More...
          struct  DEFRAGMENTATION_PASS_MOVE_INFO
          struct  DEFRAGMENTATION_PASS_MOVE_INFO
           Parameters for incremental defragmentation steps. More...
          struct  DEFRAGMENTATION_STATS
          struct  DEFRAGMENTATION_STATS
           Statistics returned for defragmentation process by function DefragmentationContext::GetStats(). More...
          class  DefragmentationContext
          class  DefragmentationContext
           Represents defragmentation process in progress. More...
          struct  DetailedStatistics
           More detailed statistics than D3D12MA::Statistics. More...
          class  Pool
           Custom memory pool. More...
          struct  POOL_DESC
          struct  POOL_DESC
           Parameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool. More...
          struct  Statistics
           Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total. More...
          struct  TotalStatistics
           General statistics from current state of the allocator - total memory usage across all memory heaps and segments. More...
          struct  VIRTUAL_ALLOCATION_DESC
          class  Pool
           Custom memory pool. More...
          struct  ALLOCATOR_DESC
           Parameters of created Allocator object. To be used with CreateAllocator(). More...
          class  Allocator
           Represents main object of this library initialized for particular ID3D12Device. More...
          struct  VIRTUAL_BLOCK_DESC
           Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock(). More...
          struct  VIRTUAL_ALLOCATION_DESC
           Parameters of created virtual allocation to be passed to VirtualBlock::Allocate(). More...
          struct  VIRTUAL_ALLOCATION_INFO
          struct  VIRTUAL_ALLOCATION_INFO
           Parameters of an existing virtual allocation, returned by VirtualBlock::GetAllocationInfo(). More...
          struct  VIRTUAL_BLOCK_DESC
           Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock(). More...
          struct  VirtualAllocation
           Represents single memory allocation done inside VirtualBlock. More...
          class  VirtualBlock
          class  VirtualBlock
           Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory. More...
          struct  CALLOCATION_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure. More...
          struct  CPOOL_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure. More...
          struct  CVIRTUAL_BLOCK_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure. More...
          struct  CVIRTUAL_ALLOCATION_DESC
           Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure. More...
          - + - + - +

          Typedefs

          typedef UINT64 AllocHandle
          typedef UINT64 AllocHandle
           Unique identifier of single allocation done inside the memory heap.
          using ALLOCATE_FUNC_PTR = void* (*)(size_t Size, size_t Alignment, void* pPrivateData)
          using ALLOCATE_FUNC_PTR = void* (*)(size_t Size, size_t Alignment, void* pPrivateData)
           Pointer to custom callback function that allocates CPU memory.
          using FREE_FUNC_PTR = void (*)(void* pMemory, void* pPrivateData)
          using FREE_FUNC_PTR = void (*)(void* pMemory, void* pPrivateData)
           Pointer to custom callback function that deallocates CPU memory.
          - - - + - - + - - - + - - + - - + - +

          Enumerations

          enum  ALLOCATION_FLAGS {
          +
          enum  ALLOCATION_FLAGS {
            ALLOCATION_FLAG_NONE = 0 , ALLOCATION_FLAG_COMMITTED = 0x1 , ALLOCATION_FLAG_NEVER_ALLOCATE = 0x2 @@ -161,19 +161,19 @@ , ALLOCATION_FLAG_STRATEGY_MASK
          }
           Bit flags to be used with ALLOCATION_DESC::Flags. More...
          enum  DEFRAGMENTATION_FLAGS { DEFRAGMENTATION_FLAG_ALGORITHM_FAST = 0x1 +
           Bit flags to be used with ALLOCATION_DESC::Flags. More...
          enum  DEFRAGMENTATION_FLAGS { DEFRAGMENTATION_FLAG_ALGORITHM_FAST = 0x1 , DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED = 0x2 , DEFRAGMENTATION_FLAG_ALGORITHM_FULL = 0x4 , DEFRAGMENTATION_FLAG_ALGORITHM_MASK }
           Flags to be passed as DEFRAGMENTATION_DESC::Flags. More...
          enum  DEFRAGMENTATION_MOVE_OPERATION { DEFRAGMENTATION_MOVE_OPERATION_COPY = 0 +
           Flags to be passed as DEFRAGMENTATION_DESC::Flags. More...
          enum  DEFRAGMENTATION_MOVE_OPERATION { DEFRAGMENTATION_MOVE_OPERATION_COPY = 0 , DEFRAGMENTATION_MOVE_OPERATION_IGNORE = 1 , DEFRAGMENTATION_MOVE_OPERATION_DESTROY = 2 }
           Operation performed on single defragmentation move. More...
          enum  POOL_FLAGS {
          +
          enum  POOL_FLAGS {
            POOL_FLAG_NONE = 0 , POOL_FLAG_ALGORITHM_LINEAR = 0x1 , POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x2 @@ -182,8 +182,8 @@   POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
          }
           Bit flags to be used with POOL_DESC::Flags. More...
          enum  ALLOCATOR_FLAGS {
          +
           Bit flags to be used with POOL_DESC::Flags. More...
          enum  ALLOCATOR_FLAGS {
            ALLOCATOR_FLAG_NONE = 0 , ALLOCATOR_FLAG_SINGLETHREADED = 0x1 , ALLOCATOR_FLAG_ALWAYS_COMMITTED = 0x2 @@ -194,13 +194,13 @@ , ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT = 0x20
          }
           Bit flags to be used with ALLOCATOR_DESC::Flags. More...
          enum  VIRTUAL_BLOCK_FLAGS { VIRTUAL_BLOCK_FLAG_NONE = 0 +
           Bit flags to be used with ALLOCATOR_DESC::Flags. More...
          enum  VIRTUAL_BLOCK_FLAGS { VIRTUAL_BLOCK_FLAG_NONE = 0 , VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR = POOL_FLAG_ALGORITHM_LINEAR , VIRTUAL_BLOCK_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_MASK }
           Bit flags to be used with VIRTUAL_BLOCK_DESC::Flags. More...
          enum  VIRTUAL_ALLOCATION_FLAGS {
          +
           Bit flags to be used with VIRTUAL_BLOCK_DESC::Flags. More...
          enum  VIRTUAL_ALLOCATION_FLAGS {
            VIRTUAL_ALLOCATION_FLAG_NONE = 0 , VIRTUAL_ALLOCATION_FLAG_UPPER_ADDRESS = ALLOCATION_FLAG_UPPER_ADDRESS , VIRTUAL_ALLOCATION_FLAG_STRATEGY_MIN_MEMORY = ALLOCATION_FLAG_STRATEGY_MIN_MEMORY @@ -210,13 +210,13 @@ , VIRTUAL_ALLOCATION_FLAG_STRATEGY_MASK = ALLOCATION_FLAG_STRATEGY_MASK
          }
           Bit flags to be used with VIRTUAL_ALLOCATION_DESC::Flags. More...
           Bit flags to be used with VIRTUAL_ALLOCATION_DESC::Flags. More...
          - + - +

          Functions

          D3D12MA_API HRESULT CreateAllocator (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
          D3D12MA_API HRESULT CreateAllocator (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
           Creates new main D3D12MA::Allocator object and returns it through ppAllocator.
          D3D12MA_API HRESULT CreateVirtualBlock (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)
          D3D12MA_API HRESULT CreateVirtualBlock (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)
           Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.

          Typedef Documentation

          @@ -344,7 +344,7 @@

          D3D12MA::POOL_FLAG_ALWAYS_COMMITTED.

          ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED 

          Heaps created for the default pools will be created with flag D3D12_HEAP_FLAG_CREATE_NOT_ZEROED, allowing for their memory to be not zeroed by the system if possible, which can speed up allocation.

          -

          Only affects default pools. To use the flag with Custom memory pools, you need to add it manually:

          +

          Only affects default pools. To use the flag with Custom memory pools, you need to add it manually:

          poolDesc.heapFlags |= D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;

          Only avaiable if ID3D12Device8 is present. Otherwise, the flag is ignored.

          @@ -431,7 +431,7 @@

          POOL_FLAG_ALGORITHM_LINEAR 

          Enables alternative, linear allocation algorithm in this pool.

          Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata.

          -

          By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter Linear allocation algorithm.

          +

          By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter Linear allocation algorithm.

          POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED 

          Optimization, allocate MSAA textures as committed resources always.

          Specify this flag to create MSAA textures with implicit heaps, as if they were created with flag D3D12MA::ALLOCATION_FLAG_COMMITTED. Usage of this flags enables pool to create its heaps on smaller alignment not suitable for MSAA textures.

          @@ -495,7 +495,7 @@

          VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR 

          Enables alternative, linear allocation algorithm in this virtual block.

          Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata.

          -

          By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter Linear allocation algorithm.

          +

          By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter Linear allocation algorithm.

          VIRTUAL_BLOCK_FLAG_ALGORITHM_MASK  @@ -554,7 +554,7 @@

          diff --git a/docs/html/namespacemembers.html b/docs/html/namespacemembers.html index d6237ba..d78273a 100644 --- a/docs/html/namespacemembers.html +++ b/docs/html/namespacemembers.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace Members @@ -31,7 +31,7 @@ - + @@ -150,7 +150,7 @@

          - v -

            diff --git a/docs/html/namespacemembers_enum.html b/docs/html/namespacemembers_enum.html index 90ffd55..c25155b 100644 --- a/docs/html/namespacemembers_enum.html +++ b/docs/html/namespacemembers_enum.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace Members @@ -31,7 +31,7 @@ - + @@ -83,7 +83,7 @@ diff --git a/docs/html/namespacemembers_eval.html b/docs/html/namespacemembers_eval.html index 2efa466..367f733 100644 --- a/docs/html/namespacemembers_eval.html +++ b/docs/html/namespacemembers_eval.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace Members @@ -31,7 +31,7 @@ - + @@ -130,7 +130,7 @@

            - v -

              diff --git a/docs/html/namespacemembers_func.html b/docs/html/namespacemembers_func.html index c8a70c7..0630659 100644 --- a/docs/html/namespacemembers_func.html +++ b/docs/html/namespacemembers_func.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace Members @@ -31,7 +31,7 @@ - + @@ -78,7 +78,7 @@ diff --git a/docs/html/namespacemembers_type.html b/docs/html/namespacemembers_type.html index e9561e2..0a74048 100644 --- a/docs/html/namespacemembers_type.html +++ b/docs/html/namespacemembers_type.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace Members @@ -31,7 +31,7 @@ - + @@ -79,7 +79,7 @@ diff --git a/docs/html/namespaces.html b/docs/html/namespaces.html index acd9768..e9fd824 100644 --- a/docs/html/namespaces.html +++ b/docs/html/namespaces.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Namespace List @@ -31,7 +31,7 @@ - + @@ -82,7 +82,7 @@ diff --git a/docs/html/optimal_allocation.html b/docs/html/optimal_allocation.html index 8d72300..1c3a4ea 100644 --- a/docs/html/optimal_allocation.html +++ b/docs/html/optimal_allocation.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Optimal resource allocation @@ -31,7 +31,7 @@ - + @@ -90,7 +90,7 @@

              D3D12MA::Allocator::GetMemoryCapacity. However, it is not recommended, because the amount of memory available to the application is typically smaller than the full capacity, as some portion of it is reserved by the operating system or used by other processes.

              -

              Because of this, the recommended way of fetching the memory budget available to the application is using function D3D12MA::Allocator::GetBudget. Preventing value D3D12MA::Budget::UsageBytes from exceeding the D3D12MA::Budget::BudgetBytes is probably the best we can do in trying to avoid the consequences of over-commitment. For more information, see also: Statistics.

              +

              Because of this, the recommended way of fetching the memory budget available to the application is using function D3D12MA::Allocator::GetBudget. Preventing value D3D12MA::Budget::UsageBytes from exceeding the D3D12MA::Budget::BudgetBytes is probably the best we can do in trying to avoid the consequences of over-commitment. For more information, see also: Statistics.

              Example:

              D3D12MA::Budget videoMemBudget = {};
              allocator->GetBudget(&videoMemBudget, NULL);
              @@ -122,7 +122,7 @@

              Sub-allocating buffers

              When a large number of small buffers needs to be created, the overhead of creating separate ID3D12Resource objects can be significant. It can also cause a significant waste of memory, as placed buffers need to be aligned to D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 64 KB by default. These problems can be avoided by creating one or few larger buffers and manually sub-allocating parts of them for specific needs.

              -

              It requires implementing a custom allocator for the data inside the buffer and using offsets to individual regions. When all the regions can be allocated linearly and freed all at once, implementing such allocator is trivial. When every region has the same size, implementing an allocator is also quite simple when using a "free list" algorithm. However, when regions can have different sizes and can be allocated and freed in random order, it requires a full allocation algorithm. D3D12MA can help with it by exposing its core allocation algorithm for custom usages. For more details and example code, see chapter: Virtual allocator. It can be used for all the cases mentioned above without too much performance overhead, because the D3D12MA::VirtualAllocation object is just a lightweight handle.

              +

              It requires implementing a custom allocator for the data inside the buffer and using offsets to individual regions. When all the regions can be allocated linearly and freed all at once, implementing such allocator is trivial. When every region has the same size, implementing an allocator is also quite simple when using a "free list" algorithm. However, when regions can have different sizes and can be allocated and freed in random order, it requires a full allocation algorithm. D3D12MA can help with it by exposing its core allocation algorithm for custom usages. For more details and example code, see chapter: Virtual allocator. It can be used for all the cases mentioned above without too much performance overhead, because the D3D12MA::VirtualAllocation object is just a lightweight handle.

              When sub-allocating a buffer, you need to remember to explicitly request proper alignment required for each region. For example, data used as a constant buffer must be aligned to D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256 B.

              Residency priority

              @@ -243,13 +243,13 @@

            • The advantage of committed resources is that their implicit heaps have exactly the right size, while creating resources as placed inside larger heaps can lead to some memory wasted because:
            • The advantage of committed resources is that they are always created with a new heap, which is initialized with zeros. When a resource is created as placed, the memory may contain random data left by the resource previously allocated in that place. When the memory is not filled with zeros, while you don't properly clear it or otherwise initialize its content before use (which is required by D3D12), you may observe incorrect behavior. On the other hand, using committed resources and having every new resource filled with zeros can leave this kind of bugs undetected.
            • Manual eviction with ID3D12Device::Evict and MakeResident functions work at the level of the entire heap, and so does ID3D12Device1::SetResidencyPriority, so creating resources as committed allows more fine-grained control over the eviction and residency priority of individual resources.
            • -
            • The advantage of placed resources is that they can be created in a region of a heap overlapping with some other resources. This approach is commonly called "aliasing". It can save memory, but it needs careful control over the resources that overlap in memory to make sure they are not used at the same time, there is an aliasing barrier issued between their usage, and the resource used after aliasing is correctly cleared every time. Committed resources don't offer this possibility, because every committed resource has its own exclusive memory heap. For more information, see chapter Resource aliasing (overlap).
            • +
            • The advantage of placed resources is that they can be created in a region of a heap overlapping with some other resources. This approach is commonly called "aliasing". It can save memory, but it needs careful control over the resources that overlap in memory to make sure they are not used at the same time, there is an aliasing barrier issued between their usage, and the resource used after aliasing is correctly cleared every time. Committed resources don't offer this possibility, because every committed resource has its own exclusive memory heap. For more information, see chapter Resource aliasing (overlap).

            When creating resources with the help of D3D12MA using function D3D12MA::Allocator::CreateResource, you typically don't need to care about all this. The library automatically makes the choice of creating the new resource as committed or placed. However, in cases when you need the information or the control over this choice between committed and placed, the library offers facilities to do that, described below.

            Implementation detail
            D3D12MA creates large heaps (default size is 64 MB) and creates resources as placed in them. However, it may decide that it is required or preferred to create the specific resource as committed for many reasons, including:
              @@ -261,7 +261,7 @@

            You can check whether an allocation was created as a committed resource by checking if its heap is null. Committed resources have an implicit heap that is not directly accessible.

            bool isCommitted = allocation->GetHeap() == NULL;
            -

            You can request a new resource to be created as committed by using D3D12MA::ALLOCATION_FLAG_COMMITTED. Note that committed resources can also be created out of Custom memory pools.

            +

            You can request a new resource to be created as committed by using D3D12MA::ALLOCATION_FLAG_COMMITTED. Note that committed resources can also be created out of Custom memory pools.

            You can also request all resources to be created as committed globally for the entire allocator by using D3D12MA::ALLOCATOR_FLAG_ALWAYS_COMMITTED. However, this contradicts the main purpose of using this library. It can also prevent certain other features of the library to be used. This flag should be used only for debugging purposes.

            You can create a custom pool with an explicit block size by specifying non-zero D3D12MA::POOL_DESC::BlockSize. When doing this, all resources created in such pool are placed in those blocks (heaps) and never created as committed. Example:

            @@ -299,12 +299,12 @@

            D3D12_HEAP_DESC::Alignment. This library automatically sets the alignment as small as possible. Unfortunately, any heap that has a chance of hosting an MSAA texture needs to have the alignment set to 4 MB. This problem can be overcome by passing D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED on the creation of the main allocator object and D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED on the creation of any custom heap that supports textures, not only buffers. With those flags, the alignment of the heaps created by D3D12MA can be lower, but any MSAA textures are created as committed. You should always use these flags in your code unless you really need to create some MSAA textures as placed.

            With DirectX 12 Agility SDK 1.618.1, Microsoft added a new feature called "tight alignment". Note this is a separate feature than the "small alignment" described earlier. When using this new SDK and a compatible graphics driver, the API exposes support for this new feature. Then, a new flag D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT can be added when creating a resource. D3D12 can then return the alignment required for the resource smaller than the default ones described above. This library automatically makes use of the tight alignment feature when available and adds that new resource flag. When the tight alignment is enabled, the heuristics that creates small buffers as committed described above is deactivated, as it is no longer needed.

            You can check if the tight alignment it is available in the current system by calling D3D12MA::Allocator::IsTightAlignmentSupported(). You can tell the library to not use it by specifying D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT. Typically, you don't need to do any of those.

            -

            The library automatically aligns all buffers to at least 256 B, even when the system supports smaller alignment. This is the alignment required for constant buffers, expressed by D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT constant. You can override this logic for Custom memory pools with a specific D3D12MA::POOL_DESC::MinAllocationAlignment.

            +

            The library automatically aligns all buffers to at least 256 B, even when the system supports smaller alignment. This is the alignment required for constant buffers, expressed by D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT constant. You can override this logic for Custom memory pools with a specific D3D12MA::POOL_DESC::MinAllocationAlignment.

            diff --git a/docs/html/quick_start.html b/docs/html/quick_start.html index de33ff7..9a3baef 100644 --- a/docs/html/quick_start.html +++ b/docs/html/quick_start.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Quick start @@ -31,7 +31,7 @@ - + @@ -170,7 +170,7 @@

            resource->Release();
            allocation->Release();

            More advanced use cases are possible when we consider that an D3D12MA::Allocation object can just hold a reference to any resource. It can be changed by calling D3D12MA::Allocation::SetResource. This function releases the old resource and calls AddRef on the new one.

            -

            Special care must be taken when performing defragmentation. The new resource created at the destination place should be set as pass.pMoves[i].pDstTmpAllocation->SetResource(newRes), but it is moved to the source allocation at end of the defragmentation pass, while the old resource accessible through pass.pMoves[i].pSrcAllocation->GetResource() is then released. For more information, see documentation chapter Defragmentation.

            +

            Special care must be taken when performing defragmentation. The new resource created at the destination place should be set as pass.pMoves[i].pDstTmpAllocation->SetResource(newRes), but it is moved to the source allocation at end of the defragmentation pass, while the old resource accessible through pass.pMoves[i].pSrcAllocation->GetResource() is then released. For more information, see documentation chapter Defragmentation.

            Mapping memory

            The process of getting regular CPU-side pointer to the memory of a resource in Direct3D is called "mapping". There are rules and restrictions to this process, as described in D3D12 documentation of ID3D12Resource::Map method.

            @@ -278,7 +278,7 @@

            diff --git a/docs/html/resource_aliasing.html b/docs/html/resource_aliasing.html index 1275544..6ab41d4 100644 --- a/docs/html/resource_aliasing.html +++ b/docs/html/resource_aliasing.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Resource aliasing (overlap) @@ -31,7 +31,7 @@ - + @@ -169,7 +169,7 @@ diff --git a/docs/html/search/search.css b/docs/html/search/search.css index 956f31f..043d32d 100644 --- a/docs/html/search/search.css +++ b/docs/html/search/search.css @@ -291,7 +291,6 @@ iframe#MSearchResults { div.SRPage { margin: 5px 2px; - /*background-color: var(--search-results-background-color);*/ } .SRChildren { diff --git a/docs/html/statistics.html b/docs/html/statistics.html index b9b1e29..da8e8db 100644 --- a/docs/html/statistics.html +++ b/docs/html/statistics.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Statistics @@ -31,7 +31,7 @@ - + @@ -109,7 +109,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html index f967c0c..e514f50 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html index 495fe3f..548019b 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::ALLOCATION_CALLBACKS Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,11 +89,11 @@ - + - + - +

            Public Attributes

            ALLOCATE_FUNC_PTR pAllocate
            ALLOCATE_FUNC_PTR pAllocate
             Allocation function.
            FREE_FUNC_PTR pFree
            FREE_FUNC_PTR pFree
             Dellocation function.
            void * pPrivateData
            void * pPrivateData
             Custom data that will be passed to allocation and deallocation functions as pUserData parameter.

            Detailed Description

            @@ -153,7 +153,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html index f398da5..56c750c 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -89,7 +89,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html index d914ec6..f22a527 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::ALLOCATION_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,15 +98,15 @@ - + - + - + - + - +

            Public Attributes

            ALLOCATION_FLAGS Flags
            ALLOCATION_FLAGS Flags
             Flags for the allocation.
            D3D12_HEAP_TYPE HeapType
            D3D12_HEAP_TYPE HeapType
             The type of memory heap where the new allocation should be placed.
            D3D12_HEAP_FLAGS ExtraHeapFlags
            D3D12_HEAP_FLAGS ExtraHeapFlags
             Additional heap flags to be used when allocating memory.
            PoolCustomPool
            PoolCustomPool
             Custom pool to place the new resource in. Optional.
            void * pPrivateData
            void * pPrivateData
             Custom general-purpose pointer that will be stored in D3D12MA::Allocation.

            Detailed Description

            @@ -125,7 +125,7 @@

            Custom pool to place the new resource in. Optional.

            -

            When not null, the resource will be created inside specified custom pool. Members HeapType, ExtraHeapFlags are then ignored.

            +

            When not null, the resource will be created inside specified custom pool. Members HeapType, ExtraHeapFlags are then ignored.

            @@ -208,7 +208,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html index cfc611c..2a6e5e4 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -89,7 +89,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html index 33029a6..7efa4f9 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::ALLOCATOR_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,14 +89,14 @@ - + - - + + - + - +

            Public Attributes

            ALLOCATOR_FLAGS Flags
            ALLOCATOR_FLAGS Flags
             Flags for the entire allocator.
            ID3D12Device * pDevice
            UINT64 PreferredBlockSize
            ID3D12Device * pDevice
            UINT64 PreferredBlockSize
             Preferred size of a single ID3D12Heap block to be allocated.
            const ALLOCATION_CALLBACKSpAllocationCallbacks
            const ALLOCATION_CALLBACKSpAllocationCallbacks
             Custom CPU memory allocation callbacks. Optional.
            IDXGIAdapter * pAdapter
            IDXGIAdapter * pAdapter

            Detailed Description

            Parameters of created Allocator object. To be used with CreateAllocator().

            @@ -190,7 +190,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_budget-members.html b/docs/html/struct_d3_d12_m_a_1_1_budget-members.html index 26e4bee..778b089 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_budget-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_budget-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_budget.html b/docs/html/struct_d3_d12_m_a_1_1_budget.html index 8e8f354..2c66324 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_budget.html +++ b/docs/html/struct_d3_d12_m_a_1_1_budget.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::Budget Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,11 +89,11 @@ - + - + - +

            Public Attributes

            Statistics Stats
            Statistics Stats
             Statistics fetched from the library.
            UINT64 UsageBytes
            UINT64 UsageBytes
             Estimated current memory usage of the program.
            UINT64 BudgetBytes
            UINT64 BudgetBytes
             Estimated amount of memory available to the program.

            Detailed Description

            @@ -114,7 +114,7 @@

            IDXGIAdapter3::QueryVideoMemoryInfo if possible.

            -

            It might be different (most probably smaller) than memory capacity returned by D3D12MA::Allocator::GetMemoryCapacity() due to factors external to the program, decided by the operating system. Difference BudgetBytes - UsageBytes is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems.

            +

            It might be different (most probably smaller) than memory capacity returned by D3D12MA::Allocator::GetMemoryCapacity() due to factors external to the program, decided by the operating system. Difference BudgetBytes - UsageBytes is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems.

            @@ -158,7 +158,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html index 9423c7f..589c0fa 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -93,7 +93,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html index cae7b08..4a00c93 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::CALLOCATION_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,27 +98,27 @@ - + - + - + - +

            Public Member Functions

             CALLOCATION_DESC ()=default
             CALLOCATION_DESC ()=default
             Default constructor. Leaves the structure uninitialized.
             CALLOCATION_DESC (const ALLOCATION_DESC &o) noexcept
             CALLOCATION_DESC (const ALLOCATION_DESC &o) noexcept
             Constructor initializing from the base D3D12MA::ALLOCATION_DESC structure.
             CALLOCATION_DESC (Pool *customPool, ALLOCATION_FLAGS flags=ALLOCATION_FLAG_NONE, void *privateData=NULL) noexcept
             CALLOCATION_DESC (Pool *customPool, ALLOCATION_FLAGS flags=ALLOCATION_FLAG_NONE, void *privateData=NULL) noexcept
             Constructor initializing description of an allocation to be created in a specific custom pool.
             CALLOCATION_DESC (D3D12_HEAP_TYPE heapType, ALLOCATION_FLAGS flags=ALLOCATION_FLAG_NONE, void *privateData=NULL, D3D12_HEAP_FLAGS extraHeapFlags=D3D12MA_RECOMMENDED_HEAP_FLAGS) noexcept
             CALLOCATION_DESC (D3D12_HEAP_TYPE heapType, ALLOCATION_FLAGS flags=ALLOCATION_FLAG_NONE, void *privateData=NULL, D3D12_HEAP_FLAGS extraHeapFlags=D3D12MA_RECOMMENDED_HEAP_FLAGS) noexcept
             Constructor initializing description of an allocation to be created in a default pool of a specific D3D12_HEAP_TYPE.
            - + - + - + - + - +

            Additional Inherited Members

            Public Attributes inherited from D3D12MA::ALLOCATION_DESC
            ALLOCATION_FLAGS Flags
            ALLOCATION_FLAGS Flags
             Flags for the allocation.
            D3D12_HEAP_TYPE HeapType
            D3D12_HEAP_TYPE HeapType
             The type of memory heap where the new allocation should be placed.
            D3D12_HEAP_FLAGS ExtraHeapFlags
            D3D12_HEAP_FLAGS ExtraHeapFlags
             Additional heap flags to be used when allocating memory.
            PoolCustomPool
            PoolCustomPool
             Custom pool to place the new resource in. Optional.
            void * pPrivateData
            void * pPrivateData
             Custom general-purpose pointer that will be stored in D3D12MA::Allocation.

            Detailed Description

            @@ -261,7 +261,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html index 66262d0..9422750 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -97,7 +97,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html index 37f7330..2a4c181 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::CPOOL_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,35 +98,35 @@ - + - + - + - +

            Public Member Functions

             CPOOL_DESC ()=default
             CPOOL_DESC ()=default
             Default constructor. Leaves the structure uninitialized.
             CPOOL_DESC (const POOL_DESC &o) noexcept
             CPOOL_DESC (const POOL_DESC &o) noexcept
             Constructor initializing from the base D3D12MA::POOL_DESC structure.
             CPOOL_DESC (D3D12_HEAP_TYPE heapType, D3D12_HEAP_FLAGS heapFlags, POOL_FLAGS flags=D3D12MA_RECOMMENDED_POOL_FLAGS, UINT64 blockSize=0, UINT minBlockCount=0, UINT maxBlockCount=UINT_MAX, D3D12_RESIDENCY_PRIORITY residencyPriority=D3D12_RESIDENCY_PRIORITY_NORMAL) noexcept
             CPOOL_DESC (D3D12_HEAP_TYPE heapType, D3D12_HEAP_FLAGS heapFlags, POOL_FLAGS flags=D3D12MA_RECOMMENDED_POOL_FLAGS, UINT64 blockSize=0, UINT minBlockCount=0, UINT maxBlockCount=UINT_MAX, D3D12_RESIDENCY_PRIORITY residencyPriority=D3D12_RESIDENCY_PRIORITY_NORMAL) noexcept
             Constructor initializing description of a custom pool created in one of the standard D3D12_HEAP_TYPE.
             CPOOL_DESC (const D3D12_HEAP_PROPERTIES heapProperties, D3D12_HEAP_FLAGS heapFlags, POOL_FLAGS flags=D3D12MA_RECOMMENDED_POOL_FLAGS, UINT64 blockSize=0, UINT minBlockCount=0, UINT maxBlockCount=UINT_MAX, D3D12_RESIDENCY_PRIORITY residencyPriority=D3D12_RESIDENCY_PRIORITY_NORMAL) noexcept
             CPOOL_DESC (const D3D12_HEAP_PROPERTIES heapProperties, D3D12_HEAP_FLAGS heapFlags, POOL_FLAGS flags=D3D12MA_RECOMMENDED_POOL_FLAGS, UINT64 blockSize=0, UINT minBlockCount=0, UINT maxBlockCount=UINT_MAX, D3D12_RESIDENCY_PRIORITY residencyPriority=D3D12_RESIDENCY_PRIORITY_NORMAL) noexcept
             Constructor initializing description of a custom pool created with custom D3D12_HEAP_PROPERTIES.
            - + - + - + - + - + - + - + - + - +

            Additional Inherited Members

            Public Attributes inherited from D3D12MA::POOL_DESC
            POOL_FLAGS Flags
            POOL_FLAGS Flags
             Flags for the heap.
            D3D12_HEAP_PROPERTIES HeapProperties
            D3D12_HEAP_PROPERTIES HeapProperties
             The parameters of memory heap where allocations of this pool should be placed.
            D3D12_HEAP_FLAGS HeapFlags
            D3D12_HEAP_FLAGS HeapFlags
             Heap flags to be used when allocating heaps of this pool.
            UINT64 BlockSize
            UINT64 BlockSize
             Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.
            UINT MinBlockCount
            UINT MinBlockCount
             Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.
            UINT MaxBlockCount
            UINT MaxBlockCount
             Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.
            UINT64 MinAllocationAlignment
            UINT64 MinAllocationAlignment
             Additional minimum alignment to be used for all allocations created from this pool. Can be 0.
            ID3D12ProtectedResourceSession * pProtectedSession
            ID3D12ProtectedResourceSession * pProtectedSession
             Additional parameter allowing pool to create resources with passed protected session.
            D3D12_RESIDENCY_PRIORITY ResidencyPriority
            D3D12_RESIDENCY_PRIORITY ResidencyPriority
             Residency priority to be set for all allocations made in this pool. Optional.

            Detailed Description

            @@ -304,7 +304,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html index da976da..afdd347 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -91,7 +91,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html index 714062b..a680c64 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::CVIRTUAL_ALLOCATION_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,23 +98,23 @@ - + - + - +

            Public Member Functions

             CVIRTUAL_ALLOCATION_DESC ()=default
             CVIRTUAL_ALLOCATION_DESC ()=default
             Default constructor. Leaves the structure uninitialized.
             CVIRTUAL_ALLOCATION_DESC (const VIRTUAL_ALLOCATION_DESC &o) noexcept
             CVIRTUAL_ALLOCATION_DESC (const VIRTUAL_ALLOCATION_DESC &o) noexcept
             Constructor initializing from the base D3D12MA::VIRTUAL_ALLOCATION_DESC structure.
             CVIRTUAL_ALLOCATION_DESC (UINT64 size, UINT64 alignment, VIRTUAL_ALLOCATION_FLAGS flags=VIRTUAL_ALLOCATION_FLAG_NONE, void *privateData=NULL) noexcept
             CVIRTUAL_ALLOCATION_DESC (UINT64 size, UINT64 alignment, VIRTUAL_ALLOCATION_FLAGS flags=VIRTUAL_ALLOCATION_FLAG_NONE, void *privateData=NULL) noexcept
             Constructor initializing description of a virtual allocation with given parameters.
            - + - + - + - +

            Additional Inherited Members

            Public Attributes inherited from D3D12MA::VIRTUAL_ALLOCATION_DESC
            VIRTUAL_ALLOCATION_FLAGS Flags
            VIRTUAL_ALLOCATION_FLAGS Flags
             Flags for the virtual allocation.
            UINT64 Size
            UINT64 Size
             Size of the allocation.
            UINT64 Alignment
            UINT64 Alignment
             Required alignment of the allocation.
            void * pPrivateData
            void * pPrivateData
             Custom pointer to be associated with the allocation.

            Detailed Description

            @@ -221,7 +221,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html index 27af579..4214b1e 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -90,7 +90,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html index e24e9a8..38ce216 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::CVIRTUAL_BLOCK_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,21 +98,21 @@ - + - + - +

            Public Member Functions

             CVIRTUAL_BLOCK_DESC ()=default
             CVIRTUAL_BLOCK_DESC ()=default
             Default constructor. Leaves the structure uninitialized.
             CVIRTUAL_BLOCK_DESC (const VIRTUAL_BLOCK_DESC &o) noexcept
             CVIRTUAL_BLOCK_DESC (const VIRTUAL_BLOCK_DESC &o) noexcept
             Constructor initializing from the base D3D12MA::VIRTUAL_BLOCK_DESC structure.
             CVIRTUAL_BLOCK_DESC (UINT64 size, VIRTUAL_BLOCK_FLAGS flags=VIRTUAL_BLOCK_FLAG_NONE, const ALLOCATION_CALLBACKS *allocationCallbacks=NULL) noexcept
             CVIRTUAL_BLOCK_DESC (UINT64 size, VIRTUAL_BLOCK_FLAGS flags=VIRTUAL_BLOCK_FLAG_NONE, const ALLOCATION_CALLBACKS *allocationCallbacks=NULL) noexcept
             Constructor initializing description of a virtual block with given parameters.
            - + - + - +

            Additional Inherited Members

            Public Attributes inherited from D3D12MA::VIRTUAL_BLOCK_DESC
            VIRTUAL_BLOCK_FLAGS Flags
            VIRTUAL_BLOCK_FLAGS Flags
             Flags.
            UINT64 Size
            UINT64 Size
             Total size of the block.
            const ALLOCATION_CALLBACKSpAllocationCallbacks
            const ALLOCATION_CALLBACKSpAllocationCallbacks
             Custom CPU memory allocation callbacks. Optional.

            Detailed Description

            @@ -214,7 +214,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html index 69adefa..7e63c6f 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html index 242a2ed..e63500f 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,11 +89,11 @@ - + - + - +

            Public Attributes

            DEFRAGMENTATION_FLAGS Flags
            DEFRAGMENTATION_FLAGS Flags
             Flags.
            UINT64 MaxBytesPerPass
            UINT64 MaxBytesPerPass
             Maximum numbers of bytes that can be copied during single pass, while moving allocations to different places.
            UINT32 MaxAllocationsPerPass
            UINT32 MaxAllocationsPerPass
             Maximum number of allocations that can be moved during single pass to a different place.

            Detailed Description

            @@ -156,7 +156,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html index f20848d..d0270bd 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html index 87c182e..c6f5b3c 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_MOVE Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,12 +89,12 @@ - + - + - - + +

            Public Attributes

            DEFRAGMENTATION_MOVE_OPERATION Operation
            DEFRAGMENTATION_MOVE_OPERATION Operation
             Operation to be performed on the allocation by DefragmentationContext::EndPass(). Default value is DEFRAGMENTATION_MOVE_OPERATION_COPY. You can modify it.
            AllocationpSrcAllocation
            AllocationpSrcAllocation
             Allocation that should be moved.
            AllocationpDstTmpAllocation
             Temporary allocation pointing to destination memory that will replace pSrcAllocation.
            AllocationpDstTmpAllocation
             Temporary allocation pointing to destination memory that will replace pSrcAllocation.

            Detailed Description

            Single move of an allocation to be done for defragmentation.

            @@ -127,9 +127,9 @@

            -

            Temporary allocation pointing to destination memory that will replace pSrcAllocation.

            +

            Temporary allocation pointing to destination memory that will replace pSrcAllocation.

            Use it to retrieve new ID3D12Heap and offset to create new ID3D12Resource and then store it here via Allocation::SetResource().

            -
            Warning
            Do not store this allocation in your data structures! It exists only temporarily, for the duration of the defragmentation pass, to be used for storing newly created resource. DefragmentationContext::EndPass() will destroy it and make pSrcAllocation point to this memory.
            +
            Warning
            Do not store this allocation in your data structures! It exists only temporarily, for the duration of the defragmentation pass, to be used for storing newly created resource. DefragmentationContext::EndPass() will destroy it and make pSrcAllocation point to this memory.

            @@ -155,7 +155,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html index 3e0a1e4..5242a0a 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -86,7 +86,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html index 6e37ac2..dfe3d11 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,9 +89,9 @@ - - - + + +

            Public Attributes

            UINT32 MoveCount
             Number of elements in the pMoves array.
            DEFRAGMENTATION_MOVEpMoves
            UINT32 MoveCount
             Number of elements in the pMoves array.
            DEFRAGMENTATION_MOVEpMoves
             Array of moves to be performed by the user in the current defragmentation pass.

            Detailed Description

            @@ -110,7 +110,7 @@

            -

            Number of elements in the pMoves array.

            +

            Number of elements in the pMoves array.

            @@ -127,12 +127,12 @@

            Array of moves to be performed by the user in the current defragmentation pass.

            -

            Pointer to an array of MoveCount elements, owned by D3D12MA, created in DefragmentationContext::BeginPass(), destroyed in DefragmentationContext::EndPass().

            +

            Pointer to an array of MoveCount elements, owned by D3D12MA, created in DefragmentationContext::BeginPass(), destroyed in DefragmentationContext::EndPass().

            For each element, you should:

              -
            1. Create a new resource in the place pointed by pMoves[i].pDstTmpAllocation->GetHeap() + pMoves[i].pDstTmpAllocation->GetOffset().
            2. -
            3. Store new resource in pMoves[i].pDstTmpAllocation by using Allocation::SetResource(). It will later replace old resource from pMoves[i].pSrcAllocation.
            4. -
            5. Copy data from the pMoves[i].pSrcAllocation e.g. using D3D12GraphicsCommandList::CopyResource.
            6. +
            7. Create a new resource in the place pointed by pMoves[i].pDstTmpAllocation->GetHeap() + pMoves[i].pDstTmpAllocation->GetOffset().
            8. +
            9. Store new resource in pMoves[i].pDstTmpAllocation by using Allocation::SetResource(). It will later replace old resource from pMoves[i].pSrcAllocation.
            10. +
            11. Copy data from the pMoves[i].pSrcAllocation e.g. using D3D12GraphicsCommandList::CopyResource.
            12. Make sure these commands finished executing on the GPU.

            Only then you can finish defragmentation pass by calling DefragmentationContext::EndPass(). After this call, the allocation will point to the new place in memory.

            @@ -147,7 +147,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html index be2d910..7f6aae4 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -88,7 +88,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html index 220d0bd..69cfce6 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html +++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_STATS Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,13 +89,13 @@ - + - + - + - +

            Public Attributes

            UINT64 BytesMoved
            UINT64 BytesMoved
             Total number of bytes that have been copied while moving allocations to different places.
            UINT64 BytesFreed
            UINT64 BytesFreed
             Total number of bytes that have been released to the system by freeing empty heaps.
            UINT32 AllocationsMoved
            UINT32 AllocationsMoved
             Number of allocations that have been moved to different places.
            UINT32 HeapsFreed
            UINT32 HeapsFreed
             Number of empty ID3D12Heap objects that have been released to the system.

            Detailed Description

            @@ -171,7 +171,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html index 13c5446..bf5694d 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -90,7 +90,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html index 88fa33d..79754ca 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html +++ b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::DetailedStatistics Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,17 +89,17 @@ - + - + - + - + - + - +

            Public Attributes

            Statistics Stats
            Statistics Stats
             Basic statistics.
            UINT UnusedRangeCount
            UINT UnusedRangeCount
             Number of free ranges of memory between allocations.
            UINT64 AllocationSizeMin
            UINT64 AllocationSizeMin
             Smallest allocation size. UINT64_MAX if there are 0 allocations.
            UINT64 AllocationSizeMax
            UINT64 AllocationSizeMax
             Largest allocation size. 0 if there are 0 allocations.
            UINT64 UnusedRangeSizeMin
            UINT64 UnusedRangeSizeMin
             Smallest empty range size. UINT64_MAX if there are 0 empty ranges.
            UINT64 UnusedRangeSizeMax
            UINT64 UnusedRangeSizeMax
             Largest empty range size. 0 if there are 0 empty ranges.

            Detailed Description

            @@ -212,7 +212,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html index 654ade6..c2ce4c2 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -93,7 +93,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html index d812aff..e4bf711 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::POOL_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,23 +98,23 @@ - + - + - + - + - + - + - + - + - +

            Public Attributes

            POOL_FLAGS Flags
            POOL_FLAGS Flags
             Flags for the heap.
            D3D12_HEAP_PROPERTIES HeapProperties
            D3D12_HEAP_PROPERTIES HeapProperties
             The parameters of memory heap where allocations of this pool should be placed.
            D3D12_HEAP_FLAGS HeapFlags
            D3D12_HEAP_FLAGS HeapFlags
             Heap flags to be used when allocating heaps of this pool.
            UINT64 BlockSize
            UINT64 BlockSize
             Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.
            UINT MinBlockCount
            UINT MinBlockCount
             Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.
            UINT MaxBlockCount
            UINT MaxBlockCount
             Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.
            UINT64 MinAllocationAlignment
            UINT64 MinAllocationAlignment
             Additional minimum alignment to be used for all allocations created from this pool. Can be 0.
            ID3D12ProtectedResourceSession * pProtectedSession
            ID3D12ProtectedResourceSession * pProtectedSession
             Additional parameter allowing pool to create resources with passed protected session.
            D3D12_RESIDENCY_PRIORITY ResidencyPriority
            D3D12_RESIDENCY_PRIORITY ResidencyPriority
             Residency priority to be set for all allocations made in this pool. Optional.

            Detailed Description

            @@ -284,7 +284,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html index 67b61fe..be8fbd0 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -88,7 +88,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_statistics.html index 853c2ff..8786bc2 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_statistics.html +++ b/docs/html/struct_d3_d12_m_a_1_1_statistics.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::Statistics Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,13 +89,13 @@ - + - + - + - +

            Public Attributes

            UINT BlockCount
            UINT BlockCount
             Number of D3D12 memory blocks allocated - ID3D12Heap objects and committed resources.
            UINT AllocationCount
            UINT AllocationCount
             Number of D3D12MA::Allocation objects allocated.
            UINT64 BlockBytes
            UINT64 BlockBytes
             Number of bytes allocated in memory blocks.
            UINT64 AllocationBytes
            UINT64 AllocationBytes
             Total number of bytes occupied by all D3D12MA::Allocation objects.

            Detailed Description

            @@ -115,7 +115,7 @@

            Total number of bytes occupied by all D3D12MA::Allocation objects.

            -

            Always less or equal than BlockBytes. Difference (BlockBytes - AllocationBytes) is the amount of memory allocated from D3D12 but unused by any D3D12MA::Allocation.

            +

            Always less or equal than BlockBytes. Difference (BlockBytes - AllocationBytes) is the amount of memory allocated from D3D12 but unused by any D3D12MA::Allocation.

            @@ -132,7 +132,7 @@

            Number of D3D12MA::Allocation objects allocated.

            -

            Committed allocations have their own blocks, so each one adds 1 to AllocationCount as well as BlockCount.

            +

            Committed allocations have their own blocks, so each one adds 1 to AllocationCount as well as BlockCount.

            @@ -174,7 +174,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html index b49ebb7..867ee40 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html index 494e68e..f442e42 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html +++ b/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::TotalStatistics Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,11 +89,11 @@ - + - + - +

            Public Attributes

            DetailedStatistics HeapType [5]
            DetailedStatistics HeapType [5]
             One element for each type of heap located at the following indices:
            DetailedStatistics MemorySegmentGroup [2]
            DetailedStatistics MemorySegmentGroup [2]
             One element for each memory segment group located at the following indices:
            DetailedStatistics Total
            DetailedStatistics Total
             Total statistics from all memory allocated from D3D12.

            Detailed Description

            @@ -178,7 +178,7 @@

            diff --git a/docs/html/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-members.html b/docs/html/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-members.html index 518ddc4..01d0638 100644 --- a/docs/html/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-members.html +++ b/docs/html/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-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -88,7 +88,7 @@ diff --git a/docs/html/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 b/docs/html/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 index 9b284fd..92e38d7 100644 --- a/docs/html/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 +++ b/docs/html/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 @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::VIRTUAL_ALLOCATION_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,13 +98,13 @@ - + - + - + - +

            Public Attributes

            VIRTUAL_ALLOCATION_FLAGS Flags
            VIRTUAL_ALLOCATION_FLAGS Flags
             Flags for the virtual allocation.
            UINT64 Size
            UINT64 Size
             Size of the allocation.
            UINT64 Alignment
            UINT64 Alignment
             Required alignment of the allocation.
            void * pPrivateData
            void * pPrivateData
             Custom pointer to be associated with the allocation.

            Detailed Description

            @@ -183,7 +183,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html index 26f3491..437d0fe 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html index 61a862b..449d1ae 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html +++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::VIRTUAL_ALLOCATION_INFO Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,11 +89,11 @@ - + - + - +

            Public Attributes

            UINT64 Offset
            UINT64 Offset
             Offset of the allocation.
            UINT64 Size
            UINT64 Size
             Size of the allocation.
            void * pPrivateData
            void * pPrivateData
             Custom pointer associated with the allocation.

            Detailed Description

            @@ -155,7 +155,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html index fdfa9ee..096699e 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -87,7 +87,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html index 0d23d65..01416df 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html +++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::VIRTUAL_BLOCK_DESC Struct Reference @@ -31,7 +31,7 @@ - + @@ -98,11 +98,11 @@ - + - + - +

            Public Attributes

            VIRTUAL_BLOCK_FLAGS Flags
            VIRTUAL_BLOCK_FLAGS Flags
             Flags.
            UINT64 Size
            UINT64 Size
             Total size of the block.
            const ALLOCATION_CALLBACKSpAllocationCallbacks
            const ALLOCATION_CALLBACKSpAllocationCallbacks
             Custom CPU memory allocation callbacks. Optional.

            Detailed Description

            @@ -164,7 +164,7 @@

            diff --git a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html index a219f48..fa52fc4 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html +++ b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Member List @@ -31,7 +31,7 @@ - + @@ -85,7 +85,7 @@ diff --git a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html index 893aa1a..1b1618d 100644 --- a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html +++ b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: D3D12MA::VirtualAllocation Struct Reference @@ -31,7 +31,7 @@ - + @@ -89,7 +89,7 @@ - +

            Public Attributes

            AllocHandle AllocHandle
            AllocHandle AllocHandle
             Unique idenitfier of current allocation. 0 means null/invalid.

            Detailed Description

            @@ -117,7 +117,7 @@

            diff --git a/docs/html/virtual_allocator.html b/docs/html/virtual_allocator.html index 5cd93d6..555c6e8 100644 --- a/docs/html/virtual_allocator.html +++ b/docs/html/virtual_allocator.html @@ -3,7 +3,7 @@ - + D3D12 Memory Allocator: Virtual allocator @@ -31,7 +31,7 @@ - + @@ -180,13 +180,13 @@

            You can also request a full list of allocations and free regions as a string in JSON format by calling D3D12MA::VirtualBlock::BuildStatsString. Returned string must be later freed using D3D12MA::VirtualBlock::FreeStatsString. The format of this string may differ from the one returned by the main D3D12 allocator, but it is similar.

            Additional considerations

            -

            Alternative, linear algorithm can be used with virtual allocator - see flag D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR and documentation: Linear allocation algorithm.

            +

            Alternative, linear algorithm can be used with virtual allocator - see flag D3D12MA::VIRTUAL_BLOCK_FLAG_ALGORITHM_LINEAR and documentation: Linear allocation algorithm.

            Note that the "virtual allocator" functionality is implemented on a level of individual memory blocks. Keeping track of a whole collection of blocks, allocating new ones when out of free space, deleting empty ones, and deciding which one to try first for a new allocation must be implemented by the user.

            diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h index ae358e3..c34d1d7 100644 --- a/include/D3D12MemAlloc.h +++ b/include/D3D12MemAlloc.h @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,9 +24,9 @@ /** \mainpage D3D12 Memory Allocator -Version 3.1.0-development (2025-XX-XX) +Version 3.1.0 (2026-02-23) -Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. \n +Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. \n License: MIT Documentation of all members: D3D12MemAlloc.h diff --git a/src/Common.cpp b/src/Common.cpp index 87ea650..73943ce 100644 --- a/src/Common.cpp +++ b/src/Common.cpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/Common.h b/src/Common.h index 384c1a6..5ba3aea 100644 --- a/src/Common.h +++ b/src/Common.h @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp index 96243ef..fea7981 100644 --- a/src/D3D12MemAlloc.cpp +++ b/src/D3D12MemAlloc.cpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -7815,12 +7815,17 @@ HRESULT AllocatorPimpl::GetResourceAllocationInfo( #ifdef __ID3D12Device1_INTERFACE_DEFINED__ #if D3D12MA_TIGHT_ALIGNMENT_SUPPORTED - if (IsTightAlignmentEnabled() && + if (IsTightAlignmentEnabled()) + { // Don't allow USE_TIGHT_ALIGNMENT together with ALLOW_CROSS_ADAPTER as there is a D3D Debug Layer error: // D3D12 ERROR: ID3D12Device::GetResourceAllocationInfo: D3D12_RESOURCE_DESC::Flag D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT will be ignored since D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER is set. [ STATE_CREATION ERROR #599: CREATERESOURCE_INVALIDMISCFLAGS] - (inOutResourceDesc.Flags & D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER) == 0) - { - inOutResourceDesc.Flags |= D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT; + // Also don't allow it together with D3D12_TEXTURE_LAYOUT_64KB_*_SWIZZLE, as there is this error (see issue #86): + // D3D12 ERROR: ID3D12Device::GetResourceAllocationInfo: D3D12_RESOURCE_DESC::Flag D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT is not valid when the layout is either D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE or D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE (...). [ STATE_CREATION ERROR #599: CREATERESOURCE_INVALIDMISCFLAGS] + if((inOutResourceDesc.Flags & D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER) == 0 + && (inOutResourceDesc.Layout != D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE && inOutResourceDesc.Layout != D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE)) + { + inOutResourceDesc.Flags |= D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT; + } } #endif // #if D3D12MA_TIGHT_ALIGNMENT_SUPPORTED diff --git a/src/D3D12Sample.cpp b/src/D3D12Sample.cpp index 32c5147..a2b5f8d 100644 --- a/src/D3D12Sample.cpp +++ b/src/D3D12Sample.cpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/Shaders/FxBatchCompilerScript.fxbc b/src/Shaders/FxBatchCompilerScript.fxbc index 40a0402..d21c2ac 100644 --- a/src/Shaders/FxBatchCompilerScript.fxbc +++ b/src/Shaders/FxBatchCompilerScript.fxbc @@ -1,6 +1,6 @@ // LICENSE // ======= -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // ------- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, diff --git a/src/Shaders/PS.hlsl b/src/Shaders/PS.hlsl index 260509b..828c8b2 100644 --- a/src/Shaders/PS.hlsl +++ b/src/Shaders/PS.hlsl @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/Shaders/VS.hlsl b/src/Shaders/VS.hlsl index 1145bb7..796810d 100644 --- a/src/Shaders/VS.hlsl +++ b/src/Shaders/VS.hlsl @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/Tests.cpp b/src/Tests.cpp index 09576d0..9e00157 100644 --- a/src/Tests.cpp +++ b/src/Tests.cpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/Tests.h b/src/Tests.h index 000e150..6121f70 100644 --- a/src/Tests.h +++ b/src/Tests.h @@ -1,5 +1,5 @@ // -// Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2019-2026 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/tools/GpuMemDumpVis/GpuMemDumpVis.py b/tools/GpuMemDumpVis/GpuMemDumpVis.py index 75d98d2..6d6155b 100644 --- a/tools/GpuMemDumpVis/GpuMemDumpVis.py +++ b/tools/GpuMemDumpVis/GpuMemDumpVis.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2018-2026 Advanced Micro Devices, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal