Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
D3D12MA::POOL_DESC Struct Reference

Parameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool. More...

#include <D3D12MemAlloc.h>

Public Attributes

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

Detailed Description

Parameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool.

Member Data Documentation

◆ BlockSize

UINT64 D3D12MA::POOL_DESC::BlockSize

Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.

Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Then sizes of particular blocks may vary.

◆ HeapFlags

D3D12_HEAP_FLAGS D3D12MA::POOL_DESC::HeapFlags

Heap flags to be used when allocating heaps of this pool.

It should contain one of these values, depending on type of resources you are going to create in this heap: D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS, D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES, D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES. Except if ResourceHeapTier = 2, then it may be D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0.

You can specify additional flags if needed.

◆ HeapProperties

D3D12_HEAP_PROPERTIES D3D12MA::POOL_DESC::HeapProperties

The parameters of memory heap where allocations of this pool should be placed.

In the simplest case, just fill it with zeros and set Type to one of: D3D12_HEAP_TYPE_DEFAULT, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_TYPE_READBACK. Additional parameters can be used e.g. to utilize UMA.

◆ MaxBlockCount

UINT D3D12MA::POOL_DESC::MaxBlockCount

Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.

Set to 0 to use default, which is UINT64_MAX, which means no limit.

Set to same value as D3D12MA::POOL_DESC::MinBlockCount to have fixed amount of memory allocated throughout whole lifetime of this pool.

◆ MinAllocationAlignment

UINT64 D3D12MA::POOL_DESC::MinAllocationAlignment

Additional minimum alignment to be used for all allocations created from this pool. Can be 0.

Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two.

◆ MinBlockCount

UINT D3D12MA::POOL_DESC::MinBlockCount

Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.

Set to 0 to have no preallocated blocks and allow the pool be completely empty.

◆ pProtectedSession

ID3D12ProtectedResourceSession* D3D12MA::POOL_DESC::pProtectedSession

Additional parameter allowing pool to create resources with passed protected session.

If not null then all the heaps and committed resources will be created with this parameter. Valid only if ID3D12Device4 interface is present in current Windows SDK!


The documentation for this struct was generated from the following file: