Open 3D Engine Atom Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Represents defragmentation process in progress. More...
#include <D3D12MemAlloc.h>
Inherits IUnknownImpl.
Public Member Functions | |
HRESULT | BeginPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo) |
Starts single defragmentation pass. More... | |
HRESULT | EndPass (DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo) |
Ends single defragmentation pass. More... | |
void | GetStats (DEFRAGMENTATION_STATS *pStats) |
Returns statistics of the defragmentation performed so far. | |
Protected Member Functions | |
void | ReleaseThis () override |
Friends | |
class | Pool |
class | Allocator |
template<typename T > | |
void | D3D12MA_DELETE (const ALLOCATION_CALLBACKS &, T *) |
Represents defragmentation process in progress.
You can create this object using Allocator::BeginDefragmentation (for default pools) or Pool::BeginDefragmentation (for a custom pool).
HRESULT D3D12MA::DefragmentationContext::BeginPass | ( | DEFRAGMENTATION_PASS_MOVE_INFO * | pPassInfo | ) |
Starts single defragmentation pass.
[out] | pPassInfo | Computed informations for current pass. |
S_OK
if no more moves are possible. Then you can omit call to DefragmentationContext::EndPass() and simply end whole defragmentation.S_FALSE
if there are pending moves returned in pPassInfo
. You need to perform them, call DefragmentationContext::EndPass(), and then preferably try another pass with DefragmentationContext::BeginPass(). HRESULT D3D12MA::DefragmentationContext::EndPass | ( | DEFRAGMENTATION_PASS_MOVE_INFO * | pPassInfo | ) |
Ends single defragmentation pass.
pPassInfo | Computed informations for current pass filled by DefragmentationContext::BeginPass() and possibly modified by you. |
S_OK
if no more moves are possible or S_FALSE
if more defragmentations are possible.Ends incremental defragmentation pass and commits all defragmentation moves from pPassInfo
. After this call:
pPassInfo[i].pSrcAllocation
that had pPassInfo[i].Operation ==
#DEFRAGMENTATION_MOVE_OPERATION_COPY (which is the default) will be pointing to the new destination place.pPassInfo[i].pSrcAllocation
that had pPassInfo[i].operation ==
#DEFRAGMENTATION_MOVE_OPERATION_DESTROY will be released.If no more moves are possible you can end whole defragmentation.