From 9429b474f63d360b8fd1dbd7224c778f16258c2f Mon Sep 17 00:00:00 2001 From: Karmjit Mahil Date: Wed, 8 Apr 2026 13:09:19 +0100 Subject: [PATCH] tu: Reorder includes These follow our clang-format style now. Signed-off-by: Karmjit Mahil Part-of: --- src/freedreno/vulkan/bvh/tu_build_helpers.h | 1 + src/freedreno/vulkan/bvh/tu_build_interface.h | 2 + src/freedreno/vulkan/layers/tu_rmv_layer.cc | 5 +- .../vulkan/tu_acceleration_structure.cc | 15 ++--- src/freedreno/vulkan/tu_buffer.h | 4 +- src/freedreno/vulkan/tu_clear_blit.cc | 12 ++-- src/freedreno/vulkan/tu_cmd_buffer.cc | 9 ++- src/freedreno/vulkan/tu_cmd_buffer.h | 2 +- src/freedreno/vulkan/tu_common.h | 60 +++++++++---------- src/freedreno/vulkan/tu_cs_breadcrumbs.cc | 3 +- src/freedreno/vulkan/tu_descriptor_set.cc | 6 +- src/freedreno/vulkan/tu_descriptor_set.h | 5 +- src/freedreno/vulkan/tu_device.cc | 20 +++---- src/freedreno/vulkan/tu_device.h | 14 ++--- src/freedreno/vulkan/tu_event.h | 1 + src/freedreno/vulkan/tu_formats.cc | 8 +-- src/freedreno/vulkan/tu_image.cc | 9 ++- src/freedreno/vulkan/tu_image.h | 2 +- src/freedreno/vulkan/tu_knl.cc | 4 +- src/freedreno/vulkan/tu_knl.h | 1 + src/freedreno/vulkan/tu_knl_drm.cc | 3 +- src/freedreno/vulkan/tu_knl_drm.h | 4 +- src/freedreno/vulkan/tu_knl_drm_msm.cc | 13 ++-- src/freedreno/vulkan/tu_knl_drm_virtio.cc | 15 +++-- src/freedreno/vulkan/tu_knl_kgsl.cc | 14 ++--- src/freedreno/vulkan/tu_lrz.cc | 5 +- .../vulkan/tu_nir_lower_demote_samples.cc | 3 +- .../vulkan/tu_nir_lower_multiview.cc | 6 +- .../vulkan/tu_nir_lower_ray_query.cc | 8 +-- src/freedreno/vulkan/tu_pass.cc | 2 +- src/freedreno/vulkan/tu_perfetto.cc | 20 +++---- src/freedreno/vulkan/tu_perfetto.h | 2 +- src/freedreno/vulkan/tu_pipeline.cc | 9 ++- src/freedreno/vulkan/tu_query_pool.cc | 6 +- src/freedreno/vulkan/tu_queue.cc | 6 +- src/freedreno/vulkan/tu_rmv.cc | 6 +- src/freedreno/vulkan/tu_shader.cc | 9 ++- src/freedreno/vulkan/tu_shader.h | 3 +- src/freedreno/vulkan/tu_subsampled_image.cc | 3 +- src/freedreno/vulkan/tu_subsampled_image.h | 4 +- src/freedreno/vulkan/tu_tile_config.cc | 5 +- src/freedreno/vulkan/tu_tracepoints.py | 8 +-- src/freedreno/vulkan/tu_util.cc | 8 +-- src/freedreno/vulkan/tu_util.h | 11 ++-- src/freedreno/vulkan/tu_wsi.cc | 3 +- 45 files changed, 173 insertions(+), 186 deletions(-) diff --git a/src/freedreno/vulkan/bvh/tu_build_helpers.h b/src/freedreno/vulkan/bvh/tu_build_helpers.h index e33863fa129..99887533c05 100644 --- a/src/freedreno/vulkan/bvh/tu_build_helpers.h +++ b/src/freedreno/vulkan/bvh/tu_build_helpers.h @@ -25,6 +25,7 @@ #define TU_BVH_BUILD_HELPERS_H #include "vk_build_helpers.h" + #include "tu_bvh.h" TYPE(tu_accel_struct_header, 8); diff --git a/src/freedreno/vulkan/bvh/tu_build_interface.h b/src/freedreno/vulkan/bvh/tu_build_interface.h index 4cf05ef597a..9e33c9147be 100644 --- a/src/freedreno/vulkan/bvh/tu_build_interface.h +++ b/src/freedreno/vulkan/bvh/tu_build_interface.h @@ -29,7 +29,9 @@ #include "tu_build_helpers.h" #else #include + #include "tu_bvh.h" + #define REF(type) uint64_t #define VOID_REF uint64_t #endif diff --git a/src/freedreno/vulkan/layers/tu_rmv_layer.cc b/src/freedreno/vulkan/layers/tu_rmv_layer.cc index fef1e0afde8..79ffd5ff5fc 100644 --- a/src/freedreno/vulkan/layers/tu_rmv_layer.cc +++ b/src/freedreno/vulkan/layers/tu_rmv_layer.cc @@ -3,12 +3,13 @@ * SPDX-License-Identifier: MIT */ +#include "vk_common_entrypoints.h" +#include "wsi_common_entrypoints.h" + #include "tu_device.h" #include "tu_entrypoints.h" #include "tu_queue.h" #include "tu_rmv.h" -#include "vk_common_entrypoints.h" -#include "wsi_common_entrypoints.h" VKAPI_ATTR VkResult VKAPI_CALL tu_rmv_QueuePresentKHR(VkQueue _queue, const VkPresentInfoKHR *pPresentInfo) diff --git a/src/freedreno/vulkan/tu_acceleration_structure.cc b/src/freedreno/vulkan/tu_acceleration_structure.cc index 1d4722dbe24..702d15e9c7b 100644 --- a/src/freedreno/vulkan/tu_acceleration_structure.cc +++ b/src/freedreno/vulkan/tu_acceleration_structure.cc @@ -22,20 +22,17 @@ * IN THE SOFTWARE. */ -#include "tu_buffer.h" -#include "tu_device.h" -#include "tu_cmd_buffer.h" - -#include "vk_acceleration_structure.h" #include "tu_acceleration_structure.h" + #include "radix_sort/radix_sort_u64.h" - - -#include "common/freedreno_gpu_event.h" - #include "util/u_hexdump.h" +#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" static const uint32_t encode_spv[] = { #include "bvh/encode.spv.h" diff --git a/src/freedreno/vulkan/tu_buffer.h b/src/freedreno/vulkan/tu_buffer.h index ac727c72f8c..9d09113ee39 100644 --- a/src/freedreno/vulkan/tu_buffer.h +++ b/src/freedreno/vulkan/tu_buffer.h @@ -12,10 +12,10 @@ #include "tu_common.h" -#include "tu_knl.h" - #include "vk_buffer.h" +#include "tu_knl.h" + struct tu_buffer { struct vk_buffer vk; diff --git a/src/freedreno/vulkan/tu_clear_blit.cc b/src/freedreno/vulkan/tu_clear_blit.cc index 395fa114786..05b7cda3abe 100644 --- a/src/freedreno/vulkan/tu_clear_blit.cc +++ b/src/freedreno/vulkan/tu_clear_blit.cc @@ -8,25 +8,23 @@ #include "tu_clear_blit.h" -#include "ir3/ir3_nir.h" - +#include "nir/nir_builder.h" #include "util/format_r11g11b10f.h" #include "util/format_rgb9e5.h" #include "util/format_srgb.h" #include "util/half_float.h" -#include "nir/nir_builder.h" +#include "common/freedreno_gpu_event.h" +#include "common/freedreno_lrz.h" +#include "ir3/ir3_nir.h" #include "tu_buffer.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_descriptor_set.h" #include "tu_formats.h" #include "tu_image.h" -#include "tu_tracepoints.h" #include "tu_lrz.h" - -#include "common/freedreno_gpu_event.h" -#include "common/freedreno_lrz.h" +#include "tu_tracepoints.h" static const VkOffset2D blt_no_coord = { ~0, ~0 }; diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index 14594f5ad3f..ddcc34382a4 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -14,6 +14,9 @@ #include "vk_render_pass.h" #include "vk_util.h" +#include "common/freedreno_gpu_event.h" +#include "common/freedreno_lrz.h" +#include "common/freedreno_vrs.h" #include "tu_autotune.h" #include "tu_buffer.h" #include "tu_clear_blit.h" @@ -21,13 +24,9 @@ #include "tu_event.h" #include "tu_image.h" #include "tu_knl.h" +#include "tu_subsampled_image.h" #include "tu_tile_config.h" #include "tu_tracepoints.h" -#include "tu_subsampled_image.h" - -#include "common/freedreno_gpu_event.h" -#include "common/freedreno_lrz.h" -#include "common/freedreno_vrs.h" enum tu_cmd_buffer_status { TU_CMD_BUFFER_STATUS_IDLE = 0, diff --git a/src/freedreno/vulkan/tu_cmd_buffer.h b/src/freedreno/vulkan/tu_cmd_buffer.h index 6c04c4c911a..c8ebc46a5d1 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.h +++ b/src/freedreno/vulkan/tu_cmd_buffer.h @@ -15,10 +15,10 @@ #include "tu_cs.h" #include "tu_descriptor_set.h" #include "tu_device.h" +#include "tu_image.h" #include "tu_lrz.h" #include "tu_pass.h" #include "tu_pipeline.h" -#include "tu_image.h" #include "tu_tile_config.h" enum tu_draw_state_group_id diff --git a/src/freedreno/vulkan/tu_common.h b/src/freedreno/vulkan/tu_common.h index fa4a8d49bd8..d3564eba3b1 100644 --- a/src/freedreno/vulkan/tu_common.h +++ b/src/freedreno/vulkan/tu_common.h @@ -29,54 +29,52 @@ #undef MESA_LOG_TAG #define MESA_LOG_TAG "TU" +#include "fd6_hw.h" +#include "perfcntrs/freedreno_perfcntr.h" + +#include +#include + #include "c11/threads.h" -#include "util/rounding.h" #include "util/bitscan.h" #include "util/detect_os.h" #include "util/list.h" #include "util/log.h" #include "util/macros.h" #include "util/perf/cpu_trace.h" +#include "util/perf/u_trace.h" +#include "util/rounding.h" #include "util/sparse_array.h" #include "util/u_atomic.h" #include "util/u_dynarray.h" #include "util/xmlconfig.h" -#include "util/perf/u_trace.h" #include "vk_alloc.h" -#include "vk_debug_report.h" -#include "vk_device.h" -#include "vk_dispatch_table.h" -#include "vk_extensions.h" -#include "vk_instance.h" -#include "vk_log.h" -#include "vk_physical_device.h" -#include "vk_pipeline_cache.h" -#include "wsi_common.h" - -#include "ir3/ir3_compiler.h" -#include "ir3/ir3_shader.h" - -#include "fd6_hw.h" -#include "fdl/freedreno_layout.h" -#include "common/freedreno_dev_info.h" -#include "common/freedreno_common.h" -#include "perfcntrs/freedreno_perfcntr.h" - -#include -#include - -#include "tu_entrypoints.h" - -#include "vk_format.h" -#include "vk_image.h" #include "vk_command_buffer.h" #include "vk_command_pool.h" #include "vk_common_entrypoints.h" -#include "vk_queue.h" -#include "vk_object.h" -#include "vk_sync.h" +#include "vk_debug_report.h" +#include "vk_device.h" +#include "vk_dispatch_table.h" #include "vk_drm_syncobj.h" +#include "vk_extensions.h" +#include "vk_format.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_cache.h" +#include "vk_queue.h" +#include "vk_sync.h" #include "vk_sync_timeline.h" +#include "wsi_common.h" + +#include "common/freedreno_common.h" +#include "common/freedreno_dev_info.h" +#include "fdl/freedreno_layout.h" +#include "ir3/ir3_compiler.h" +#include "ir3/ir3_shader.h" +#include "tu_entrypoints.h" #define MAX_VBS 32 #define MAX_VERTEX_ATTRIBS 32 diff --git a/src/freedreno/vulkan/tu_cs_breadcrumbs.cc b/src/freedreno/vulkan/tu_cs_breadcrumbs.cc index 54a0025c566..d6076239c71 100644 --- a/src/freedreno/vulkan/tu_cs_breadcrumbs.cc +++ b/src/freedreno/vulkan/tu_cs_breadcrumbs.cc @@ -3,12 +3,11 @@ * SPDX-License-Identifier: MIT */ -#include "tu_cs.h" - #include #include #include +#include "tu_cs.h" #include "tu_device.h" /* A simple implementations of breadcrumbs tracking of GPU progress diff --git a/src/freedreno/vulkan/tu_descriptor_set.cc b/src/freedreno/vulkan/tu_descriptor_set.cc index f1c4a84a260..112a774a275 100644 --- a/src/freedreno/vulkan/tu_descriptor_set.cc +++ b/src/freedreno/vulkan/tu_descriptor_set.cc @@ -22,18 +22,18 @@ #include #include "util/mesa-blake3.h" +#include "vk_acceleration_structure.h" #include "vk_descriptors.h" #include "vk_util.h" -#include "vk_acceleration_structure.h" +#include "bvh/tu_build_interface.h" #include "tu_buffer.h" #include "tu_buffer_view.h" #include "tu_device.h" -#include "tu_image.h" #include "tu_formats.h" +#include "tu_image.h" #include "tu_rmv.h" #include "tu_subsampled_image.h" -#include "bvh/tu_build_interface.h" static inline uint8_t * pool_base(struct tu_descriptor_pool *pool) diff --git a/src/freedreno/vulkan/tu_descriptor_set.h b/src/freedreno/vulkan/tu_descriptor_set.h index 3f754c9938e..7fa39f2c6a2 100644 --- a/src/freedreno/vulkan/tu_descriptor_set.h +++ b/src/freedreno/vulkan/tu_descriptor_set.h @@ -8,13 +8,12 @@ #include "tu_common.h" -#include "vk_descriptor_set_layout.h" - -#include "tu_sampler.h" #include "util/vma.h" +#include "vk_descriptor_set_layout.h" #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 diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index d7fd0bda550..944b14b1fc6 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -10,28 +10,28 @@ #include "tu_device.h" #include "drm-uapi/drm_fourcc.h" -#include "fdl/freedreno_layout.h" +#include "git_sha1.h" + #include #include -#include "git_sha1.h" +#include "common/freedreno_stompable_regs.h" +/* for fd_get_driver/device_uuid() */ #include "util/cache_ops.h" -#include "util/u_debug.h" #include "util/disk_cache.h" -#include "util/hex.h" #include "util/driconf.h" +#include "util/hex.h" #include "util/os_misc.h" +#include "util/u_debug.h" #include "util/u_process.h" #include "vk_android.h" #include "vk_debug_utils.h" -#include "vk_shader_module.h" #include "vk_sampler.h" +#include "vk_shader_module.h" #include "vk_util.h" -/* for fd_get_driver/device_uuid() */ -#include "freedreno/common/freedreno_uuid.h" -#include "freedreno/common/freedreno_stompable_regs.h" - +#include "common/freedreno_uuid.h" +#include "fdl/freedreno_layout.h" #include "tu_acceleration_structure.h" #include "tu_clear_blit.h" #include "tu_cmd_buffer.h" @@ -40,8 +40,8 @@ #include "tu_dynamic_rendering.h" #include "tu_image.h" #include "tu_pass.h" -#include "tu_queue.h" #include "tu_query_pool.h" +#include "tu_queue.h" #include "tu_rmv.h" #include "tu_tracepoints.h" #include "tu_wsi.h" diff --git a/src/freedreno/vulkan/tu_device.h b/src/freedreno/vulkan/tu_device.h index 204eae9511c..e5a71048275 100644 --- a/src/freedreno/vulkan/tu_device.h +++ b/src/freedreno/vulkan/tu_device.h @@ -12,9 +12,15 @@ #include "tu_common.h" +#include "radix_sort/radix_sort_vk.h" +#include "util/rwlock.h" +#include "util/u_vector.h" +#include "util/vma.h" #include "vk_device_memory.h" #include "vk_meta.h" +#include "common/fd6_gmem_cache.h" +#include "common/freedreno_rd_output.h" #include "tu_autotune.h" #include "tu_cs.h" #include "tu_pass.h" @@ -23,14 +29,6 @@ #include "tu_suballoc.h" #include "tu_util.h" -#include "radix_sort/radix_sort_vk.h" - -#include "common/freedreno_rd_output.h" -#include "common/fd6_gmem_cache.h" -#include "util/vma.h" -#include "util/u_vector.h" -#include "util/rwlock.h" - /* queue types */ #define TU_QUEUE_GENERAL 0 diff --git a/src/freedreno/vulkan/tu_event.h b/src/freedreno/vulkan/tu_event.h index a7c9a72f533..43e3f6cb2a7 100644 --- a/src/freedreno/vulkan/tu_event.h +++ b/src/freedreno/vulkan/tu_event.h @@ -11,6 +11,7 @@ #define TU_EVENT_H #include "tu_common.h" + #include "tu_suballoc.h" struct tu_event diff --git a/src/freedreno/vulkan/tu_formats.cc b/src/freedreno/vulkan/tu_formats.cc index 01d5260849b..0750cbf3649 100644 --- a/src/freedreno/vulkan/tu_formats.cc +++ b/src/freedreno/vulkan/tu_formats.cc @@ -6,15 +6,15 @@ #include "tu_formats.h" -#include "fdl/fd6_format_table.h" -#include "common/freedreno_ubwc.h" +#include "drm-uapi/drm_fourcc.h" +#include "vk_acceleration_structure.h" #include "vk_android.h" #include "vk_enum_defines.h" #include "vk_util.h" -#include "vk_acceleration_structure.h" -#include "drm-uapi/drm_fourcc.h" +#include "common/freedreno_ubwc.h" +#include "fdl/fd6_format_table.h" #include "tu_device.h" #include "tu_image.h" diff --git a/src/freedreno/vulkan/tu_image.cc b/src/freedreno/vulkan/tu_image.cc index 88df2a00d2a..6411aaccfd2 100644 --- a/src/freedreno/vulkan/tu_image.cc +++ b/src/freedreno/vulkan/tu_image.cc @@ -9,19 +9,18 @@ #include "tu_image.h" -#include "fdl/fd6_format_table.h" -#include "common/freedreno_lrz.h" +#include "drm-uapi/drm_fourcc.h" -#include "util/u_debug.h" #include "util/format/u_format.h" +#include "util/u_debug.h" #include "vk_android.h" #include "vk_debug_utils.h" #include "vk_util.h" -#include "drm-uapi/drm_fourcc.h" #include "vulkan/vulkan_core.h" +#include "common/freedreno_lrz.h" +#include "fdl/fd6_format_table.h" #include "fdl/freedreno_layout.h" - #include "tu_buffer.h" #include "tu_cs.h" #include "tu_descriptor_set.h" diff --git a/src/freedreno/vulkan/tu_image.h b/src/freedreno/vulkan/tu_image.h index 7383e6841e1..8bbf0205a67 100644 --- a/src/freedreno/vulkan/tu_image.h +++ b/src/freedreno/vulkan/tu_image.h @@ -11,8 +11,8 @@ #define TU_IMAGE_H #include "tu_common.h" -#include "fdl/freedreno_lrz_layout.h" +#include "fdl/freedreno_lrz_layout.h" #include "tu_knl.h" #define TU_MAX_PLANE_COUNT 3 diff --git a/src/freedreno/vulkan/tu_knl.cc b/src/freedreno/vulkan/tu_knl.cc index 0b8e824145f..081393c974c 100644 --- a/src/freedreno/vulkan/tu_knl.cc +++ b/src/freedreno/vulkan/tu_knl.cc @@ -18,17 +18,15 @@ #include -#include "vk_debug_utils.h" - #include "util/cache_ops.h" #include "util/libdrm.h" +#include "vk_debug_utils.h" #include "tu_device.h" #include "tu_knl.h" #include "tu_queue.h" #include "tu_rmv.h" - VkResult tu_bo_init_new_explicit_iova(struct tu_device *dev, struct vk_object_base *base, diff --git a/src/freedreno/vulkan/tu_knl.h b/src/freedreno/vulkan/tu_knl.h index 195343e0e45..d0b2067a4f2 100644 --- a/src/freedreno/vulkan/tu_knl.h +++ b/src/freedreno/vulkan/tu_knl.h @@ -11,6 +11,7 @@ #define TU_DRM_H #include "tu_common.h" + #include "tu_queue.h" struct tu_u_trace_syncobj; diff --git a/src/freedreno/vulkan/tu_knl_drm.cc b/src/freedreno/vulkan/tu_knl_drm.cc index c3e8828961f..4e055d07ec5 100644 --- a/src/freedreno/vulkan/tu_knl_drm.cc +++ b/src/freedreno/vulkan/tu_knl_drm.cc @@ -4,11 +4,12 @@ * SPDX-License-Identifier: MIT */ +#include "tu_knl_drm.h" + #include #include #include -#include "tu_knl_drm.h" #include "tu_device.h" #include "tu_queue.h" #include "tu_rmv.h" diff --git a/src/freedreno/vulkan/tu_knl_drm.h b/src/freedreno/vulkan/tu_knl_drm.h index 938c0ffe8f3..d72e8049444 100644 --- a/src/freedreno/vulkan/tu_knl_drm.h +++ b/src/freedreno/vulkan/tu_knl_drm.h @@ -7,12 +7,12 @@ #ifndef TU_KNL_DRM_H #define TU_KNL_DRM_H -#include "tu_knl.h" #include "drm-uapi/msm_drm.h" +#include "util/timespec.h" #include "vk_util.h" -#include "util/timespec.h" +#include "tu_knl.h" VkResult tu_allocate_userspace_iova(struct tu_device *dev, uint64_t size, diff --git a/src/freedreno/vulkan/tu_knl_drm_msm.cc b/src/freedreno/vulkan/tu_knl_drm_msm.cc index d6f6d6d4fba..16e1cb40337 100644 --- a/src/freedreno/vulkan/tu_knl_drm_msm.cc +++ b/src/freedreno/vulkan/tu_knl_drm_msm.cc @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include "tu_knl.h" +#include "drm-uapi/msm_drm.h" #include #include @@ -12,22 +12,21 @@ #include #include -#include "vk_util.h" - -#include "drm-uapi/msm_drm.h" -#include "util/u_debug.h" -#include "util/u_process.h" #include "util/hash_table.h" #include "util/libsync.h" +#include "util/u_debug.h" +#include "util/u_process.h" +#include "vk_util.h" +#include "common/redump.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" #include "tu_dynamic_rendering.h" +#include "tu_knl.h" #include "tu_knl_drm.h" #include "tu_queue.h" #include "tu_rmv.h" -#include "redump.h" static int tu_drm_get_param(int fd, uint32_t param, uint64_t *value) diff --git a/src/freedreno/vulkan/tu_knl_drm_virtio.cc b/src/freedreno/vulkan/tu_knl_drm_virtio.cc index 6040850b2a2..e28888fdcb1 100644 --- a/src/freedreno/vulkan/tu_knl_drm_virtio.cc +++ b/src/freedreno/vulkan/tu_knl_drm_virtio.cc @@ -6,7 +6,8 @@ * Kernel interface layer for turnip running on virtio_gpu (aka virtgpu) */ -#include "tu_knl.h" +#include "drm-uapi/msm_drm.h" +#include "drm-uapi/virtgpu_drm.h" #include #include @@ -14,24 +15,26 @@ #include #include -#include "vk_util.h" - -#include "drm-uapi/msm_drm.h" -#include "drm-uapi/virtgpu_drm.h" -#include "util/u_debug.h" #include "util/hash_table.h" #include "util/libsync.h" +#include "util/u_debug.h" #include "util/u_process.h" +#include "vk_util.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" #include "tu_dynamic_rendering.h" +#include "tu_knl.h" #include "tu_knl_drm.h" #include "tu_queue.h" +/* NOLINTBEGIN */ +/* clang-format off */ #include "vdrm.h" #include "msm_proto.h" +/* clang-format on */ +/* NOLINTEND */ struct tu_userspace_fence_cmd { uint32_t pkt[4]; /* first 4 dwords of packet */ diff --git a/src/freedreno/vulkan/tu_knl_kgsl.cc b/src/freedreno/vulkan/tu_knl_kgsl.cc index 594f736e674..c01160ea1f3 100644 --- a/src/freedreno/vulkan/tu_knl_kgsl.cc +++ b/src/freedreno/vulkan/tu_knl_kgsl.cc @@ -3,33 +3,31 @@ * SPDX-License-Identifier: MIT */ -#include "tu_knl.h" - #include #include +#include #include #include #include #include -#include #define __user -#include "msm_kgsl.h" #include "ion/ion.h" #include "ion/ion_4.19.h" +#include "msm_kgsl.h" -#include "vk_util.h" - +#include "util/libsync.h" #include "util/os_file.h" +#include "util/timespec.h" #include "util/u_debug.h" #include "util/u_vector.h" -#include "util/libsync.h" -#include "util/timespec.h" +#include "vk_util.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" #include "tu_dynamic_rendering.h" +#include "tu_knl.h" #include "tu_queue.h" #include "tu_rmv.h" diff --git a/src/freedreno/vulkan/tu_lrz.cc b/src/freedreno/vulkan/tu_lrz.cc index 929fe1dfea0..bf9c597fca7 100644 --- a/src/freedreno/vulkan/tu_lrz.cc +++ b/src/freedreno/vulkan/tu_lrz.cc @@ -5,14 +5,13 @@ #include "tu_lrz.h" +#include "common/freedreno_gpu_event.h" +#include "common/freedreno_lrz.h" #include "tu_clear_blit.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_image.h" -#include "common/freedreno_gpu_event.h" -#include "common/freedreno_lrz.h" - /* See lrz.rst for how HW works. Here are only the implementation notes. * * LRZ, Depth Test, and Stencil Test diff --git a/src/freedreno/vulkan/tu_nir_lower_demote_samples.cc b/src/freedreno/vulkan/tu_nir_lower_demote_samples.cc index 4f6e470aa9f..2005d04a8d3 100644 --- a/src/freedreno/vulkan/tu_nir_lower_demote_samples.cc +++ b/src/freedreno/vulkan/tu_nir_lower_demote_samples.cc @@ -3,9 +3,10 @@ * SPDX-License-Identifier: MIT */ -#include "tu_shader.h" #include "nir/nir_builder.h" +#include "tu_shader.h" + /* Lower demote_samples to a write to gl_SampleMask. Take into account * existing writes to gl_SampleMask. */ diff --git a/src/freedreno/vulkan/tu_nir_lower_multiview.cc b/src/freedreno/vulkan/tu_nir_lower_multiview.cc index 711c25e5242..11c998d1a4e 100644 --- a/src/freedreno/vulkan/tu_nir_lower_multiview.cc +++ b/src/freedreno/vulkan/tu_nir_lower_multiview.cc @@ -3,13 +3,11 @@ * SPDX-License-Identifier: MIT */ -#include "tu_shader.h" - #include "nir/nir_builder.h" -#include "tu_device.h" - #include "ir3/ir3_nir.h" +#include "tu_device.h" +#include "tu_shader.h" /* Some a6xx variants cannot support a non-contiguous multiview mask. Instead, * inside the shader something like this needs to be inserted: diff --git a/src/freedreno/vulkan/tu_nir_lower_ray_query.cc b/src/freedreno/vulkan/tu_nir_lower_ray_query.cc index 20ca9769c25..8c506fb8515 100644 --- a/src/freedreno/vulkan/tu_nir_lower_ray_query.cc +++ b/src/freedreno/vulkan/tu_nir_lower_ray_query.cc @@ -3,16 +3,14 @@ * SPDX-License-Identifier: MIT */ -#include "tu_shader.h" - -#include "bvh/tu_build_interface.h" - #include "compiler/spirv/spirv.h" - #include "nir/nir_builder.h" #include "nir/nir_control_flow.h" #include "nir/nir_deref.h" +#include "bvh/tu_build_interface.h" +#include "tu_shader.h" + enum rq_intersection_var_index { rq_intersection_primitive_id, rq_intersection_geometry_id, diff --git a/src/freedreno/vulkan/tu_pass.cc b/src/freedreno/vulkan/tu_pass.cc index a12173705c0..735707d8a1b 100644 --- a/src/freedreno/vulkan/tu_pass.cc +++ b/src/freedreno/vulkan/tu_pass.cc @@ -9,8 +9,8 @@ #include "tu_pass.h" -#include "vk_util.h" #include "vk_render_pass.h" +#include "vk_util.h" #include "tu_cmd_buffer.h" #include "tu_device.h" diff --git a/src/freedreno/vulkan/tu_perfetto.cc b/src/freedreno/vulkan/tu_perfetto.cc index 7383d70a7e8..3b78338b525 100644 --- a/src/freedreno/vulkan/tu_perfetto.cc +++ b/src/freedreno/vulkan/tu_perfetto.cc @@ -3,24 +3,24 @@ * SPDX-License-Identifier: MIT */ -#include - #include "tu_perfetto.h" -#include "tu_buffer.h" -#include "tu_device.h" -#include "tu_queue.h" -#include "tu_image.h" + +#include #include "util/hash_table.h" #include "util/perf/u_perfetto.h" #include "util/perf/u_perfetto_renderpass.h" - -#include "tu_cmd_buffer.h" -#include "tu_tracepoints.h" -#include "tu_tracepoints_perfetto.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" +#include "tu_tracepoints.h" +#include "tu_tracepoints_perfetto.h" + /* we can't include tu_knl.h and tu_device.h */ int diff --git a/src/freedreno/vulkan/tu_perfetto.h b/src/freedreno/vulkan/tu_perfetto.h index 1519a0dbf26..e8db3a5414c 100644 --- a/src/freedreno/vulkan/tu_perfetto.h +++ b/src/freedreno/vulkan/tu_perfetto.h @@ -10,8 +10,8 @@ /* we can't include tu_common.h because ir3 headers are not C++-compatible */ #include - #include + #include "c11/threads.h" #ifdef __cplusplus diff --git a/src/freedreno/vulkan/tu_pipeline.cc b/src/freedreno/vulkan/tu_pipeline.cc index bf303389676..633eb9e96ac 100644 --- a/src/freedreno/vulkan/tu_pipeline.cc +++ b/src/freedreno/vulkan/tu_pipeline.cc @@ -9,26 +9,25 @@ #include "tu_pipeline.h" -#include "common/freedreno_guardband.h" - -#include "ir3/ir3_nir.h" #include "nir/nir.h" #include "nir/nir_builder.h" #include "nir/nir_serialize.h" #include "spirv/nir_spirv.h" -#include "util/u_debug.h" #include "util/mesa-blake3.h" #include "util/shader_stats.h" +#include "util/u_debug.h" #include "vk_nir.h" #include "vk_pipeline.h" #include "vk_render_pass.h" #include "vk_util.h" +#include "common/freedreno_guardband.h" +#include "ir3/ir3_nir.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" -#include "tu_knl.h" #include "tu_formats.h" +#include "tu_knl.h" #include "tu_lrz.h" #include "tu_pass.h" #include "tu_rmv.h" diff --git a/src/freedreno/vulkan/tu_query_pool.cc b/src/freedreno/vulkan/tu_query_pool.cc index d580a8945cb..09ae7656dbd 100644 --- a/src/freedreno/vulkan/tu_query_pool.cc +++ b/src/freedreno/vulkan/tu_query_pool.cc @@ -12,19 +12,17 @@ #include "nir/nir_builder.h" #include "util/os_time.h" - #include "vk_acceleration_structure.h" #include "vk_util.h" -#include "tu_buffer.h" #include "bvh/tu_build_interface.h" +#include "common/freedreno_gpu_event.h" +#include "tu_buffer.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" #include "tu_rmv.h" -#include "common/freedreno_gpu_event.h" - #define NSEC_PER_SEC 1000000000ull #define WAIT_TIMEOUT 5 #define __COUNTER_REG(CHIP, name) __RBBM_PIPESTAT_ ## name ({}).reg diff --git a/src/freedreno/vulkan/tu_queue.cc b/src/freedreno/vulkan/tu_queue.cc index 560518d0022..fe81a5d8581 100644 --- a/src/freedreno/vulkan/tu_queue.cc +++ b/src/freedreno/vulkan/tu_queue.cc @@ -9,14 +9,14 @@ #include "tu_queue.h" +#include "vk_util.h" + #include "tu_buffer.h" #include "tu_cmd_buffer.h" +#include "tu_device.h" #include "tu_dynamic_rendering.h" #include "tu_image.h" #include "tu_knl.h" -#include "tu_device.h" - -#include "vk_util.h" static int tu_get_submitqueue_priority(const struct tu_physical_device *pdevice, diff --git a/src/freedreno/vulkan/tu_rmv.cc b/src/freedreno/vulkan/tu_rmv.cc index 720b65933b2..27bce5642df 100644 --- a/src/freedreno/vulkan/tu_rmv.cc +++ b/src/freedreno/vulkan/tu_rmv.cc @@ -5,16 +5,16 @@ #include "tu_rmv.h" +#include + #include "tu_buffer.h" #include "tu_cmd_buffer.h" #include "tu_cs.h" #include "tu_device.h" #include "tu_event.h" #include "tu_image.h" -#include "tu_queue.h" #include "tu_query_pool.h" - -#include +#include "tu_queue.h" static VkResult capture_trace(VkQueue _queue) diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index 17b4359055a..a3bdf7d1b3e 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -5,9 +5,11 @@ #include "tu_shader.h" +#include + +#include "nir/nir_xfb_info.h" #include "spirv/nir_spirv.h" #include "util/mesa-blake3.h" -#include "nir/nir_xfb_info.h" #include "vk_nir.h" #include "vk_nir_convert_ycbcr.h" #include "vk_pipeline.h" @@ -15,16 +17,13 @@ #include "ir3/ir3_compiler.h" #include "ir3/ir3_nir.h" - -#include "tu_device.h" #include "tu_descriptor_set.h" +#include "tu_device.h" #include "tu_lrz.h" #include "tu_pipeline.h" #include "tu_rmv.h" #include "tu_subsampled_image.h" -#include - static void init_ir3_nir_options(struct ir3_shader_nir_options *options, const struct tu_shader_key *key) diff --git a/src/freedreno/vulkan/tu_shader.h b/src/freedreno/vulkan/tu_shader.h index d67785ead49..cedb50fb162 100644 --- a/src/freedreno/vulkan/tu_shader.h +++ b/src/freedreno/vulkan/tu_shader.h @@ -11,9 +11,10 @@ #define TU_SHADER_H #include "tu_common.h" + #include "tu_cs.h" -#include "tu_suballoc.h" #include "tu_descriptor_set.h" +#include "tu_suballoc.h" struct tu_inline_ubo { diff --git a/src/freedreno/vulkan/tu_subsampled_image.cc b/src/freedreno/vulkan/tu_subsampled_image.cc index 7468148f703..2f361f82f55 100644 --- a/src/freedreno/vulkan/tu_subsampled_image.cc +++ b/src/freedreno/vulkan/tu_subsampled_image.cc @@ -3,11 +3,12 @@ * SPDX-License-Identifier: MIT */ -#include "tu_cmd_buffer.h" #include "tu_subsampled_image.h" #include "nir/nir_builder.h" +#include "tu_cmd_buffer.h" + /* If a tile is not subsampled, we treat it as if its fragment area is (1,1) * for the purposes of subsampling. */ diff --git a/src/freedreno/vulkan/tu_subsampled_image.h b/src/freedreno/vulkan/tu_subsampled_image.h index bbe86759f5b..877b57983f8 100644 --- a/src/freedreno/vulkan/tu_subsampled_image.h +++ b/src/freedreno/vulkan/tu_subsampled_image.h @@ -3,10 +3,10 @@ * SPDX-License-Identifier: MIT */ -#include - #include "tu_common.h" +#include + /* Describe the format used for subsampled image metadata. This is attached to * subsampled images, via a separate UBO descriptor after the image * descriptor. It is written after the render pass which writes to the image, diff --git a/src/freedreno/vulkan/tu_tile_config.cc b/src/freedreno/vulkan/tu_tile_config.cc index 440e82b1872..3000deec1fd 100644 --- a/src/freedreno/vulkan/tu_tile_config.cc +++ b/src/freedreno/vulkan/tu_tile_config.cc @@ -8,12 +8,13 @@ * Copyright © 2015 Intel Corporation */ -#include "tu_cmd_buffer.h" #include "tu_tile_config.h" -#include "tu_subsampled_image.h" #include "util/u_worklist.h" +#include "tu_cmd_buffer.h" +#include "tu_subsampled_image.h" + static void tu_calc_frag_area(struct tu_cmd_buffer *cmd, struct tu_tile_config *tile, diff --git a/src/freedreno/vulkan/tu_tracepoints.py b/src/freedreno/vulkan/tu_tracepoints.py index 9c656aa21aa..97189f66466 100644 --- a/src/freedreno/vulkan/tu_tracepoints.py +++ b/src/freedreno/vulkan/tu_tracepoints.py @@ -24,12 +24,12 @@ from u_trace import TracepointArgStruct as ArgStruct from u_trace import utrace_generate from u_trace import utrace_generate_perfetto_utils -Header('vk_enum_to_str.h', scope=HeaderScope.SOURCE|HeaderScope.PERFETTO) -Header('vk_format.h') -Header('util/mesa-blake3.h') +Header('common/freedreno_lrz.h') Header('tu_cmd_buffer.h', scope=HeaderScope.SOURCE) Header('tu_device.h', scope=HeaderScope.SOURCE) -Header('common/freedreno_lrz.h') +Header('util/mesa-blake3.h') +Header('vk_enum_to_str.h', scope=HeaderScope.SOURCE|HeaderScope.PERFETTO) +Header('vk_format.h') Header('vulkan/vulkan_core.h', scope=HeaderScope.SOURCE|HeaderScope.PERFETTO) # we can't use tu_common.h because it includes ir3 headers which are not diff --git a/src/freedreno/vulkan/tu_util.cc b/src/freedreno/vulkan/tu_util.cc index ffd2975659b..f0c19c3465d 100644 --- a/src/freedreno/vulkan/tu_util.cc +++ b/src/freedreno/vulkan/tu_util.cc @@ -8,13 +8,13 @@ #include #include -#include "common/freedreno_rd_output.h" -#include "util/u_math.h" -#include "util/timespec.h" -#include "util/os_file_notify.h" #include "util/os_file.h" +#include "util/os_file_notify.h" +#include "util/timespec.h" +#include "util/u_math.h" #include "vk_enum_to_str.h" +#include "common/freedreno_rd_output.h" #include "tu_device.h" #include "tu_pass.h" diff --git a/src/freedreno/vulkan/tu_util.h b/src/freedreno/vulkan/tu_util.h index b1ed4354e39..cfa18f34978 100644 --- a/src/freedreno/vulkan/tu_util.h +++ b/src/freedreno/vulkan/tu_util.h @@ -9,16 +9,15 @@ #ifndef TU_UTIL_H #define TU_UTIL_H -#include - #include "tu_common.h" -#include "util/macros.h" -#include "util/u_math.h" +#include + +#include "compiler/shader_enums.h" #include "util/format/u_format_pack.h" #include "util/format/u_format_zs.h" -#include "compiler/shader_enums.h" - +#include "util/macros.h" +#include "util/u_math.h" #include "vk_util.h" /* diff --git a/src/freedreno/vulkan/tu_wsi.cc b/src/freedreno/vulkan/tu_wsi.cc index 57cf9048b07..12b694b4aae 100644 --- a/src/freedreno/vulkan/tu_wsi.cc +++ b/src/freedreno/vulkan/tu_wsi.cc @@ -8,9 +8,10 @@ #include "tu_wsi.h" +#include "drm-uapi/drm_fourcc.h" + #include "vk_util.h" #include "wsi_common_drm.h" -#include "drm-uapi/drm_fourcc.h" #include "tu_device.h"