diff --git a/src/virtio/vulkan/vn_feedback.c b/src/virtio/vulkan/vn_feedback.c index a1da831bad4..c482454b842 100644 --- a/src/virtio/vulkan/vn_feedback.c +++ b/src/virtio/vulkan/vn_feedback.c @@ -10,15 +10,6 @@ #include "vn_physical_device.h" #include "vn_queue.h" -/* coherent buffer with bound and mapped memory */ -struct vn_feedback_buffer { - VkBuffer buffer; - VkDeviceMemory memory; - void *data; - - struct list_head head; -}; - static uint32_t vn_get_memory_type_index(const VkPhysicalDeviceMemoryProperties *mem_props, uint32_t mem_type_bits, @@ -35,7 +26,7 @@ vn_get_memory_type_index(const VkPhysicalDeviceMemoryProperties *mem_props, return UINT32_MAX; } -static VkResult +VkResult vn_feedback_buffer_create(struct vn_device *dev, uint32_t size, const VkAllocationCallbacks *alloc, @@ -128,7 +119,7 @@ out_free_feedback_buf: return result; } -static void +void vn_feedback_buffer_destroy(struct vn_device *dev, struct vn_feedback_buffer *feedback_buf, const VkAllocationCallbacks *alloc) diff --git a/src/virtio/vulkan/vn_feedback.h b/src/virtio/vulkan/vn_feedback.h index 097b7b74102..9e4863949d4 100644 --- a/src/virtio/vulkan/vn_feedback.h +++ b/src/virtio/vulkan/vn_feedback.h @@ -55,6 +55,15 @@ struct vn_feedback_cmd_pool { VkCommandPool pool; }; +/* coherent buffer with bound and mapped memory */ +struct vn_feedback_buffer { + VkBuffer buffer; + VkDeviceMemory memory; + void *data; + + struct list_head head; +}; + VkResult vn_feedback_pool_init(struct vn_device *dev, struct vn_feedback_pool *pool, @@ -109,6 +118,17 @@ vn_feedback_set_counter(struct vn_feedback_slot *slot, uint64_t counter) *slot->counter = counter; } +VkResult +vn_feedback_buffer_create(struct vn_device *dev, + uint32_t size, + const VkAllocationCallbacks *alloc, + struct vn_feedback_buffer **out_feedback_buf); + +void +vn_feedback_buffer_destroy(struct vn_device *dev, + struct vn_feedback_buffer *feedback_buf, + const VkAllocationCallbacks *alloc); + void vn_feedback_event_cmd_record(VkCommandBuffer cmd_handle, VkEvent ev_handle,