radeonsi: clean up #includes
authorMarek Olšák <marek.olsak@amd.com>
Fri, 16 Jun 2023 06:16:00 +0000 (02:16 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 22 Jun 2023 08:35:55 +0000 (08:35 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

15 files changed:
src/amd/common/ac_gpu_info.h
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_compute_blit.c
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_pm4.c
src/gallium/drivers/radeonsi/si_pm4.h
src/gallium/drivers/radeonsi/si_public.h
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_shader_info.c
src/gallium/drivers/radeonsi/si_shader_internal.h
src/gallium/drivers/radeonsi/si_state.h
src/gallium/drivers/radeonsi/si_state_draw.cpp
src/gallium/drivers/radeonsi/si_state_shaders.cpp

index 5b4edb2..f07a529 100644 (file)
@@ -7,14 +7,9 @@
 #ifndef AC_GPU_INFO_H
 #define AC_GPU_INFO_H
 
-#include "amd_family.h"
-
 #include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-
 #include "util/macros.h"
+#include "amd_family.h"
 
 #ifdef __cplusplus
 extern "C" {
index 19ebae8..11de9a8 100644 (file)
@@ -10,6 +10,7 @@
 #include "util/format/u_format.h"
 #include "util/u_log.h"
 #include "util/u_surface.h"
+#include "util/hash_table.h"
 
 enum
 {
index c661d93..fdc9825 100644 (file)
@@ -8,6 +8,7 @@
 #include "util/format/u_format.h"
 #include "util/format_srgb.h"
 #include "util/u_helpers.h"
+#include "util/hash_table.h"
 
 static bool si_can_use_compute_blit(struct si_context *sctx, enum pipe_format format,
                                     unsigned num_samples, bool is_store, bool has_dcc)
index cfd0c0d..a0dfc68 100644 (file)
@@ -9,6 +9,7 @@
 #include "radeon_vce.h"
 #include "radeon_video.h"
 #include "si_pipe.h"
+#include "ac_llvm_util.h"
 #include "util/u_cpu_detect.h"
 #include "util/u_screen.h"
 #include "util/u_video.h"
index 1ee3f8a..807db22 100644 (file)
@@ -9,7 +9,8 @@
 
 #include "si_shader.h"
 #include "si_state.h"
-#include "util/u_dynarray.h"
+#include "winsys/radeon_winsys.h"
+#include "util/u_blitter.h"
 #include "util/u_idalloc.h"
 #include "util/u_suballoc.h"
 #include "util/u_threaded_context.h"
@@ -21,6 +22,9 @@
 extern "C" {
 #endif
 
+struct si_compute;
+struct ac_llvm_compiler;
+
 #define ATI_VENDOR_ID         0x1002
 #define SI_NOT_QUERY          0xffffffff
 
@@ -301,10 +305,6 @@ enum si_coherency
 #define SI_BIND_VERTEX_BUFFER             (1 << (SI_BIND_OTHER_BUFFER_SHIFT + 0))
 #define SI_BIND_STREAMOUT_BUFFER          (1 << (SI_BIND_OTHER_BUFFER_SHIFT + 1))
 
-struct si_compute;
-struct si_shader_context;
-struct hash_table;
-
 /* Only 32-bit buffer allocations are supported, gallium doesn't support more
  * at the moment.
  */
@@ -1363,7 +1363,7 @@ bool si_msaa_resolve_blit_via_CB(struct pipe_context *ctx, const struct pipe_bli
 void si_gfx_blit(struct pipe_context *ctx, const struct pipe_blit_info *info);
 
 /* si_nir_optim.c */
-bool si_nir_is_output_const_if_tex_is_const(nir_shader *shader, float *in, float *out, int *texunit);
+bool si_nir_is_output_const_if_tex_is_const(struct nir_shader *shader, float *in, float *out, int *texunit);
 
 /* si_buffer.c */
 bool si_cs_is_buffer_referenced(struct si_context *sctx, struct pb_buffer *buf,
index effcf03..a952dd1 100644 (file)
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: MIT
  */
 
+#include "si_pm4.h"
 #include "si_pipe.h"
 #include "si_build_pm4.h"
 #include "sid.h"
index 482f5f2..f9ea971 100644 (file)
@@ -7,7 +7,8 @@
 #ifndef SI_PM4_H
 #define SI_PM4_H
 
-#include "winsys/radeon_winsys.h"
+#include <stdint.h>
+#include <stdbool.h>
 
 #ifdef __cplusplus
 extern "C" {
index ee9aea6..b56e5de 100644 (file)
@@ -7,6 +7,9 @@
 #ifndef SI_PUBLIC_H
 #define SI_PUBLIC_H
 
+struct pipe_screen;
+struct pipe_screen_config;
+
 struct pipe_screen *radeonsi_screen_create(int fd, const struct pipe_screen_config *config);
 
 #endif
index e6d234e..23146b0 100644 (file)
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: MIT
  */
 
+#include "si_shader.h"
 #include "ac_nir.h"
 #include "ac_rtld.h"
 #include "nir.h"
index 6235f9f..e0aa5e7 100644 (file)
 #ifndef SI_SHADER_H
 #define SI_SHADER_H
 
+#include "shader_info.h"
 #include "ac_binary.h"
-#include "ac_llvm_build.h"
-#include "ac_llvm_util.h"
-#include "util/simple_mtx.h"
-#include "util/u_inlines.h"
+#include "ac_gpu_info.h"
 #include "util/u_live_shader_cache.h"
 #include "util/u_queue.h"
 #include "si_pm4.h"
 
-#include <stdio.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 struct nir_shader;
-struct si_shader;
-struct si_context;
+struct nir_instr;
+struct nir_lower_subgroups_options;
 
 #define SI_MAX_ATTRIBS    16
 #define SI_MAX_VS_OUTPUTS 40
@@ -1003,7 +999,7 @@ struct si_shader_part {
 /* si_shader.c */
 struct ac_rtld_binary;
 
-void si_update_shader_binary_info(struct si_shader *shader, nir_shader *nir);
+void si_update_shader_binary_info(struct si_shader *shader, struct nir_shader *nir);
 bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compiler,
                        struct si_shader *shader, struct util_debug_callback *debug);
 bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler *compiler,
@@ -1034,11 +1030,11 @@ void si_nir_scan_shader(struct si_screen *sscreen,  const struct nir_shader *nir
                         struct si_shader_info *info);
 
 /* si_shader_nir.c */
-extern const nir_lower_subgroups_options si_nir_subgroups_options;
+extern const struct nir_lower_subgroups_options si_nir_subgroups_options;
 
-bool si_alu_to_scalar_packed_math_filter(const nir_instr *instr, const void *data);
+bool si_alu_to_scalar_packed_math_filter(const struct nir_instr *instr, const void *data);
 void si_nir_opts(struct si_screen *sscreen, struct nir_shader *nir, bool first);
-void si_nir_late_opts(nir_shader *nir);
+void si_nir_late_opts(struct nir_shader *nir);
 char *si_finalize_nir(struct pipe_screen *screen, void *nirptr);
 
 /* si_state_shaders.cpp */
index 9ce89b5..ca133d4 100644 (file)
@@ -8,6 +8,7 @@
 #include "util/mesa-sha1.h"
 #include "util/u_prim.h"
 #include "sid.h"
+#include "nir.h"
 
 
 struct si_shader_profile {
index 44067da..e404f46 100644 (file)
@@ -8,6 +8,7 @@
 #define SI_SHADER_PRIVATE_H
 
 #include "ac_shader_abi.h"
+#include "ac_llvm_build.h"
 #include "si_shader.h"
 
 struct util_debug_callback;
index 0abc887..9896f75 100644 (file)
@@ -7,9 +7,8 @@
 #ifndef SI_STATE_H
 #define SI_STATE_H
 
-#include "pipebuffer/pb_slab.h"
 #include "si_pm4.h"
-#include "util/u_blitter.h"
+#include "util/format/u_format.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -31,6 +30,8 @@ struct si_shader_ctx_state;
 struct si_shader_selector;
 struct si_texture;
 struct si_qbo_state;
+struct legacy_surf_level;
+struct pb_slab_entry;
 
 struct si_state_blend {
    struct si_pm4_state pm4;
index d388182..03d66e3 100644 (file)
@@ -4,15 +4,16 @@
  * SPDX-License-Identifier: MIT
  */
 
-#include "ac_nir.h"
-#include "ac_sqtt.h"
 #include "si_build_pm4.h"
+
+#include "util/hash_table.h"
+#define XXH_INLINE_ALL
+#include "util/xxhash.h"
 #include "util/u_cpu_detect.h"
 #include "util/u_index_modify.h"
 #include "util/u_prim.h"
 #include "util/u_upload_mgr.h"
 #include "ac_rtld.h"
-#include "si_build_pm4.h"
 
 #if (GFX_VER == 6)
 #define GFX(name) name##GFX6
index ca85f53..c4ea4e6 100644 (file)
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: MIT
  */
 
+#include "ac_llvm_util.h"
 #include "ac_nir.h"
 #include "ac_shader_util.h"
 #include "compiler/nir/nir_serialize.h"