61XRT_CHECK_RESULT VkResult
64 VkCommandPoolCreateFlags
flags,
72static inline XRT_CHECK_RESULT VkResult
94XRT_CHECK_RESULT VkResult
104XRT_CHECK_RESULT VkResult
107 VkCommandBufferUsageFlags
flags,
108 VkCommandBuffer *out_cmd_buffer);
117XRT_CHECK_RESULT VkResult
136XRT_CHECK_RESULT
static inline VkResult
139 VkCommandBuffer cmd_buffer)
174XRT_CHECK_RESULT
static inline VkResult
189XRT_CHECK_RESULT
static inline VkResult
192 VkCommandBufferUsageFlags
flags,
193 VkCommandBuffer *out_cmd_buffer)
207XRT_CHECK_RESULT
static inline VkResult
223XRT_CHECK_RESULT
static inline VkResult
239XRT_CHECK_RESULT
static inline VkResult
242 VkCommandBuffer cmd_buffer)
250#ifdef VK_EXT_debug_utils
259XRT_CHECK_RESULT VkResult
260vk_cmd_pool_create_begin_insert_label_and_end_cmd_buffer_locked(
struct vk_bundle *vk,
262 const char *label_name,
263 VkCommandBuffer *out_cmd_buffer);
static void os_mutex_lock(struct os_mutex *om)
Lock.
Definition: os_threading.h:86
static void os_mutex_unlock(struct os_mutex *om)
Unlock.
Definition: os_threading.h:110
XRT_CHECK_RESULT VkResult vk_cmd_submit_locked(struct vk_bundle *vk, struct vk_bundle_queue *queue, uint32_t count, const VkSubmitInfo *infos, VkFence fence)
Very small helper to submit a command buffer, the _locked suffix refers to the command pool not the q...
Definition: vk_cmd.c:81
XRT_CHECK_RESULT VkResult vk_cmd_end_submit_wait_and_free_cmd_buffer_locked(struct vk_bundle *vk, struct vk_bundle_queue *queue, VkCommandPool pool, VkCommandBuffer cmd_buffer)
A do everything command buffer submission function, the _locked suffix refers to the command pool not...
Definition: vk_cmd.c:98
A very simple implementation of a fence primitive.
Definition: comp_sync.c:36
Definition: m_space.cpp:87
A wrapper around a native mutex.
Definition: os_threading.h:55
Definition: u_worker.c:49
struct os_mutex mutex
Big contenious mutex.
Definition: u_worker.c:53
Definition: vk_helpers.h:44
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition: vk_helpers.h:67
Small helper to manage lock around a command pool.
Definition: vk_cmd_pool.h:33
static void vk_cmd_pool_unlock(struct vk_cmd_pool *pool)
Unlock the command pool.
Definition: vk_cmd_pool.h:163
static XRT_CHECK_RESULT VkResult vk_cmd_pool_create_and_begin_cmd_buffer(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBufferUsageFlags flags, VkCommandBuffer *out_cmd_buffer)
Locks, calls vk_cmd_pool_create_and_begin_cmd_buffer_locked, and then unlocks the command pool.
Definition: vk_cmd_pool.h:190
XRT_CHECK_RESULT VkResult vk_cmd_pool_init_for_queue(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandPoolCreateFlags flags, struct vk_bundle_queue *queue)
Create a command buffer pool.
Definition: vk_cmd_pool.c:22
struct os_mutex mutex
Command Pool mutex.
Definition: vk_cmd_pool.h:46
static XRT_CHECK_RESULT VkResult vk_cmd_pool_submit(struct vk_bundle *vk, struct vk_cmd_pool *pool, uint32_t count, const VkSubmitInfo *infos, VkFence fence)
Locks, calls vk_cmd_submit_locked, and then unlocks the command pool.
Definition: vk_cmd_pool.h:208
XRT_CHECK_RESULT VkResult vk_cmd_pool_create_and_begin_cmd_buffer_locked(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBufferUsageFlags flags, VkCommandBuffer *out_cmd_buffer)
Create a command buffer and also begin it, call with the pool mutex held.
Definition: vk_cmd_pool.c:91
static XRT_CHECK_RESULT VkResult vk_cmd_pool_init(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandPoolCreateFlags flags)
Create a command buffer pool.
Definition: vk_cmd_pool.h:73
struct vk_bundle_queue * queue
Queue (family) associated with vk_cmd_pool::pool,.
Definition: vk_cmd_pool.h:43
void vk_cmd_pool_destroy(struct vk_bundle *vk, struct vk_cmd_pool *pool)
Destroy a command buffer pool, lock must not be held, externally synchronizable with all other pool c...
Definition: vk_cmd_pool.c:51
static XRT_CHECK_RESULT VkResult vk_cmd_pool_end_submit_wait_and_free_cmd_buffer_locked(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer cmd_buffer)
A do everything submit function, will take the queue mutex.
Definition: vk_cmd_pool.h:137
XRT_CHECK_RESULT VkResult vk_cmd_pool_create_cmd_buffer_locked(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer *out_cmd_buffer)
Create a command buffer, call with the pool mutex held.
Definition: vk_cmd_pool.c:65
static XRT_CHECK_RESULT VkResult vk_cmd_pool_create_cmd_buffer(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer *out_cmd_buffer)
Locks, calls vk_cmd_pool_create_cmd_buffer_locked, and then unlocks the command pool.
Definition: vk_cmd_pool.h:175
static XRT_CHECK_RESULT VkResult vk_cmd_pool_end_submit_wait_and_free_cmd_buffer(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer cmd_buffer)
Locks, calls vk_cmd_pool_end_submit_wait_and_free_cmd_buffer_locked, and then unlocks the command poo...
Definition: vk_cmd_pool.h:240
static void vk_cmd_pool_lock(struct vk_cmd_pool *pool)
Lock the command pool, needed for creating command buffers, filling out commands on any command buffe...
Definition: vk_cmd_pool.h:152
XRT_CHECK_RESULT VkResult vk_cmd_pool_submit_cmd_buffer_locked(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer cmd_buffer)
Submit to the vulkan queue, will take the queue mutex.
Definition: vk_cmd_pool.c:131
VkCommandPool pool
The command pool for command buffers.
Definition: vk_cmd_pool.h:35
static XRT_CHECK_RESULT VkResult vk_cmd_pool_submit_cmd_buffer(struct vk_bundle *vk, struct vk_cmd_pool *pool, VkCommandBuffer cmd_buffer)
Locks, calls vk_cmd_pool_submit_cmd_buffer_locked, and then unlocks the command pool.
Definition: vk_cmd_pool.h:224
Common Vulkan code header.