Language:
Discover
By Skill Level
By Category

FVulkanSurface

Choose your OS:

Syntax

class FVulkanSurface

Remarks

Texture/RT wrapper.

Variables

Name Description

Public variable

uint32

 

Depth

Public variable

FVulkanDevice &...

 

Device

Public variable

uint32

 

Height

Public variable

VkImage

 

Image

Public variable

VkMemoryRequire...

 

MemoryRequirements

Public variable

VkMemoryPropert...

 

MemProps

Public variable

uint32

 

NumArrayLevels

Public variable

EPixelFormat

 

PixelFormat

UE format.

Public variable

VkFormat

 

StorageFormat

Removes SRGB if requested, used to upload data.

Public variable

uint32

 

UEFlags

Public variable

VkFormat

 

ViewFormat

Format for SRVs, render targets.

Public variable

uint32

 

Width

Constructors

Name Description

Public function

FVulkanSurface

(
    FVulkanDevice& Device,
    VkImageViewType ResourceType,
    EPixelFormat Format,
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint32 NumMips,
    uint32 NumSamples,
    VkImage InImage,
    uint32 UEFlags,
    const FRHIResourceCreateInfo & Crea...
)

Constructor for externally owned Image.

Public function

FVulkanSurface

(
    FVulkanDevice& Device,
    VkImageViewType ResourceType,
    EPixelFormat Format,
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    bool bArray,
    uint32 ArraySize,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 UEFlags,
    const FRHIResourceCreateInfo & Crea...
)

Destructors

Name Description

Public function Virtual

~FVulkanSurface()

Functions

Name Description

Public function Static

VkImage

 

CreateImage

(
    FVulkanDevice& InDevice,
    VkImageViewType ResourceType,
    EPixelFormat InFormat,
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    bool bArray,
    uint32 ArraySize,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 UEFlags,
    VkMemoryRequirements& OutMemoryReq...,
    VkFormat* OutStorageFormat,
    VkFormat* OutViewFormat,
    VkImageCreateInfo* OutInfo,
    bool bForceLinearTexture
)

Seperate method for creating image, this can be used to measure image size After VkImage is no longer needed, dont forget to destroy/release it

Public function

void

 

Destroy()

Public function

VkDeviceMemo...

 

GetAllocationHandle()

Public function

uint64

 

GetAllocationOffset()

Public function

VkImageAspec...

 

GetFullAspectMask()

Full includes Depth+Stencil.

Public function

uint32

 

GetMemorySize()

Returns how much memory is used by the surface

Public function

void

 

GetMipOffset

(
    uint32 MipIndex,
    uint32 & Offset
)

Returns the memory offset to the texture's mip-map.

Public function

void

 

GetMipSize

(
    uint32 MipIndex,
    uint32 & MipBytes
)

Returns how much memory a single mip uses.

Public function

void

 

GetMipStride

(
    uint32 MipIndex,
    uint32 & Stride
)

Returns one of the texture's mip-maps stride.

Public function

uint32

 

GetNumberOfArrayLevels()

Public function

uint32

 

GetNumMips()

Public function

uint32

 

GetNumSamples()

Public function

VkImageAspec...

 

GetPartialAspectMask()

Only Depth or Stencil.

Public function

VkImageTilin...

 

GetTiling()

Public function

VkImageViewT...

 

GetViewType()

Public function Static

void

 

InternalLockWrite

(
    FVulkanCommandListContext & Context,
    FVulkanSurface * Surface,
    const VkImageSubresourceRange& Sub...,
    const VkBufferImageCopy& Region,
    VulkanRHI::FStagingBuffer * Sta...
)

Public function

bool

 

IsDepthOrStencilAspect()

Public function

bool

 

IsImageOwner()

References

Module

VulkanRHI

Header

Runtime/VulkanRHI/Public/VulkanResources.h