mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 17:30:29 +01:00
this updates our virtgpu support to match the upstream protocol, and enables. it is marked for backport since the older Mesa releases already had virtgpu support, just gated off to allow for breaking wire protocol changes (of which there was 1 at the last moment). Upstream virglrenderer MR assigned to marge: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1541 Backport-to: 25.1 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36580>
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, struct hk_queue *queue,
|
|
const VkDeviceQueueCreateInfo *pCreateInfo,
|
|
uint32_t index_in_family);
|
|
|
|
void hk_queue_finish(struct hk_device *dev, struct hk_queue *queue);
|