Direct3D 12 Memory Allocator
Loading...
Searching...
No Matches
Public Attributes | List of all members
D3D12MA::ALLOCATION_DESC Struct Reference

Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource. More...

#include <D3D12MemAlloc.h>

Public Attributes

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

Detailed Description

Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource.

Member Data Documentation

◆ CustomPool

Pool* D3D12MA::ALLOCATION_DESC::CustomPool

Custom pool to place the new resource in. Optional.

When not NULL, the resource will be created inside specified custom pool.

◆ ExtraHeapFlags

D3D12_HEAP_FLAGS D3D12MA::ALLOCATION_DESC::ExtraHeapFlags

Additional heap flags to be used when allocating memory.

In most cases it can be 0.

  • If you use D3D12MA::Allocator::CreateResource(), you don't need to care. Necessary flag D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS, D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES, or D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES is added automatically.
  • If you use D3D12MA::Allocator::AllocateMemory(), you should specify one of those ALLOW_ONLY flags. Except when you validate that D3D12MA::Allocator::GetD3D12Options().ResourceHeapTier == D3D12_RESOURCE_HEAP_TIER_1 - then you can leave it 0.
  • You can specify additional flags if needed. Then the memory will always be allocated as separate block using D3D12Device::CreateCommittedResource or CreateHeap, not as part of an existing larget block.

When D3D12MA::ALLOCATION_DESC::CustomPool != NULL this member is ignored.

◆ Flags

ALLOCATION_FLAGS D3D12MA::ALLOCATION_DESC::Flags

Flags.

◆ HeapType

D3D12_HEAP_TYPE D3D12MA::ALLOCATION_DESC::HeapType

The type of memory heap where the new allocation should be placed.

It must be one of: D3D12_HEAP_TYPE_DEFAULT, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_TYPE_READBACK.

When D3D12MA::ALLOCATION_DESC::CustomPool != NULL this member is ignored.

◆ pPrivateData

void* D3D12MA::ALLOCATION_DESC::pPrivateData

Custom general-purpose pointer that will be stored in D3D12MA::Allocation.


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