panvk: Kill panvk_private.h

Explicitly include the headers we need in the various .{c,h} files and
remove panvk_private.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
This commit is contained in:
Boris Brezillon
2023-12-21 14:25:36 +01:00
committed by Marge Bot
parent fc69751abd
commit 2de95773b9
35 changed files with 62 additions and 148 deletions

View File

@@ -46,7 +46,6 @@ libpanvk_files = files(
'panvk_mempool.c',
'panvk_physical_device.c',
'panvk_pipeline.c',
'panvk_private.h',
'panvk_priv_bo.c',
'panvk_query.c',
'panvk_shader.c',

View File

@@ -6,8 +6,6 @@
* SPDX-License-Identifier: MIT
*/
#include "panvk_private.h"
#include <hardware/hardware.h>
#include <hardware/hwvulkan.h>
#include <vulkan/vk_icd.h>

View File

@@ -6,7 +6,9 @@
#include "panvk_buffer.h"
#include "panvk_device.h"
#include "panvk_device_memory.h"
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "vk_log.h"
VKAPI_ATTR VkDeviceAddress VKAPI_CALL
panvk_GetBufferDeviceAddress(VkDevice _device,

View File

@@ -30,15 +30,17 @@
#include "panvk_buffer.h"
#include "panvk_cmd_pool.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_physical_device.h"
#include "panvk_pipeline.h"
#include "panvk_pipeline_layout.h"
#include "panvk_private.h"
#include "pan_encoder.h"
#include "pan_props.h"
#include "util/rounding.h"
#include "vk_alloc.h"
#include "vk_format.h"
#include "vk_framebuffer.h"

View File

@@ -16,7 +16,6 @@
#include "panvk_macros.h"
#include "panvk_mempool.h"
#include "panvk_pipeline.h"
#include "panvk_private.h"
#include "panvk_shader.h"
#include "pan_jc.h"

View File

@@ -11,7 +11,10 @@
#include "panvk_cmd_pool.h"
#include "panvk_device.h"
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "vk_alloc.h"
#include "vk_log.h"
VKAPI_ATTR VkResult VKAPI_CALL
panvk_CreateCommandPool(VkDevice _device,

View File

@@ -27,8 +27,9 @@
#include "panvk_descriptor_set.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_pipeline_layout.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include <assert.h>
#include <fcntl.h>
@@ -36,8 +37,9 @@
#include <string.h>
#include <unistd.h>
#include "util/mesa-sha1.h"
#include "vk_alloc.h"
#include "vk_descriptors.h"
#include "vk_log.h"
#include "vk_util.h"
VKAPI_ATTR VkResult VKAPI_CALL

View File

@@ -9,7 +9,9 @@
#include "panvk_device.h"
#include "panvk_device_memory.h"
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "vk_log.h"
VKAPI_ATTR VkResult VKAPI_CALL
panvk_AllocateMemory(VkDevice _device,

View File

@@ -5,7 +5,9 @@
#include "panvk_event.h"
#include "panvk_device.h"
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "vk_log.h"
VKAPI_ATTR VkResult VKAPI_CALL
panvk_CreateEvent(VkDevice _device, const VkEventCreateInfo *pCreateInfo,

View File

@@ -30,15 +30,16 @@
#include "panvk_device.h"
#include "panvk_device_memory.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
#include "drm-uapi/drm_fourcc.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
#include "vk_format.h"
#include "vk_log.h"
#include "vk_object.h"
#include "vk_util.h"

View File

@@ -15,7 +15,14 @@
#include "panvk_entrypoints.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
#ifdef HAVE_VALGRIND
#include <memcheck.h>
#include <valgrind.h>
#define VG(x) x
#else
#define VG(x)
#endif
static const struct debug_control panvk_debug_options[] = {
{"startup", PANVK_DEBUG_STARTUP},

View File

@@ -25,7 +25,8 @@
#include "panvk_mempool.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "kmod/pan_kmod.h"
void
panvk_bo_pool_cleanup(struct panvk_bo_pool *bo_pool)

View File

@@ -13,15 +13,16 @@
#include "util/disk_cache.h"
#include "vk_device.h"
#include "vk_drm_syncobj.h"
#include "vk_format.h"
#include "vk_log.h"
#include "vk_util.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
#include "panvk_wsi.h"
#include "pan_format.h"

View File

@@ -28,8 +28,8 @@
#include "panvk_pipeline.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "nir/nir.h"
#include "nir/nir_builder.h"

View File

@@ -1,112 +0,0 @@
/*
* Copyright © 2021 Collabora Ltd.
*
* derived from tu_private.h driver which is:
* Copyright © 2016 Red Hat.
* Copyright © 2016 Bas Nieuwenhuizen
* Copyright © 2015 Intel Corporation
*
* 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 PANVK_PRIVATE_H
#define PANVK_PRIVATE_H
#include <assert.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "c11/threads.h"
#include "compiler/shader_enums.h"
#include "util/list.h"
#include "util/macros.h"
#include "vk_alloc.h"
#include "vk_buffer.h"
#include "vk_buffer_view.h"
#include "vk_command_buffer.h"
#include "vk_command_pool.h"
#include "vk_descriptor_set_layout.h"
#include "vk_device.h"
#include "vk_device_memory.h"
#include "vk_image.h"
#include "vk_instance.h"
#include "vk_log.h"
#include "vk_object.h"
#include "vk_physical_device.h"
#include "vk_pipeline_layout.h"
#include "vk_queue.h"
#include "vk_sampler.h"
#include "vk_sync.h"
#include "wsi_common.h"
#include "drm-uapi/panfrost_drm.h"
#include "pan_blend.h"
#include "pan_blitter.h"
#include "pan_desc.h"
#include "pan_jc.h"
#include "pan_texture.h"
#include "panvk_descriptor_set.h"
#include "panvk_descriptor_set_layout.h"
#include "panvk_instance.h"
#include "panvk_macros.h"
#include "panvk_mempool.h"
#include "panvk_meta.h"
#include "panvk_physical_device.h"
#include "panvk_pipeline.h"
#include "panvk_pipeline_layout.h"
#include "panvk_shader.h"
#include "panvk_varyings.h"
#include "vk_extensions.h"
#include "kmod/pan_kmod.h"
/* Pre-declarations needed for WSI entrypoints */
struct wl_surface;
struct wl_display;
typedef struct xcb_connection_t xcb_connection_t;
typedef uint32_t xcb_visualid_t;
typedef uint32_t xcb_window_t;
#include <vulkan/vk_android_native_buffer.h>
#include <vulkan/vk_icd.h>
#include <vulkan/vulkan.h>
#include "panvk_entrypoints.h"
#define MAX_VERTEX_ATTRIBS 16
#define MAX_VSC_PIPES 32
#define MAX_SCISSORS 16
#define MAX_DISCARD_RECTANGLES 4
#define MAX_SAMPLES_LOG2 4
#define NUM_META_FS_KEYS 13
#define MAX_VIEWS 8
#define NUM_DEPTH_CLEAR_PIPELINES 3
struct panvk_device;
struct panvk_pipeline_layout;
struct panvk_queue;
#endif /* PANVK_PRIVATE_H */

View File

@@ -21,7 +21,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "panvk_macros.h"
VKAPI_ATTR VkResult VKAPI_CALL
panvk_CreateQueryPool(VkDevice _device,

View File

@@ -10,8 +10,6 @@
#include "vk_queue.h"
#include "panvk_private.h"
struct panvk_queue {
struct vk_queue vk;
uint32_t sync;

View File

@@ -26,10 +26,10 @@
#include "panvk_shader.h"
#include "panvk_device.h"
#include "panvk_private.h"
#include "pan_shader.h"
#include "vk_alloc.h"
#include "vk_util.h"
void

View File

@@ -14,10 +14,11 @@
#include "panvk_buffer.h"
#include "panvk_buffer_view.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "vk_format.h"
#include "vk_log.h"
VKAPI_ATTR VkResult VKAPI_CALL
panvk_per_arch(CreateBufferView)(VkDevice _device,

View File

@@ -32,6 +32,7 @@
#include "panvk_cmd_buffer.h"
#include "panvk_cmd_pool.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_event.h"
#include "panvk_image.h"
#include "panvk_image_view.h"
@@ -40,7 +41,6 @@
#include "panvk_pipeline.h"
#include "panvk_pipeline_layout.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "pan_blitter.h"
#include "pan_desc.h"

View File

@@ -29,10 +29,10 @@
#include "panvk_buffer_view.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_image_view.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include <assert.h>
#include <fcntl.h>
@@ -41,9 +41,11 @@
#include <unistd.h>
#include "util/mesa-sha1.h"
#include "vk_alloc.h"
#include "vk_descriptor_update_template.h"
#include "vk_descriptors.h"
#include "vk_format.h"
#include "vk_log.h"
#include "vk_util.h"
#include "panvk_buffer.h"

View File

@@ -4,12 +4,13 @@
*/
#include "vk_descriptors.h"
#include "vk_log.h"
#include "panvk_descriptor_set.h"
#include "panvk_descriptor_set_layout.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_pipeline_layout.h"
#include "panvk_private.h"
#include "panvk_sampler.h"
#define PANVK_DESCRIPTOR_ALIGN 8

View File

@@ -14,6 +14,7 @@
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_instance.h"
#include "panvk_macros.h"
#include "panvk_physical_device.h"

View File

@@ -10,12 +10,13 @@
*/
#include "vk_format.h"
#include "vk_log.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_image_view.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "genxml/gen_macros.h"

View File

@@ -28,7 +28,6 @@
#include "pan_shader.h"
#include "panvk_device.h"
#include "panvk_private.h"
#include "vk_format.h"

View File

@@ -28,9 +28,9 @@
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
static void
panvk_meta_blit(struct panvk_cmd_buffer *cmdbuf,

View File

@@ -29,10 +29,10 @@
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_meta.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
#include "vk_format.h"
#include "vk_render_pass.h"

View File

@@ -31,9 +31,9 @@
#include "panvk_buffer.h"
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_image.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
static mali_ptr
panvk_meta_copy_img_emit_texture(struct pan_pool *desc_pool,

View File

@@ -29,7 +29,6 @@
#include "panvk_device.h"
#include "panvk_pipeline_layout.h"
#include "panvk_private.h"
#include "panvk_shader.h"
#include "nir.h"

View File

@@ -28,10 +28,10 @@
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_pipeline.h"
#include "panvk_pipeline_layout.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "panvk_shader.h"
#include "nir/nir.h"

View File

@@ -6,11 +6,12 @@
#include "genxml/gen_macros.h"
#include "vk_log.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_macros.h"
#include "panvk_pipeline_layout.h"
#include "panvk_private.h"
#include "panvk_sampler.h"
#include "panvk_shader.h"

View File

@@ -15,18 +15,20 @@
#include "panvk_cmd_buffer.h"
#include "panvk_device.h"
#include "panvk_entrypoints.h"
#include "panvk_event.h"
#include "panvk_image.h"
#include "panvk_image_view.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_priv_bo.h"
#include "panvk_private.h"
#include "panvk_queue.h"
#include "vk_drm_syncobj.h"
#include "vk_framebuffer.h"
#include "drm-uapi/panfrost_drm.h"
static void
panvk_queue_submit_batch(struct panvk_queue *queue, struct panvk_batch *batch,
uint32_t *bos, unsigned nr_bos, uint32_t *in_fences,

View File

@@ -6,11 +6,13 @@
#include "genxml/gen_macros.h"
#include "panvk_device.h"
#include "panvk_private.h"
#include "panvk_entrypoints.h"
#include "panvk_sampler.h"
#include "pan_encoder.h"
#include "vk_log.h"
static enum mali_mipmap_mode
panvk_translate_sampler_mipmap_mode(VkSamplerMipmapMode mode)
{

View File

@@ -32,8 +32,8 @@
#include "panvk_device.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_pipeline.h"
#include "panvk_pipeline_layout.h"
#include "panvk_private.h"
#include "panvk_shader.h"
#include "spirv/nir_spirv.h"

View File

@@ -28,7 +28,6 @@
#include "panvk_wsi.h"
#include "panvk_instance.h"
#include "panvk_physical_device.h"
#include "panvk_private.h"
#include "vk_util.h"
#include "wsi_common.h"