96 virtual void Init()
override;
97 virtual void Destroy()
override;
194 const TCHAR* InName);
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ED3D12Access
Definition D3D12Access.h:15
EResourceAllocationStrategy
Definition D3D12PoolAllocator.h:8
ED3D12ResourceStateMode
Definition D3D12Resources.h:52
uint32 HeapId
Definition MemoryTrace.h:30
EBufferUsageFlags
Definition RHIDefinitions.h:892
ERHIPoolResourceTypes
Resource type supported by the pools (can be any or all)
Definition RHIPoolAllocator.h:27
Definition D3D12CommandContext.h:513
Definition D3D12RHICommon.h:78
Definition D3D12Device.h:176
Definition D3D12Resources.h:73
D3D12 specific implementation of the FRHIMemoryPool.
Definition D3D12PoolAllocator.h:87
uint64 GetLastUsedFrameFence() const
Definition D3D12PoolAllocator.h:102
const FString Name
Definition D3D12PoolAllocator.h:108
FD3D12Resource * GetBackingResource()
Definition D3D12PoolAllocator.h:99
const FD3D12ResourceInitConfig InitConfig
Definition D3D12PoolAllocator.h:107
uint64 LastUsedFrameFence
Definition D3D12PoolAllocator.h:115
EResourceAllocationStrategy AllocationStrategy
Definition D3D12PoolAllocator.h:109
TRefCountPtr< FD3D12Resource > BackingResource
Definition D3D12PoolAllocator.h:112
FD3D12Heap * GetBackingHeap()
Definition D3D12PoolAllocator.h:100
virtual ~FD3D12MemoryPool()
Definition D3D12PoolAllocator.cpp:40
void UpdateLastUsedFrameFence(uint64 InFrameFence)
Definition D3D12PoolAllocator.h:103
virtual void Destroy() override
Definition D3D12PoolAllocator.cpp:159
TRefCountPtr< FD3D12Heap > BackingHeap
Definition D3D12PoolAllocator.h:113
virtual void Init() override
Definition D3D12PoolAllocator.cpp:45
Definition D3D12RHICommon.h:153
D3D12 specific implementation of the FRHIPoolAllocator.
Definition D3D12PoolAllocator.h:130
virtual void DeallocateResource(FD3D12ResourceLocation &ResourceLocation, bool bDefragFree=false)
Definition D3D12PoolAllocator.cpp:571
FD3D12Resource * GetBackingResource(FD3D12ResourceLocation &InResourceLocation) const
Definition D3D12PoolAllocator.cpp:875
~FD3D12PoolAllocator()
Definition D3D12PoolAllocator.cpp:257
void CleanUpAllocations(uint64 InFrameLag, bool bForceFree=false)
Definition D3D12PoolAllocator.cpp:756
TArray< FrameFencedAllocationData > FrameFencedOperations
Definition D3D12PoolAllocator.h:227
uint64 PendingDeleteRequestSize
Definition D3D12PoolAllocator.h:230
FD3D12HeapAndOffset GetBackingHeapAndAllocationOffsetInBytes(FD3D12ResourceLocation &InResourceLocation) const
Definition D3D12PoolAllocator.cpp:883
virtual FD3D12Resource * CreatePlacedResource(const FRHIPoolAllocationData &InAllocationData, const FD3D12ResourceDesc &InDesc, ED3D12Access InInitialD3D12Access, ED3D12ResourceStateMode InResourceStateMode, ED3D12Access InDefaultD3D12Access, const D3D12_CLEAR_VALUE *InClearValue, const TCHAR *InName)
Definition D3D12PoolAllocator.cpp:543
EResourceAllocationStrategy AllocationStrategy
Definition D3D12PoolAllocator.h:224
EAllocationType
Definition D3D12PoolAllocator.h:198
TArray< FD3D12VRAMCopyOperation > PendingCopyOps
Definition D3D12PoolAllocator.h:233
const FString Name
Definition D3D12PoolAllocator.h:223
virtual FRHIMemoryPool * CreateNewPool(int16 InPoolIndex, uint32 InMinimumAllocationSize, ERHIPoolResourceTypes InAllocationResourceType) override
Definition D3D12PoolAllocator.cpp:646
uint64 GetPendingDeleteRequestSize() const
Definition D3D12PoolAllocator.h:175
bool SupportsAllocation(D3D12_HEAP_TYPE InHeapType, D3D12_RESOURCE_FLAGS InResourceFlags, EBufferUsageFlags InBufferUsage, ED3D12ResourceStateMode InResourceStateMode, uint32 Alignment) const
Definition D3D12PoolAllocator.cpp:263
virtual bool HandleDefragRequest(FRHIContextArray const &Contexts, FRHIPoolAllocationData *InSourceBlock, FRHIPoolAllocationData &InTmpTargetBlock) override
Definition D3D12PoolAllocator.cpp:666
bool IsOwner(FD3D12ResourceLocation &ResourceLocation) const
Definition D3D12PoolAllocator.h:169
virtual void UpdateAllocationTracking(FD3D12ResourceLocation &InAllocation, EAllocationType InAllocationType)
Definition D3D12PoolAllocator.cpp:900
EResourceAllocationStrategy GetAllocationStrategy() const
Definition D3D12PoolAllocator.h:171
void AllocDefaultResource(D3D12_HEAP_TYPE InHeapType, const FD3D12ResourceDesc &InDesc, EBufferUsageFlags InBufferUsage, ED3D12ResourceStateMode InResourceStateMode, ED3D12Access InCreateD3D12Access, uint32 InAlignment, const TCHAR *InName, FD3D12ResourceLocation &ResourceLocation)
Definition D3D12PoolAllocator.cpp:288
void FlushPendingCopyOps(FD3D12CommandContext &InCommandContext)
Definition D3D12PoolAllocator.cpp:952
void TransferOwnership(FD3D12ResourceLocation &InSource, FD3D12ResourceLocation &InDest)
Definition D3D12PoolAllocator.cpp:842
static EResourceAllocationStrategy GetResourceAllocationStrategy(D3D12_RESOURCE_FLAGS InResourceFlags, ED3D12ResourceStateMode InResourceStateMode, uint32 Alignment)
Definition D3D12PoolAllocator.cpp:223
static FD3D12ResourceInitConfig GetResourceAllocatorInitConfig(D3D12_HEAP_TYPE InHeapType, D3D12_RESOURCE_FLAGS InResourceFlags, EBufferUsageFlags InBufferUsage)
Definition D3D12PoolAllocator.cpp:184
TArray< FRHIPoolAllocationData * > AllocationDataPool
Definition D3D12PoolAllocator.h:236
virtual void AllocateResource(uint32 GPUIndex, D3D12_HEAP_TYPE InHeapType, const FD3D12ResourceDesc &InDesc, uint64 InSize, uint32 InAllocationAlignment, ED3D12Access InInitialD3D12Access, ED3D12ResourceStateMode InResourceStateMode, ED3D12Access InDefaultD3D12Access, const D3D12_CLEAR_VALUE *InClearValue, const TCHAR *InName, FD3D12ResourceLocation &ResourceLocation) override
Definition D3D12PoolAllocator.cpp:337
const FD3D12ResourceInitConfig InitConfig
Definition D3D12PoolAllocator.h:222
Definition D3D12Resources.h:641
FD3D12PoolAllocator * GetPoolAllocator()
Definition D3D12Resources.h:699
Definition D3D12Resources.h:181
Definition RHIResources.h:5541
Pool which stores for each allocation the previous and next allocation. Each block is either free or ...
Definition RHIPoolAllocator.h:135
EFreeListOrder
Definition RHIPoolAllocator.h:139
Manages an array of FRHIMemoryPool and supports defragmentation between multiple pools.
Definition RHIPoolAllocator.h:220
Definition RefCounting.h:454
UE_FORCEINLINE_HINT ReferencedType * GetReference() const
Definition RefCounting.h:584
Definition D3D12PoolAllocator.h:73
FD3D12Heap * Heap
Definition D3D12PoolAllocator.h:74
uint64 Offset
Definition D3D12PoolAllocator.h:75
Definition D3D12PoolAllocator.h:207
EOperation Operation
Definition D3D12PoolAllocator.h:216
FRHIPoolAllocationData * AllocationData
Definition D3D12PoolAllocator.h:219
FD3D12Resource * PlacedResource
Definition D3D12PoolAllocator.h:217
uint64 FrameFence
Definition D3D12PoolAllocator.h:218
EOperation
Definition D3D12PoolAllocator.h:209
Definition D3D12Resources.h:134
Definition D3D12PoolAllocator.h:24
D3D12_RESOURCE_FLAGS ResourceFlags
Definition D3D12PoolAllocator.h:45
D3D12_HEAP_TYPE HeapType
Definition D3D12PoolAllocator.h:43
ED3D12Access InitialD3D12Access
Definition D3D12PoolAllocator.h:46
bool operator==(const FD3D12ResourceInitConfig &InOther) const
Definition D3D12PoolAllocator.h:35
D3D12_HEAP_FLAGS HeapFlags
Definition D3D12PoolAllocator.h:44
static FD3D12ResourceInitConfig CreateUpload()
Definition D3D12PoolAllocator.h:25
Stores all required data for a VRAM copy operation - doesn't own the resources.
Definition D3D12PoolAllocator.h:54
uint32 Size
Definition D3D12PoolAllocator.h:67
ED3D12Access SrcResourcED3D12Access
Definition D3D12PoolAllocator.h:62
ECopyType CopyType
Definition D3D12PoolAllocator.h:68
FD3D12Resource * SrcResource
Definition D3D12PoolAllocator.h:61
uint32 DstOffset
Definition D3D12PoolAllocator.h:66
ECopyType
Definition D3D12PoolAllocator.h:56
@ BufferRegion
Definition D3D12PoolAllocator.h:57
@ Resource
Definition D3D12PoolAllocator.h:58
FD3D12Resource * DstResource
Definition D3D12PoolAllocator.h:64
ED3D12Access DstResourcED3D12Access
Definition D3D12PoolAllocator.h:65
uint32 SrcOffset
Definition D3D12PoolAllocator.h:63
Pool allocator internal data.
Definition RHIPoolAllocator.h:39
Definition D3D12Resources.h:827