radeonsi: remove si_compute.h, move the contents into si_pipe.h
authorMarek Olšák <marek.olsak@amd.com>
Sun, 16 Jul 2023 05:51:49 +0000 (01:51 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 17 Aug 2023 15:34:06 +0000 (15:34 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

src/gallium/drivers/radeonsi/meson.build
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_compute.c
src/gallium/drivers/radeonsi/si_compute.h [deleted file]
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_sqtt.c

index 1d80ee3..13aa594 100644 (file)
@@ -27,7 +27,6 @@ files_libradeonsi = files(
   'si_build_pm4.h',
   'si_clear.c',
   'si_compute.c',
-  'si_compute.h',
   'si_compute_blit.c',
   'si_cp_dma.c',
   'si_cp_reg_shadowing.c',
index 8582444..1219542 100644 (file)
@@ -5,7 +5,6 @@
  * SPDX-License-Identifier: MIT
  */
 
-#include "si_compute.h"
 #include "si_pipe.h"
 #include "util/format/u_format.h"
 #include "util/u_log.h"
index 2fb084c..203b135 100644 (file)
@@ -4,8 +4,6 @@
  * SPDX-License-Identifier: MIT
  */
 
-#include "si_compute.h"
-
 #include "ac_rtld.h"
 #include "amd_kernel_code_t.h"
 #include "nir/tgsi_to_nir.h"
diff --git a/src/gallium/drivers/radeonsi/si_compute.h b/src/gallium/drivers/radeonsi/si_compute.h
deleted file mode 100644 (file)
index af867a0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef SI_COMPUTE_H
-#define SI_COMPUTE_H
-
-#include "si_shader.h"
-#include "util/u_inlines.h"
-
-struct si_compute {
-   struct si_shader_selector sel;
-   struct si_shader shader;
-
-   unsigned ir_type;
-   unsigned input_size;
-
-   int max_global_buffers;
-   struct pipe_resource **global_buffers;
-};
-
-void si_destroy_compute(struct si_compute *program);
-
-static inline void si_compute_reference(struct si_compute **dst, struct si_compute *src)
-{
-   if (pipe_reference(&(*dst)->sel.base.reference, &src->sel.base.reference))
-      si_destroy_compute(*dst);
-
-   *dst = src;
-}
-
-#endif /* SI_COMPUTE_H */
index e12a9ca..e6d071a 100644 (file)
@@ -7,7 +7,6 @@
 #include "ac_debug.h"
 #include "ac_rtld.h"
 #include "driver_ddebug/dd_util.h"
-#include "si_compute.h"
 #include "si_pipe.h"
 #include "sid.h"
 #include "sid_tables.h"
index c770162..6861538 100644 (file)
@@ -36,7 +36,6 @@
  */
 
 #include "si_pipe.h"
-#include "si_compute.h"
 #include "si_build_pm4.h"
 #include "sid.h"
 #include "util/format/u_format.h"
index 4165f3b..870998f 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "driver_ddebug/dd_util.h"
 #include "radeon_uvd.h"
-#include "si_compute.h"
 #include "si_public.h"
 #include "si_shader_internal.h"
 #include "sid.h"
index 54b0503..27865dd 100644 (file)
@@ -22,7 +22,6 @@
 extern "C" {
 #endif
 
-struct si_compute;
 struct ac_llvm_compiler;
 
 #define ATI_VENDOR_ID         0x1002
@@ -691,6 +690,17 @@ struct si_screen {
    struct pb_buffer *gds_oa;
 };
 
+struct si_compute {
+   struct si_shader_selector sel;
+   struct si_shader shader;
+
+   unsigned ir_type;
+   unsigned input_size;
+
+   int max_global_buffers;
+   struct pipe_resource **global_buffers;
+};
+
 struct si_sampler_view {
    struct pipe_sampler_view base;
    /* [0..7] = image descriptor
@@ -1408,6 +1418,9 @@ void si_execute_clears(struct si_context *sctx, struct si_clear_info *info,
                        unsigned num_clears, unsigned types);
 void si_init_clear_functions(struct si_context *sctx);
 
+/* si_compute.c */
+void si_destroy_compute(struct si_compute *program);
+
 /* si_compute_blit.c */
 #define SI_OP_SYNC_CS_BEFORE              (1 << 0)
 #define SI_OP_SYNC_PS_BEFORE              (1 << 1)
@@ -1689,6 +1702,14 @@ void si_handle_sqtt(struct si_context *sctx, struct radeon_cmdbuf *rcs);
  * common helpers
  */
 
+static inline void si_compute_reference(struct si_compute **dst, struct si_compute *src)
+{
+   if (pipe_reference(&(*dst)->sel.base.reference, &src->sel.base.reference))
+      si_destroy_compute(*dst);
+
+   *dst = src;
+}
+
 static inline struct si_resource *si_resource(struct pipe_resource *r)
 {
    return (struct si_resource *)r;
index 47ee752..04c5955 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "si_pipe.h"
 #include "si_build_pm4.h"
-#include "si_compute.h"
 
 #include "ac_rgp.h"
 #include "ac_sqtt.h"