Skip to content

KDGpu::VulkanTexture

Module: Vulkan

VulkanTexture.

#include <vulkan_texture.h>

Public Functions

Name
VulkanTexture(VkImage _image, VmaAllocation _allocation, VmaAllocator _allocator, Format _format, Extent3D _extent, uint32_t _mipLevels, uint32_t _arrayLayers, TextureUsageFlags _usage, VulkanResourceManager * _vulkanResourceManager, const Handle< Device_t > & _deviceHandle, const MemoryHandle & _externalMemoryHandle, uint64_t _drmFormatModifier, bool _ownedBySwapchain =false)
void * map()
void unmap()
void hostLayoutTransition(const HostLayoutTransition & transition)
void copyHostMemoryToTexture(const HostMemoryToTextureCopy & copy)
void copyTextureToHostMemory(const TextureToHostMemoryCopy & copy)
void copyTextureToTextureHost(const TextureToTextureCopyHost & copy)
SubresourceLayout getSubresourceLayout(const TextureSubresource & subresource) const
MemoryHandle externalMemoryHandle() const
uint64_t drmFormatModifier() const

Public Attributes

Name
VkImage image
VmaAllocation allocation
VmaAllocator allocator
void * mapped
Format format
Extent3D extent
uint32_t mipLevels
uint32_t arrayLayers
TextureUsageFlags usage
bool ownedBySwapchain
VulkanResourceManager * vulkanResourceManager
Handle< Device_t > deviceHandle
MemoryHandle m_externalMemoryHandle
uint64_t m_drmFormatModifier

Public Functions Documentation

function VulkanTexture

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
explicit VulkanTexture(
    VkImage _image,
    VmaAllocation _allocation,
    VmaAllocator _allocator,
    Format _format,
    Extent3D _extent,
    uint32_t _mipLevels,
    uint32_t _arrayLayers,
    TextureUsageFlags _usage,
    VulkanResourceManager * _vulkanResourceManager,
    const Handle< Device_t > & _deviceHandle,
    const MemoryHandle & _externalMemoryHandle,
    uint64_t _drmFormatModifier,
    bool _ownedBySwapchain =false
)

function map

1
void * map()

function unmap

1
void unmap()

function hostLayoutTransition

1
2
3
void hostLayoutTransition(
    const HostLayoutTransition & transition
)

function copyHostMemoryToTexture

1
2
3
void copyHostMemoryToTexture(
    const HostMemoryToTextureCopy & copy
)

function copyTextureToHostMemory

1
2
3
void copyTextureToHostMemory(
    const TextureToHostMemoryCopy & copy
)

function copyTextureToTextureHost

1
2
3
void copyTextureToTextureHost(
    const TextureToTextureCopyHost & copy
)

function getSubresourceLayout

1
2
3
SubresourceLayout getSubresourceLayout(
    const TextureSubresource & subresource
) const

function externalMemoryHandle

1
MemoryHandle externalMemoryHandle() const

function drmFormatModifier

1
uint64_t drmFormatModifier() const

Public Attributes Documentation

variable image

1
VkImage image { VK_NULL_HANDLE };

variable allocation

1
VmaAllocation allocation { VK_NULL_HANDLE };

variable allocator

1
VmaAllocator allocator { VK_NULL_HANDLE };

variable mapped

1
void * mapped { nullptr };

variable format

1
Format format;

variable extent

1
Extent3D extent;

variable mipLevels

1
uint32_t mipLevels;

variable arrayLayers

1
uint32_t arrayLayers;

variable usage

1
TextureUsageFlags usage;

variable ownedBySwapchain

1
bool ownedBySwapchain { false };

variable vulkanResourceManager

1
VulkanResourceManager * vulkanResourceManager { nullptr };

variable deviceHandle

1
Handle< Device_t > deviceHandle;

variable m_externalMemoryHandle

1
MemoryHandle m_externalMemoryHandle {};

variable m_drmFormatModifier

1
uint64_t m_drmFormatModifier {};

Updated on 2025-06-19 at 00:02:03 +0000