venus: split out vn_command_buffer.[ch]
Move VkCommand{Pool,Buffer} functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
This commit is contained in:
@@ -31,6 +31,7 @@ virtio_icd = custom_target(
|
||||
)
|
||||
|
||||
libvn_files = files(
|
||||
'vn_command_buffer.c',
|
||||
'vn_common.c',
|
||||
'vn_cs.c',
|
||||
'vn_device.c',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* based in part on anv and radv which are:
|
||||
* Copyright © 2015 Intel Corporation
|
||||
* Copyright © 2016 Red Hat.
|
||||
* Copyright © 2016 Bas Nieuwenhuizen
|
||||
*/
|
||||
|
||||
#ifndef VN_COMMAND_BUFFER_H
|
||||
#define VN_COMMAND_BUFFER_H
|
||||
|
||||
#include "vn_common.h"
|
||||
|
||||
#include "vn_cs.h"
|
||||
|
||||
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,
|
||||
VkCommandBuffer,
|
||||
VK_OBJECT_TYPE_COMMAND_BUFFER)
|
||||
|
||||
#endif /* VN_COMMAND_BUFFER_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -387,39 +387,6 @@ 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,
|
||||
VkCommandBuffer,
|
||||
VK_OBJECT_TYPE_COMMAND_BUFFER)
|
||||
|
||||
VkResult
|
||||
vn_instance_submit_roundtrip(struct vn_instance *instance,
|
||||
uint32_t *roundtrip_seqno);
|
||||
|
||||
Reference in New Issue
Block a user