Mesa (main): venus: remember cmd buffer level and queue family
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 28 23:19:33 UTC 2021
Module: Mesa
Branch: main
Commit: f7001f7a2d131c34dd08e74ffbfdf9b3145686e3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7001f7a2d131c34dd08e74ffbfdf9b3145686e3
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Wed May 5 09:24:29 2021 -0700
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 at gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
---
src/virtio/vulkan/vn_command_buffer.c | 3 +++
src/virtio/vulkan/vn_command_buffer.h | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/src/virtio/vulkan/vn_command_buffer.c b/src/virtio/vulkan/vn_command_buffer.c
index e09cf8d2a94..87a9520e8b2 100644
--- a/src/virtio/vulkan/vn_command_buffer.c
+++ b/src/virtio/vulkan/vn_command_buffer.c
@@ -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);
diff --git a/src/virtio/vulkan/vn_command_buffer.h b/src/virtio/vulkan/vn_command_buffer.h
index ef0652390ff..a0a51d584b4 100644
--- a/src/virtio/vulkan/vn_command_buffer.h
+++ b/src/virtio/vulkan/vn_command_buffer.h
@@ -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;
More information about the mesa-commit
mailing list