mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
venus: remember cmd buffer level and queue family
We need them for wsi queue ownership transfer and others. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
This commit is contained in:
parent
fb549d21d8
commit
f7001f7a2d
2 changed files with 7 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ vn_CreateCommandPool(VkDevice device,
|
|||
vn_object_base_init(&pool->base, VK_OBJECT_TYPE_COMMAND_POOL, &dev->base);
|
||||
|
||||
pool->allocator = *alloc;
|
||||
pool->queue_family_index = pCreateInfo->queueFamilyIndex;
|
||||
list_inithead(&pool->command_buffers);
|
||||
|
||||
VkCommandPool pool_handle = vn_command_pool_to_handle(pool);
|
||||
|
|
@ -135,6 +136,8 @@ vn_AllocateCommandBuffers(VkDevice device,
|
|||
&dev->base);
|
||||
cmd->device = dev;
|
||||
cmd->allocator = pool->allocator;
|
||||
cmd->level = pAllocateInfo->level;
|
||||
cmd->queue_family_index = pool->queue_family_index;
|
||||
|
||||
list_addtail(&cmd->head, &pool->command_buffers);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ struct vn_command_pool {
|
|||
struct vn_object_base base;
|
||||
|
||||
VkAllocationCallbacks allocator;
|
||||
uint32_t queue_family_index;
|
||||
|
||||
struct list_head command_buffers;
|
||||
};
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_command_pool,
|
||||
|
|
@ -45,6 +47,8 @@ struct vn_command_buffer {
|
|||
struct vn_device *device;
|
||||
|
||||
VkAllocationCallbacks allocator;
|
||||
VkCommandBufferLevel level;
|
||||
uint32_t queue_family_index;
|
||||
|
||||
struct list_head head;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue