MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mxvk::BufferResource Struct Reference

Owned Vulkan buffer allocation with optional persistent host mapping. More...

#include <mxvk/include/mxvk/mxvk_resource.hpp>

Public Attributes

VkBuffer buffer = VK_NULL_HANDLE
 Vulkan buffer handle.
void * mapped = nullptr
 Host pointer returned by vkMapMemory, or nullptr when unmapped.
VkDeviceMemory memory = VK_NULL_HANDLE
 Device memory bound to buffer.
VkDeviceSize size = 0
 Requested buffer size in bytes.

Detailed Description

Owned Vulkan buffer allocation with optional persistent host mapping.

The helper functions in this file treat this as a small RAII-like aggregate: create_buffer() initializes the handles, map_buffer() stores the mapped pointer, and destroy_buffer() unmaps and releases any live resources.

Definition at line 25 of file mxvk_resource.hpp.

Member Data Documentation

◆ buffer

VkBuffer mxvk::BufferResource::buffer = VK_NULL_HANDLE

Vulkan buffer handle.

Definition at line 27 of file mxvk_resource.hpp.

◆ mapped

void* mxvk::BufferResource::mapped = nullptr

Host pointer returned by vkMapMemory, or nullptr when unmapped.

Definition at line 33 of file mxvk_resource.hpp.

◆ memory

VkDeviceMemory mxvk::BufferResource::memory = VK_NULL_HANDLE

Device memory bound to buffer.

Definition at line 29 of file mxvk_resource.hpp.

◆ size

VkDeviceSize mxvk::BufferResource::size = 0

Requested buffer size in bytes.

Definition at line 31 of file mxvk_resource.hpp.


The documentation for this struct was generated from the following file: