pvr: break out queue to separate header

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37432>
This commit is contained in:
Erik Faye-Lund 2025-09-02 15:31:25 +02:00 committed by Marge Bot
parent dd296e0543
commit af431e7495
5 changed files with 54 additions and 23 deletions

View file

@ -57,6 +57,7 @@
#include "pvr_limits.h"
#include "pvr_pds.h"
#include "pvr_private.h"
#include "pvr_queue.h"
#include "pvr_robustness.h"
#include "pvr_tex_state.h"
#include "pvr_types.h"

View file

@ -72,7 +72,6 @@
#include "vk_instance.h"
#include "vk_log.h"
#include "vk_physical_device.h"
#include "vk_queue.h"
#include "vk_sync.h"
#include "wsi_common.h"
@ -86,12 +85,11 @@
struct pvr_bo;
struct pvr_bo_store;
struct pvr_compute_ctx;
struct pvr_compute_pipeline;
struct pvr_free_list;
struct pvr_graphics_pipeline;
struct pvr_instance;
struct pvr_render_ctx;
struct pvr_queue;
struct pvr_physical_device {
struct vk_physical_device vk;
@ -129,20 +127,6 @@ struct pvr_instance {
uint8_t driver_build_sha[SHA1_DIGEST_LENGTH];
};
struct pvr_queue {
struct vk_queue vk;
struct pvr_device *device;
struct pvr_render_ctx *gfx_ctx;
struct pvr_compute_ctx *compute_ctx;
struct pvr_compute_ctx *query_ctx;
struct pvr_transfer_ctx *transfer_ctx;
struct vk_sync *last_job_signal_sync[PVR_JOB_TYPE_MAX];
struct vk_sync *next_job_wait_sync[PVR_JOB_TYPE_MAX];
};
struct pvr_vertex_binding {
struct pvr_buffer *buffer;
VkDeviceSize offset;
@ -1219,10 +1203,6 @@ uint32_t pvr_calc_fscommon_size_and_tiles_in_flight(
VkResult pvr_wsi_init(struct pvr_physical_device *pdevice);
void pvr_wsi_finish(struct pvr_physical_device *pdevice);
VkResult pvr_queues_create(struct pvr_device *device,
const VkDeviceCreateInfo *pCreateInfo);
void pvr_queues_destroy(struct pvr_device *device);
VkResult pvr_bind_memory(struct pvr_device *device,
struct pvr_device_memory *mem,
VkDeviceSize offset,
@ -1480,7 +1460,6 @@ VK_DEFINE_HANDLE_CASTS(pvr_physical_device,
vk.base,
VkPhysicalDevice,
VK_OBJECT_TYPE_PHYSICAL_DEVICE)
VK_DEFINE_HANDLE_CASTS(pvr_queue, vk.base, VkQueue, VK_OBJECT_TYPE_QUEUE)
VK_DEFINE_NONDISP_HANDLE_CASTS(pvr_device_memory,
base,

View file

@ -29,6 +29,8 @@
* This file implements VkQueue, VkFence, and VkSemaphore
*/
#include "pvr_queue.h"
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
@ -41,7 +43,6 @@
#include "pvr_job_render.h"
#include "pvr_job_transfer.h"
#include "pvr_limits.h"
#include "pvr_private.h"
#include "util/macros.h"
#include "util/u_atomic.h"
#include "vk_alloc.h"

View file

@ -0,0 +1,48 @@
/*
* Copyright © 2022 Imagination Technologies Ltd.
*
* based in part on anv driver which is:
* Copyright © 2015 Intel Corporation
*
* based in part on radv driver which is:
* Copyright © 2016 Red Hat.
* Copyright © 2016 Bas Nieuwenhuizen
*
* SPDX-License-Identifier: MIT
*/
#ifndef PVR_QUEUE_H
#define PVR_QUEUE_H
#include "vk_queue.h"
#include "pvr_common.h"
struct vk_sync;
struct pvr_device;
struct pvr_render_ctx;
struct pvr_compute_ctx;
struct pvr_transfer_ctx;
struct pvr_queue {
struct vk_queue vk;
struct pvr_device *device;
struct pvr_render_ctx *gfx_ctx;
struct pvr_compute_ctx *compute_ctx;
struct pvr_compute_ctx *query_ctx;
struct pvr_transfer_ctx *transfer_ctx;
struct vk_sync *last_job_signal_sync[PVR_JOB_TYPE_MAX];
struct vk_sync *next_job_wait_sync[PVR_JOB_TYPE_MAX];
};
VK_DEFINE_HANDLE_CASTS(pvr_queue, vk.base, VkQueue, VK_OBJECT_TYPE_QUEUE)
VkResult pvr_queues_create(struct pvr_device *device,
const VkDeviceCreateInfo *pCreateInfo);
void pvr_queues_destroy(struct pvr_device *device);
#endif /* PVR_QUEUE_H */

View file

@ -29,7 +29,9 @@
#include <stdbool.h>
#include <vulkan/vulkan.h>
#include "pvr_queue.h"
#include "pvr_private.h"
#include "util/u_atomic.h"
#include "vk_object.h"
#include "wsi_common.h"