FDeviceMemoryManager

Syntax

class FDeviceMemoryManager

Remarks

Manager of Device Heap Allocations. Calling Alloc/Free is expensive!

Variables

Name Description

Protected variable

bool

 

bHasUnifiedMemory

Protected variable

FVulkanDevice &...

 

Device

Protected variable

VkDevice

 

DeviceHandle

Protected variable

TArray < FHeapIn ...

 

HeapInfos

Protected variable

VkPhysicalDevic...

 

MemoryProperties

Protected variable

uint32

 

NumAllocations

Protected variable

uint32

 

PeakNumAllocations

Constructors

Name Description

Public function

FDeviceMemoryManager()

Destructors

Name Description

Public function

~FDeviceMemoryManager()

Functions

Name Description

Public function

FDeviceMemor ...

 

Alloc

(
    bool bCanFail,
    VkDeviceSize AllocationSize,
    uint32 MemoryTypeIndex,
    void* DedicatedAllocateInfo,
    const char* File,
    uint32 Line
)

BCanFail means an allocation failing is not a fatal error, just returns nullptr

Public function

FDeviceMemor ...

 

Alloc

(
    bool bCanFail,
    VkDeviceSize AllocationSize,
    uint32 MemoryTypeBits,
    VkMemoryPropertyFlags MemoryPropert...,
    void* DedicatedAllocateInfo,
    const char* File,
    uint32 Line
)

Public function

void

 

Deinit()

Public function

void

 

Free

(
    FDeviceMemoryAllocation *& Allo...
)

Sets the Allocation to nullptr.

Public function Const

const VkPhys...

 

GetMemoryProperties()

Public function

VkResult

 

GetMemoryTypeFromProperties

(
    uint32 TypeBits,
    VkMemoryPropertyFlags Properties,
    uint32 * OutTypeIndex
)

Public function

VkResult

 

GetMemoryTypeFromPropertiesExcluding

(
    uint32 TypeBits,
    VkMemoryPropertyFlags Properties,
    uint32 ExcludeTypeIndex,
    uint32 * OutTypeIndex
)

Public function Const

uint32

 

GetNumMemoryTypes()

Public function Const

uint64

 

GetTotalMemory

(
    bool bGPU
)

Public function Const

bool

 

HasUnifiedMemory()

Public function

void

 

Init

(
    FVulkanDevice* InDevice
)

Protected function

void

 

SetupAndPrintMemInfo()

Public function Const

bool

 

SupportsMemoryType

(
    VkMemoryPropertyFlags Properties
)

Classes

Name

Description

Protected struct

FHeapInfo

References

Module

VulkanRHI

Header

Runtime/VulkanRHI/Public/VulkanMemory.h