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. | |
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.
| VkBuffer mxvk::BufferResource::buffer = VK_NULL_HANDLE |
Vulkan buffer handle.
Definition at line 27 of file mxvk_resource.hpp.
| void* mxvk::BufferResource::mapped = nullptr |
Host pointer returned by vkMapMemory, or nullptr when unmapped.
Definition at line 33 of file mxvk_resource.hpp.
| VkDeviceMemory mxvk::BufferResource::memory = VK_NULL_HANDLE |
Device memory bound to buffer.
Definition at line 29 of file mxvk_resource.hpp.
| VkDeviceSize mxvk::BufferResource::size = 0 |
Requested buffer size in bytes.
Definition at line 31 of file mxvk_resource.hpp.