FVulkanResourceHeap

A set of Device Allocations (Heap Pages) for a specific memory type.

Windows
MacOS
Linux

References

Module

VulkanRHI

Header

/Engine/Source/Runtime/VulkanRHI/Public/VulkanMemory.h

Include

#include "VulkanMemory.h"

Syntax

class FVulkanResourceHeap

Remarks

A set of Device Allocations (Heap Pages) for a specific memory type. This handles pooling allocations inside memory pages to avoid doing allocations directly off the device's heaps

Variables

Name Description

Protected variable

TArray< FVulkan...

 

ActivePages

Protected variable

bool

 

bIsHostCachedSupported

Protected variable

bool

 

bIsLazilyAllocatedSupported

Protected variable

uint8

 

DefragCountDown

Protected variable

uint16

 

HeapIndex

Protected variable

uint16

 

MemoryTypeIndex

Protected variable

uint32

 

OverridePageSize

Protected variable

FMemoryManager ...

 

Owner

Protected variable

uint32

 

PageIDCounter

Protected variable

TArray< FVulkan...

 

PageSizeBuckets

Protected variable

uint32

 

PeakPageSize

Protected variable

TArray< FVulkan...

 

UsedDedicatedImagePages

Protected variable

uint64

 

UsedMemory

Constructors

Name Description

Public function

FVulkanResourceHeap

(
    FMemoryManager* InOwner,
    uint32 InMemoryTypeIndex,
    uint32 InOverridePageSize
)

Destructors

Name Description

Public function

~FVulkanResourceHeap()

Functions

Name Description

Protected function

bool

 

AllocateDedicatedImage

(
    FVulkanAllocation& OutAllocation,
    FVulkanEvictable* AllocationOw...,
    VkImage Image,
    uint32 Size,
    uint32 Alignment,
    EVulkanAllocationMetaType MetaType,
    const char* File,
    uint32 Line
)

Protected function

bool

 

AllocateResource

(
    FVulkanAllocation& OutAllocation,
    FVulkanEvictable* AllocationOw...,
    EType Type,
    uint32 Size,
    uint32 Alignment,
    bool bMapAllocation,
    bool bForceSeparateAllocation,
    EVulkanAllocationMetaType MetaType,
    const char* File,
    uint32 Line
)

Public function

void

 

DefragTick

(
    FVulkanDevice& Device,
    FVulkanCommandListContext& Context,
    uint32 Count
)

Public function

void

 

DumpMemory

(
    FResourceHeapStats& Stats
)

Public function

uint64

 

EvictOne

(
    FVulkanDevice& Device
)

Public function

void

 

FreePage

(
    FVulkanSubresourceAllocator* I...
)

Public function

bool

 

GetIsDefragging

(
    FVulkanSubresourceAllocator* A...
)

Public function Const

uint32

 

GetMemoryTypeIndex()

Public function

FMemoryManag...

 

GetOwner()

Protected function

uint32

 

GetPageSize()

Public function

uint32

 

GetPageSizeBucket

(
    FVulkanPageSizeBucket& BucketOut,
    EType Type,
    uint32 AllocationSize,
    bool bForceSingleAllocation
)

Public function Const

bool

 

IsHostCachedSupported()

Public function Const

bool

 

IsLazilyAllocatedSupported()

Public function

void

 

ReleasePage

(
    FVulkanSubresourceAllocator* I...
)

Public function

void

 

SetDefragging

(
    FVulkanSubresourceAllocator* A...
)

Protected function

bool

 

TryRealloc

(
    FVulkanAllocation& OutAllocation,
    FVulkanEvictable* AllocationOw...,
    EType Type,
    uint32 Size,
    uint32 Alignment,
    EVulkanAllocationMetaType MetaType
)

Constants

Name

Description

MAX_BUCKETS

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss