diff --git a/src/freedreno/vulkan/.clang-format b/src/freedreno/vulkan/.clang-format index b14b5dca727..4b63a08d7ad 100644 --- a/src/freedreno/vulkan/.clang-format +++ b/src/freedreno/vulkan/.clang-format @@ -14,7 +14,7 @@ ContinuationIndentWidth: 3 Cpp11BracedListStyle: false IncludeBlocks: Regroup IncludeCategories: - - Regex: '^"tu_private.h"$' + - Regex: '^"tu_common.h"$' Priority: 0 - Regex: '^"(drm/|ir3/|tu_)' Priority: 4 diff --git a/src/freedreno/vulkan/tu_android.c b/src/freedreno/vulkan/tu_android.c index eb80c2fd040..47237572432 100644 --- a/src/freedreno/vulkan/tu_android.c +++ b/src/freedreno/vulkan/tu_android.c @@ -22,7 +22,6 @@ */ #include "tu_android.h" -#include "tu_private.h" #include @@ -38,6 +37,9 @@ #include "util/libsync.h" #include "util/os_file.h" +#include "tu_device.h" +#include "tu_image.h" + static int tu_hal_open(const struct hw_module_t *mod, const char *id, diff --git a/src/freedreno/vulkan/tu_autotune.c b/src/freedreno/vulkan/tu_autotune.c index a18477d5394..1007231fb26 100644 --- a/src/freedreno/vulkan/tu_autotune.c +++ b/src/freedreno/vulkan/tu_autotune.c @@ -22,8 +22,12 @@ */ #include "tu_autotune.h" -#include "tu_private.h" + +#include "tu_cmd_buffer.h" #include "tu_cs.h" +#include "tu_device.h" +#include "tu_image.h" +#include "tu_pass.h" /* How does it work? * diff --git a/src/freedreno/vulkan/tu_clear_blit.c b/src/freedreno/vulkan/tu_clear_blit.c index 1b3d409f25c..f2ec84a5875 100644 --- a/src/freedreno/vulkan/tu_clear_blit.c +++ b/src/freedreno/vulkan/tu_clear_blit.c @@ -7,9 +7,6 @@ */ #include "tu_clear_blit.h" -#include "tu_private.h" - -#include "tu_cs.h" #include "ir3/ir3_nir.h" @@ -19,6 +16,10 @@ #include "util/half_float.h" #include "compiler/nir/nir_builder.h" +#include "tu_cmd_buffer.h" +#include "tu_cs.h" +#include "tu_formats.h" +#include "tu_image.h" #include "tu_tracepoints.h" static uint32_t diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 55cc2b4f255..404f8a7e7e1 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -26,13 +26,13 @@ */ #include "tu_cmd_buffer.h" -#include "tu_private.h" #include "vk_render_pass.h" #include "vk_util.h" +#include "tu_clear_blit.h" #include "tu_cs.h" - +#include "tu_image.h" #include "tu_tracepoints.h" void diff --git a/src/freedreno/vulkan/tu_cs_breadcrumbs.c b/src/freedreno/vulkan/tu_cs_breadcrumbs.c index 390904d16a2..7b4266019b8 100644 --- a/src/freedreno/vulkan/tu_cs_breadcrumbs.c +++ b/src/freedreno/vulkan/tu_cs_breadcrumbs.c @@ -22,12 +22,13 @@ */ #include "tu_cs.h" -#include "tu_private.h" #include #include #include +#include "tu_device.h" + /* A simple implementations of breadcrumbs tracking of GPU progress * intended to be a last resort when debugging unrecoverable hangs. * For best results use Vulkan traces to have a predictable place of hang. diff --git a/src/freedreno/vulkan/tu_descriptor_set.c b/src/freedreno/vulkan/tu_descriptor_set.c index 7d2b6504f24..b400980f0a9 100644 --- a/src/freedreno/vulkan/tu_descriptor_set.c +++ b/src/freedreno/vulkan/tu_descriptor_set.c @@ -36,7 +36,6 @@ */ #include "tu_descriptor_set.h" -#include "tu_private.h" #include @@ -44,6 +43,9 @@ #include "vk_descriptors.h" #include "vk_util.h" +#include "tu_device.h" +#include "tu_image.h" + static inline uint8_t * pool_base(struct tu_descriptor_pool *pool) { diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 1764fa6091f..27bbbd5590a 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -26,15 +26,12 @@ */ #include "tu_device.h" -#include "tu_private.h" -#include "tu_cs.h" -#include "tu_tracepoints.h" -#include "git_sha1.h" #include #include #include +#include "git_sha1.h" #include "util/debug.h" #include "util/disk_cache.h" #include "util/driconf.h" @@ -45,6 +42,17 @@ /* for fd_get_driver/device_uuid() */ #include "freedreno/common/freedreno_uuid.h" +#include "tu_clear_blit.h" +#include "tu_cmd_buffer.h" +#include "tu_cs.h" +#include "tu_descriptor_set.h" +#include "tu_dynamic_rendering.h" +#include "tu_image.h" +#include "tu_pass.h" +#include "tu_query.h" +#include "tu_tracepoints.h" +#include "tu_wsi.h" + #if defined(VK_USE_PLATFORM_WAYLAND_KHR) || \ defined(VK_USE_PLATFORM_XCB_KHR) || \ defined(VK_USE_PLATFORM_XLIB_KHR) || \ diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index b67896eabd6..21ed84390d7 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -44,9 +44,10 @@ #include "util/timespec.h" #include "util/os_time.h" -#include "tu_private.h" - +#include "tu_cmd_buffer.h" #include "tu_cs.h" +#include "tu_device.h" +#include "tu_dynamic_rendering.h" struct tu_queue_submit { diff --git a/src/freedreno/vulkan/tu_dynamic_rendering.c b/src/freedreno/vulkan/tu_dynamic_rendering.c index b7a05b3ac2c..cdeb5d0c76a 100644 --- a/src/freedreno/vulkan/tu_dynamic_rendering.c +++ b/src/freedreno/vulkan/tu_dynamic_rendering.c @@ -37,7 +37,8 @@ */ #include "tu_dynamic_rendering.h" -#include "tu_private.h" + +#include "tu_cmd_buffer.h" #include "tu_cs.h" struct dynamic_rendering_entry { diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c index d9caa0ef951..fa279fd377f 100644 --- a/src/freedreno/vulkan/tu_formats.c +++ b/src/freedreno/vulkan/tu_formats.c @@ -1,4 +1,3 @@ - /* * Copyright © 2016 Red Hat. * Copyright © 2016 Bas Nieuwenhuizen @@ -24,13 +23,15 @@ */ #include "tu_formats.h" -#include "tu_private.h" #include "fdl/fd6_format_table.h" #include "vk_util.h" #include "drm-uapi/drm_fourcc.h" +#include "tu_device.h" +#include "tu_image.h" + struct tu_native_format tu6_format_vtx(VkFormat vk_format) { diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index cb4db22c2f5..37a723cdc24 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -26,7 +26,6 @@ */ #include "tu_image.h" -#include "tu_private.h" #include "fdl/fd6_format_table.h" @@ -35,7 +34,11 @@ #include "vk_util.h" #include "drm-uapi/drm_fourcc.h" +#include "tu_android.h" #include "tu_cs.h" +#include "tu_descriptor_set.h" +#include "tu_device.h" +#include "tu_formats.h" uint32_t tu6_plane_count(VkFormat format) diff --git a/src/freedreno/vulkan/tu_kgsl.c b/src/freedreno/vulkan/tu_kgsl.c index 925b4fc801a..a7f96e08795 100644 --- a/src/freedreno/vulkan/tu_kgsl.c +++ b/src/freedreno/vulkan/tu_kgsl.c @@ -22,7 +22,6 @@ */ #include "tu_drm.h" -#include "tu_private.h" #include #include @@ -34,6 +33,11 @@ #include "util/debug.h" +#include "tu_cmd_buffer.h" +#include "tu_cs.h" +#include "tu_device.h" +#include "tu_dynamic_rendering.h" + struct tu_syncobj { struct vk_object_base base; uint32_t timestamp; diff --git a/src/freedreno/vulkan/tu_lrz.c b/src/freedreno/vulkan/tu_lrz.c index e80534f41a0..25a209f32b2 100644 --- a/src/freedreno/vulkan/tu_lrz.c +++ b/src/freedreno/vulkan/tu_lrz.c @@ -22,9 +22,11 @@ */ #include "tu_lrz.h" -#include "tu_private.h" +#include "tu_clear_blit.h" +#include "tu_cmd_buffer.h" #include "tu_cs.h" +#include "tu_image.h" /* Low-resolution Z buffer is very similar to a depth prepass that helps * the HW avoid executing the fragment shader on those fragments that will diff --git a/src/freedreno/vulkan/tu_nir_lower_multiview.c b/src/freedreno/vulkan/tu_nir_lower_multiview.c index 524a69fe448..50148caecaf 100644 --- a/src/freedreno/vulkan/tu_nir_lower_multiview.c +++ b/src/freedreno/vulkan/tu_nir_lower_multiview.c @@ -4,9 +4,11 @@ */ #include "tu_shader.h" -#include "tu_private.h" + #include "nir_builder.h" +#include "tu_device.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_pass.c b/src/freedreno/vulkan/tu_pass.c index 9cfd22f8459..f309a43be92 100644 --- a/src/freedreno/vulkan/tu_pass.c +++ b/src/freedreno/vulkan/tu_pass.c @@ -26,10 +26,13 @@ */ #include "tu_pass.h" -#include "tu_private.h" #include "vk_util.h" +#include "tu_cmd_buffer.h" +#include "tu_device.h" +#include "tu_image.h" + /* Return true if we have to fallback to sysmem rendering because the * dependency can't be satisfied with tiled rendering. */ diff --git a/src/freedreno/vulkan/tu_perfetto_util.c b/src/freedreno/vulkan/tu_perfetto_util.c index 5620dc6ef78..a2830e09843 100644 --- a/src/freedreno/vulkan/tu_perfetto_util.c +++ b/src/freedreno/vulkan/tu_perfetto_util.c @@ -21,10 +21,10 @@ * SOFTWARE. */ -#include "tu_private.h" +#include "tu_device.h" #include "tu_perfetto.h" -/* Including tu_private.h in tu_perfetto.cc doesn't work, so +/* Including tu_device.h in tu_perfetto.cc doesn't work, so * we need some helper methods to access tu_device. */ diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 263efbf89c4..b94892132b6 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -28,7 +28,6 @@ #include "tu_pipeline.h" #include "common/freedreno_guardband.h" -#include "tu_private.h" #include "ir3/ir3_nir.h" #include "main/menums.h" @@ -41,7 +40,12 @@ #include "vk_render_pass.h" #include "vk_util.h" +#include "tu_cmd_buffer.h" #include "tu_cs.h" +#include "tu_device.h" +#include "tu_formats.h" +#include "tu_lrz.h" +#include "tu_pass.h" /* Emit IB that preloads the descriptors that the shader uses */ diff --git a/src/freedreno/vulkan/tu_query.c b/src/freedreno/vulkan/tu_query.c index adfba1bbcb5..dd140f57182 100644 --- a/src/freedreno/vulkan/tu_query.c +++ b/src/freedreno/vulkan/tu_query.c @@ -24,16 +24,18 @@ */ #include "tu_query.h" -#include "tu_private.h" #include #include "nir/nir_builder.h" #include "util/os_time.h" -#include "tu_cs.h" #include "vk_util.h" +#include "tu_cmd_buffer.h" +#include "tu_cs.h" +#include "tu_device.h" + #define NSEC_PER_SEC 1000000000ull #define WAIT_TIMEOUT 5 #define STAT_COUNT ((REG_A6XX_RBBM_PRIMCTR_10_LO - REG_A6XX_RBBM_PRIMCTR_0_LO) / 2 + 1) diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 1e870055753..61dd53f0b1a 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -22,7 +22,6 @@ */ #include "tu_shader.h" -#include "tu_private.h" #include "spirv/nir_spirv.h" #include "util/mesa-sha1.h" @@ -32,6 +31,10 @@ #include "ir3/ir3_nir.h" +#include "tu_device.h" +#include "tu_descriptor_set.h" +#include "tu_pipeline.h" + nir_shader * tu_spirv_to_nir(struct tu_device *dev, void *mem_ctx, diff --git a/src/freedreno/vulkan/tu_tracepoints.py b/src/freedreno/vulkan/tu_tracepoints.py index 9b3049285f6..83e3d4fa957 100644 --- a/src/freedreno/vulkan/tu_tracepoints.py +++ b/src/freedreno/vulkan/tu_tracepoints.py @@ -54,7 +54,7 @@ tu_default_tps = [] Header('util/u_dump.h') Header('vk_format.h') -Header('freedreno/vulkan/tu_private.h', scope=HeaderScope.SOURCE) +Header('freedreno/vulkan/tu_device.h', scope=HeaderScope.SOURCE) ForwardDecl('struct tu_device') diff --git a/src/freedreno/vulkan/tu_util.c b/src/freedreno/vulkan/tu_util.c index c42175ac104..d1f7e9a4a83 100644 --- a/src/freedreno/vulkan/tu_util.c +++ b/src/freedreno/vulkan/tu_util.c @@ -22,7 +22,6 @@ */ #include "tu_util.h" -#include "tu_private.h" #include #include @@ -31,6 +30,9 @@ #include "util/timespec.h" #include "vk_enum_to_str.h" +#include "tu_device.h" +#include "tu_pass.h" + void PRINTFLIKE(3, 4) __tu_finishme(const char *file, int line, const char *format, ...) { diff --git a/src/freedreno/vulkan/tu_wsi.c b/src/freedreno/vulkan/tu_wsi.c index 81560d07b6f..7ded72e79d1 100644 --- a/src/freedreno/vulkan/tu_wsi.c +++ b/src/freedreno/vulkan/tu_wsi.c @@ -24,12 +24,13 @@ */ #include "tu_wsi.h" -#include "tu_private.h" #include "vk_util.h" #include "wsi_common_drm.h" #include "drm-uapi/drm_fourcc.h" +#include "tu_device.h" + static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL tu_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName) {