61XRT_CHECK_RESULT VkResult
62vk_cmd_pool_init_for_queue(
struct vk_bundle *vk,
64 VkCommandPoolCreateFlags
flags,
72static inline XRT_CHECK_RESULT VkResult
94XRT_CHECK_RESULT VkResult
95vk_cmd_pool_create_cmd_buffer_locked(
struct vk_bundle *vk,
struct vk_cmd_pool *
pool, VkCommandBuffer *out_cmd_buffer);
104XRT_CHECK_RESULT VkResult
105vk_cmd_pool_create_and_begin_cmd_buffer_locked(
struct vk_bundle *vk,
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
177 vk_cmd_pool_lock(
pool);
178 VkResult ret = vk_cmd_pool_create_cmd_buffer_locked(vk,
pool, out_cmd_buffer);
179 vk_cmd_pool_unlock(
pool);
189XRT_CHECK_RESULT
static inline VkResult
192 VkCommandBufferUsageFlags
flags,
193 VkCommandBuffer *out_cmd_buffer)
195 vk_cmd_pool_lock(
pool);
196 VkResult ret = vk_cmd_pool_create_and_begin_cmd_buffer_locked(vk,
pool,
flags, out_cmd_buffer);
197 vk_cmd_pool_unlock(
pool);
207XRT_CHECK_RESULT
static inline VkResult
211 vk_cmd_pool_lock(
pool);
213 vk_cmd_pool_unlock(
pool);
223XRT_CHECK_RESULT
static inline VkResult
226 vk_cmd_pool_lock(
pool);
227 VkResult ret = vk_cmd_pool_submit_cmd_buffer_locked(vk,
pool, cmd_buffer);
228 vk_cmd_pool_unlock(
pool);
239XRT_CHECK_RESULT
static inline VkResult
242 VkCommandBuffer cmd_buffer)
244 vk_cmd_pool_lock(
pool);
245 VkResult ret = vk_cmd_pool_end_submit_wait_and_free_cmd_buffer_locked(vk,
pool, cmd_buffer);
246 vk_cmd_pool_unlock(
pool);
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:100
static void os_mutex_unlock(struct os_mutex *om)
Unlock.
Definition os_threading.h:124
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:69
struct os_mutex mutex
Big contenious mutex.
Definition u_worker.c:54
Definition vk_helpers.h:56
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition vk_helpers.h:75
struct vk_bundle_queue * main_queue
Main queue for general work.
Definition vk_helpers.h:102
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
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
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
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
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
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.