Monado OpenXR Runtime
render_buffer.c File Reference

Buffer functions. More...

#include "vk/vk_mini_helpers.h"
#include "render/render_interface.h"
#include <stdio.h>
Include dependency graph for render_buffer.c:

Functions

static XRT_CHECK_RESULT VkResult create_buffer (struct vk_bundle *vk, VkBufferUsageFlags usage_flags, VkMemoryPropertyFlags memory_property_flags, VkDeviceSize size, const void *pNext_for_create, const void *pNext_for_allocate, VkBuffer *out_buffer, VkDeviceMemory *out_memory, VkDeviceSize *out_alignment, VkDeviceSize *out_allocation_size)
 
VkResult render_buffer_init (struct vk_bundle *vk, struct render_buffer *buffer, VkBufferUsageFlags usage_flags, VkMemoryPropertyFlags memory_property_flags, VkDeviceSize size)
 Initialize a buffer. More...
 
VkResult render_buffer_init_exportable (struct vk_bundle *vk, struct render_buffer *buffer, VkBufferUsageFlags usage_flags, VkMemoryPropertyFlags memory_property_flags, VkDeviceSize size)
 Initialize a buffer, making it exportable. More...
 
void render_buffer_close (struct vk_bundle *vk, struct render_buffer *buffer)
 Frees all resources that this buffer has, but does not free the buffer itself. More...
 
VkResult render_buffer_map (struct vk_bundle *vk, struct render_buffer *buffer)
 Maps the memory, sets render_buffer::mapped to the memory. More...
 
void render_buffer_unmap (struct vk_bundle *vk, struct render_buffer *buffer)
 Unmaps the memory. More...
 
VkResult render_buffer_map_and_write (struct vk_bundle *vk, struct render_buffer *buffer, void *data, VkDeviceSize size)
 Maps the buffer, and copies the given data to the buffer. More...
 
VkResult render_buffer_write (struct vk_bundle *vk, struct render_buffer *buffer, void *data, VkDeviceSize size)
 Writes the given data to the buffer, will map it temporarily if not mapped. More...
 

Detailed Description