tu: Cleanup some includes

Remove unused includes or heavy includes (e.g. `tu_common.h`) when
we could have done with lighter ones.

iwyu was used to find these cases.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
This commit is contained in:
Karmjit Mahil 2026-04-08 14:55:17 +01:00 committed by Marge Bot
parent 9429b474f6
commit 0fcecb97f1
19 changed files with 46 additions and 28 deletions

View file

@ -29,7 +29,6 @@
#include "vk_acceleration_structure.h"
#include "bvh/tu_build_interface.h"
#include "common/freedreno_gpu_event.h"
#include "tu_buffer.h"
#include "tu_cmd_buffer.h"
#include "tu_device.h"

View file

@ -6,7 +6,10 @@
#ifndef TU_ACCELERATION_STRUCT_H
#define TU_ACCELERATION_STRUCT_H
#include "tu_common.h"
#include "vk_acceleration_structure.h"
#include "vulkan/vulkan_core.h"
struct tu_device;
VkResult tu_init_null_accel_struct(struct tu_device *device);

View file

@ -6,8 +6,6 @@
#ifndef TU_AUTOTUNE_H
#define TU_AUTOTUNE_H
#include "tu_common.h"
#include <atomic>
#include <deque>
#include <memory>

View file

@ -10,9 +10,11 @@
#ifndef TU_BUFFER_H
#define TU_BUFFER_H
#include "tu_common.h"
#include <stdint.h>
#include "vk_buffer.h"
#include "vk_object.h"
#include "vulkan/vulkan_core.h"
#include "tu_knl.h"

View file

@ -7,7 +7,6 @@
#include "tu_buffer.h"
#include "tu_device.h"
#include "tu_formats.h"
template <chip CHIP>
VKAPI_ATTR VkResult VKAPI_CALL

View file

@ -6,9 +6,15 @@
#ifndef TU_BUFFER_VIEW_H
#define TU_BUFFER_VIEW_H
#include "tu_common.h"
#include <stdint.h>
#include "vk_buffer_view.h"
#include "vk_object.h"
#include "vulkan/vulkan_core.h"
#include "fdl/freedreno_layout.h"
struct tu_buffer;
struct tu_buffer_view
{

View file

@ -10,7 +10,13 @@
#ifndef TU_CLEAR_BLIT_H
#define TU_CLEAR_BLIT_H
#include "tu_common.h"
#include <stdint.h>
#include "vulkan/vulkan_core.h"
#include "common/fd_hw_common.h"
struct tu_rect2d_float;
void tu_init_clear_blit_shaders(struct tu_device *dev);

View file

@ -19,20 +19,18 @@
#include "tu_descriptor_set.h"
#include <fcntl.h>
#include "util/mesa-blake3.h"
#include "vk_acceleration_structure.h"
#include "vk_descriptors.h"
#include "vk_util.h"
#include "bvh/tu_build_interface.h"
#include "bvh/tu_bvh.h"
#include "tu_buffer.h"
#include "tu_buffer_view.h"
#include "tu_device.h"
#include "tu_formats.h"
#include "tu_image.h"
#include "tu_rmv.h"
#include "tu_sampler.h"
#include "tu_subsampled_image.h"
static inline uint8_t *

View file

@ -13,7 +13,6 @@
#include "common/freedreno_pm4.h"
#include "fdl/fd6_format_table.h"
#include "tu_sampler.h"
/* The hardware supports up to 8 descriptor sets since A7XX.
* Note: This is the maximum across generations, not the maximum for a

View file

@ -12,9 +12,6 @@
#include "drm-uapi/drm_fourcc.h"
#include "git_sha1.h"
#include <fcntl.h>
#include <poll.h>
#include "common/freedreno_stompable_regs.h"
/* for fd_get_driver/device_uuid() */
#include "util/cache_ops.h"
@ -26,7 +23,6 @@
#include "util/u_process.h"
#include "vk_android.h"
#include "vk_debug_utils.h"
#include "vk_sampler.h"
#include "vk_shader_module.h"
#include "vk_util.h"

View file

@ -10,7 +10,12 @@
#ifndef TU_DYNAMIC_RENDERING_H
#define TU_DYNAMIC_RENDERING_H
#include "tu_common.h"
#include <stdint.h>
#include "vulkan/vulkan_core.h"
struct tu_device;
struct tu_cmd_buffer;
VkResult tu_init_dynamic_rendering(struct tu_device *dev);

View file

@ -10,7 +10,8 @@
#ifndef TU_EVENT_H
#define TU_EVENT_H
#include "tu_common.h"
#include "vk_object.h"
#include "vulkan/vulkan_core.h"
#include "tu_suballoc.h"

View file

@ -10,7 +10,12 @@
#ifndef TU_FORMATS_H
#define TU_FORMATS_H
#include "tu_common.h"
#include <stdbool.h>
#include "util/format/u_format.h"
#include "vulkan/vulkan_core.h"
#include "common/fd6_hw.h"
struct tu_native_format
{

View file

@ -16,6 +16,7 @@
#include "vk_android.h"
#include "vk_debug_utils.h"
#include "vk_util.h"
#include "vk_ycbcr_conversion.h"
#include "vulkan/vulkan_core.h"
#include "common/freedreno_lrz.h"

View file

@ -10,11 +10,14 @@
#ifndef TU_DRM_H
#define TU_DRM_H
#include "tu_common.h"
#include <stddef.h>
#include <stdint.h>
#include "tu_queue.h"
#include "util/u_atomic.h"
#include "vulkan/vulkan_core.h"
struct tu_u_trace_syncobj;
struct tu_queue;
struct vdrm_bo;
enum tu_bo_alloc_flags {

View file

@ -10,6 +10,7 @@
#include "drm-uapi/msm_drm.h"
#include "util/timespec.h"
#include "util/u_dynarray.h"
#include "vk_util.h"
#include "tu_knl.h"

View file

@ -7,14 +7,9 @@
#include <perfetto.h>
#include "util/hash_table.h"
#include "util/perf/u_perfetto.h"
#include "util/perf/u_perfetto_renderpass.h"
#include "vk_object.h"
#include "vk_util.h"
#include "tu_buffer.h"
#include "tu_cmd_buffer.h"
#include "tu_device.h"
#include "tu_image.h"
#include "tu_queue.h"

View file

@ -10,9 +10,9 @@
/* we can't include tu_common.h because ir3 headers are not C++-compatible */
#include <stdint.h>
#include <vulkan/vulkan.h>
#include "c11/threads.h"
#include "vulkan/vulkan_core.h"
#ifdef __cplusplus
extern "C" {

View file

@ -22,6 +22,7 @@
#include "tu_lrz.h"
#include "tu_pipeline.h"
#include "tu_rmv.h"
#include "tu_sampler.h"
#include "tu_subsampled_image.h"
static void