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 1d80ee3185d6279c5eeaabf06303f0cc7e1d73a7..13aa594df05dc737272a97fc582707bb46a7ba2e 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 8582444187267fe810ca83d16bda5be0acdbf759..1219542f340ba773e1bc21a6439ea609ce152db1 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 2fb084c8f3712f70ef7a6d537488512f478ac692..203b1351cf437af6c3c3922cf2fe45aaf60ce5e0 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 e12a9cadf3b7734e822c35f5f7fe5972ded96b59..e6d071a5061a4b7686d52c7f818d089097f81788 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 c770162bfe8b7c236744b04aae088d3fc39bc391..68615386717d64071264d0589271b53ca2e79475 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 4165f3bd5b458ae8ac90359369b1d5b020e95b4b..870998faeabbfcb67fc34eb48ad1e28c2b00859b 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 54b05038ebf7115a3f1e354a13334a4963c797ef..27865dd6ec96dd9644a52af16886b94c0b520bb1 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 47ee752a6aa0933edb204e4bee8ebbf27e411af7..04c59554448c4b08cc0ee0d6523afcc8d6ecd1ce 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"