This type is useful beyond the scope of winsys.
It can now be used without being lumbered with a dependency on
pvr_winsys.h. Since pvr_winsys.h is used by pvr_private.h, this can be
a common cause for circular dependencies during development.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17488>
#include <stdint.h>
-#include "pvr_winsys.h"
+#include "pvr_types.h"
#define __pvr_address_type pvr_dev_addr_t
#define __pvr_get_address(pvr_dev_addr) (pvr_dev_addr).addr
--- /dev/null
+/*
+ * Copyright © 2022 Imagination Technologies Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef PVR_TYPES_H
+#define PVR_TYPES_H
+
+#include <stdint.h>
+
+/*****************************************************************************
+ Device virtual addresses
+*****************************************************************************/
+
+typedef struct pvr_dev_addr {
+ uint64_t addr;
+} pvr_dev_addr_t;
+
+/* clang-format off */
+#define PVR_DEV_ADDR_INVALID (pvr_dev_addr_t){ .addr = 0 }
+/* clang-format on */
+
+#endif /* PVR_TYPES_H */
#include "pvr_bo.h"
#include "pvr_private.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "vk_alloc.h"
#include "vk_log.h"
#include "pvr_limits.h"
#include "pvr_pds.h"
#include "pvr_private.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "util/compiler.h"
#include "util/list.h"
#include <vulkan/vulkan.h>
#include "pvr_bo.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "util/list.h"
#include "util/macros.h"
#include "hwdef/rogue_hw_utils.h"
#include "pvr_bo.h"
#include "pvr_private.h"
+#include "pvr_types.h"
#include "util/compiler.h"
#include "util/list.h"
#include "util/log.h"
#include "pvr_nop_usc.h"
#include "pvr_pds.h"
#include "pvr_private.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "rogue/rogue_compiler.h"
#include "util/build_id.h"
#include "hwdef/rogue_hw_defs.h"
#include "pvr_private.h"
-#include "pvr_winsys.h"
+#include "pvr_types.h"
enum pvr_pbe_gamma {
PVR_PBE_GAMMA_NONE,
#include "pvr_pds.h"
#include "pvr_private.h"
#include "pvr_transfer_eot.h"
+#include "pvr_types.h"
#include "pvr_vdm_load_sr.h"
#include "pvr_vdm_store_sr.h"
#include "pvr_winsys.h"
#define PVR_JOB_CONTEXT_H
#include "pvr_private.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
/* Support PDS code/data loading/storing to the 'B' shared register state
#include "pvr_bo.h"
#include "pvr_csb.h"
#include "pvr_csb_enum_helpers.h"
+#include "pvr_debug.h"
#include "pvr_job_common.h"
#include "pvr_job_context.h"
#include "pvr_job_render.h"
#include "pvr_pds.h"
#include "pvr_private.h"
#include "pvr_rogue_fw.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "util/compiler.h"
#include "util/macros.h"
#include "hwdef/rogue_hw_defs.h"
#include "pvr_limits.h"
-#include "pvr_winsys.h"
+#include "pvr_types.h"
struct pvr_device;
struct pvr_free_list;
struct pvr_render_ctx;
struct pvr_rt_dataset;
+struct pvr_winsys_job_bo;
struct vk_sync;
/* FIXME: Turn 'struct pvr_sub_cmd' into 'struct pvr_job' and change 'struct
#include "pvr_pds.h"
#include "pvr_private.h"
#include "pvr_shader.h"
-#include "pvr_winsys.h"
+#include "pvr_types.h"
#include "rogue/rogue.h"
#include "rogue/rogue_build_data.h"
#include "util/log.h"
#include "pvr_job_render.h"
#include "pvr_limits.h"
#include "pvr_pds.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "rogue/rogue.h"
#include "util/bitscan.h"
#include "hwdef/rogue_hw_defs.h"
#include "pvr_private.h"
+#include "pvr_types.h"
#include "util/macros.h"
/**
#include <vulkan/vulkan.h>
#include "hwdef/rogue_hw_defs.h"
-#include "pvr_rogue_fw.h"
#include "pvr_limits.h"
+#include "pvr_rogue_fw.h"
+#include "pvr_types.h"
#include "util/macros.h"
#include "util/vma.h"
#include "vk_sync.h"
struct pvr_device_info;
struct pvr_device_runtime_info;
-/* device virtual address */
-typedef struct pvr_dev_addr {
- uint64_t addr;
-} pvr_dev_addr_t;
-
-/* clang-format off */
-#define PVR_DEV_ADDR_INVALID (pvr_dev_addr_t){ .addr = 0 }
-/* clang-format on */
-
struct pvr_winsys_heaps {
struct pvr_winsys_heap *general_heap;
struct pvr_winsys_heap *pds_heap;
#include <xf86drm.h>
#include "pvr_private.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "pvr_winsys_helper.h"
#include "util/u_atomic.h"
#include <stdbool.h>
#include <stdint.h>
-#include "pvr_winsys.h"
+#include "pvr_types.h"
+
+struct pvr_winsys;
+struct pvr_winsys_heap;
+struct pvr_winsys_static_data_offsets;
+struct pvr_winsys_vma;
typedef struct pvr_winsys_vma *(*const heap_alloc_reserved_func)(
struct pvr_winsys_heap *const heap,
#include "pvr_srv_public.h"
#include "pvr_srv_sync.h"
#include "pvr_srv_job_null.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "pvr_winsys_helper.h"
#include "util/log.h"
#include "pvr_srv.h"
#include "pvr_srv_bo.h"
#include "pvr_srv_bridge.h"
+#include "pvr_types.h"
#include "pvr_winsys_helper.h"
#include "util/u_atomic.h"
#include "util/bitscan.h"
#include "pvr_private.h"
#include "pvr_srv.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "util/macros.h"
#include "pvr_private.h"
#include "pvr_srv.h"
#include "pvr_srv_bridge.h"
+#include "pvr_types.h"
#include "util/log.h"
#include "util/macros.h"
#include "vk_log.h"
#include "pvr_private.h"
#include "pvr_srv.h"
-#include "pvr_winsys.h"
+#include "pvr_types.h"
#include "util/macros.h"
/******************************************************************************
#include "pvr_srv_job_common.h"
#include "pvr_srv_job_render.h"
#include "pvr_srv_sync.h"
+#include "pvr_types.h"
#include "pvr_winsys.h"
#include "util/libsync.h"
#include "util/log.h"