venus: initial support for command buffers

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
This commit is contained in:
Chia-I Wu 2019-11-05 12:53:15 -08:00 committed by Marge Bot
parent 723f0bf74a
commit 4db8163392
3 changed files with 1283 additions and 0 deletions

View file

@ -73,6 +73,7 @@ struct vn_shader_module;
struct vn_pipeline_layout;
struct vn_pipeline_cache;
struct vn_pipeline;
struct vn_command_pool;
struct vn_command_buffer;
struct vn_cs_encoder;

File diff suppressed because it is too large Load diff

View file

@ -381,10 +381,33 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(vn_pipeline,
VkPipeline,
VK_OBJECT_TYPE_PIPELINE)
struct vn_command_pool {
struct vn_object_base base;
VkAllocationCallbacks allocator;
struct list_head command_buffers;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_command_pool,
base.base,
VkCommandPool,
VK_OBJECT_TYPE_COMMAND_POOL)
enum vn_command_buffer_state {
VN_COMMAND_BUFFER_STATE_INITIAL,
VN_COMMAND_BUFFER_STATE_RECORDING,
VN_COMMAND_BUFFER_STATE_EXECUTABLE,
VN_COMMAND_BUFFER_STATE_INVALID,
};
struct vn_command_buffer {
struct vn_object_base base;
struct vn_device *device;
struct list_head head;
enum vn_command_buffer_state state;
struct vn_cs_encoder cs;
};
VK_DEFINE_HANDLE_CASTS(vn_command_buffer,
base.base,