mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 07:38:10 +02:00
radv: Use a common vk_queue structure
Switch to using common structure. Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
This commit is contained in:
parent
1b085ff03a
commit
e2b59e3408
2 changed files with 7 additions and 4 deletions
|
|
@ -2793,14 +2793,16 @@ radv_queue_init(struct radv_device *device, struct radv_queue *queue, uint32_t q
|
|||
queue->flags = flags;
|
||||
queue->hw_ctx = device->hw_ctx[queue->priority];
|
||||
|
||||
vk_object_base_init(&device->vk, &queue->base, VK_OBJECT_TYPE_QUEUE);
|
||||
VkResult result = vk_queue_init(&queue->vk, &device->vk);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
list_inithead(&queue->pending_submissions);
|
||||
mtx_init(&queue->pending_mutex, mtx_plain);
|
||||
|
||||
mtx_init(&queue->thread_mutex, mtx_plain);
|
||||
if (u_cnd_monotonic_init(&queue->thread_cond)) {
|
||||
vk_object_base_finish(&queue->base);
|
||||
vk_queue_finish(&queue->vk);
|
||||
return vk_error(device->instance, VK_ERROR_INITIALIZATION_FAILED);
|
||||
}
|
||||
queue->cond_created = true;
|
||||
|
|
@ -2849,7 +2851,7 @@ radv_queue_finish(struct radv_queue *queue)
|
|||
if (queue->compute_scratch_bo)
|
||||
queue->device->ws->buffer_destroy(queue->device->ws, queue->compute_scratch_bo);
|
||||
|
||||
vk_object_base_finish(&queue->base);
|
||||
vk_queue_finish(&queue->vk);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "vk_physical_device.h"
|
||||
#include "vk_shader_module.h"
|
||||
#include "vk_command_buffer.h"
|
||||
#include "vk_queue.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
#include "ac_binary.h"
|
||||
|
|
@ -690,7 +691,7 @@ struct radv_deferred_queue_submission;
|
|||
enum ring_type radv_queue_family_to_ring(int f);
|
||||
|
||||
struct radv_queue {
|
||||
struct vk_object_base base;
|
||||
struct vk_queue vk;
|
||||
struct radv_device *device;
|
||||
struct radeon_winsys_ctx *hw_ctx;
|
||||
enum radeon_ctx_priority priority;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue