mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-19 15:48:19 +02:00
Follow what NVK does also fix order of cleanup in CreateDevice. Signed-off-by: Mary Guillemard <mary@mary.zone> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37380>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* Copyright 2024 Valve Corporation
|
|
* Copyright 2024 Alyssa Rosenzweig
|
|
* Copyright 2022-2023 Collabora Ltd. and Red Hat Inc.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "hk_private.h"
|
|
#include "vk_queue.h"
|
|
|
|
struct hk_device;
|
|
|
|
struct hk_queue {
|
|
struct vk_queue vk;
|
|
|
|
struct {
|
|
/* Asahi kernel queue ID */
|
|
uint32_t id;
|
|
|
|
/* Timeline syncobj backing the queue */
|
|
uint32_t syncobj;
|
|
|
|
/* Ring-idx used with virtgpu, equal to priority + 1 */
|
|
uint32_t virt_ring_idx;
|
|
|
|
/* Current maximum timeline value for the queue's syncobj. If the
|
|
* syncobj's value equals timeline_value, then all work is complete.
|
|
*/
|
|
uint64_t timeline_value;
|
|
} drm;
|
|
};
|
|
|
|
static inline struct hk_device *
|
|
hk_queue_device(struct hk_queue *queue)
|
|
{
|
|
return (struct hk_device *)queue->vk.base.device;
|
|
}
|
|
|
|
VkResult hk_queue_init(struct hk_device *dev,
|
|
const VkDeviceQueueCreateInfo *pCreateInfo,
|
|
uint32_t index_in_family);
|
|
|
|
void hk_queue_finish(struct hk_device *dev, struct hk_queue *queue);
|