From: Marek Olšák <marek.ol...@amd.com>

---
 src/gallium/drivers/radeon/Makefile.sources        |  2 -
 src/gallium/drivers/radeon/r600_pipe_common.h      | 80 +---------------------
 src/gallium/drivers/radeonsi/Makefile.sources      |  2 +
 .../r600_buffer_common.c => radeonsi/si_buffer.c}  |  0
 src/gallium/drivers/radeonsi/si_pipe.h             | 77 +++++++++++++++++++++
 .../r600_texture.c => radeonsi/si_texture.c}       |  0
 6 files changed, 80 insertions(+), 81 deletions(-)
 rename src/gallium/drivers/{radeon/r600_buffer_common.c => 
radeonsi/si_buffer.c} (100%)
 rename src/gallium/drivers/{radeon/r600_texture.c => radeonsi/si_texture.c} 
(100%)

diff --git a/src/gallium/drivers/radeon/Makefile.sources 
b/src/gallium/drivers/radeon/Makefile.sources
index dd08b22..fbd1ab6 100644
--- a/src/gallium/drivers/radeon/Makefile.sources
+++ b/src/gallium/drivers/radeon/Makefile.sources
@@ -1,8 +1,6 @@
 C_SOURCES := \
-       r600_buffer_common.c \
        r600_perfcounter.c \
        r600_pipe_common.h \
-       r600_texture.c \
        radeon_uvd.c \
        radeon_uvd.h \
        radeon_vcn_dec.c \
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h 
b/src/gallium/drivers/radeon/r600_pipe_common.h
index 4e377d4..81bf386 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -23,8 +23,7 @@
  */
 
 /**
- * This file contains common screen and context structures and functions
- * for r600g and radeonsi.
+ * This file is going to be removed.
  */
 
 #ifndef R600_PIPE_COMMON_H
@@ -402,86 +401,9 @@ struct r600_common_context {
                                 uint64_t offset, uint64_t size, unsigned 
value);
 };
 
-/* r600_buffer_common.c */
-bool si_rings_is_buffer_referenced(struct si_context *sctx,
-                                  struct pb_buffer *buf,
-                                  enum radeon_bo_usage usage);
-void *si_buffer_map_sync_with_rings(struct si_context *sctx,
-                                   struct r600_resource *resource,
-                                   unsigned usage);
-void si_init_resource_fields(struct si_screen *sscreen,
-                            struct r600_resource *res,
-                            uint64_t size, unsigned alignment);
-bool si_alloc_resource(struct si_screen *sscreen,
-                      struct r600_resource *res);
-struct pipe_resource *si_aligned_buffer_create(struct pipe_screen *screen,
-                                              unsigned flags,
-                                              unsigned usage,
-                                              unsigned size,
-                                              unsigned alignment);
-void si_replace_buffer_storage(struct pipe_context *ctx,
-                              struct pipe_resource *dst,
-                              struct pipe_resource *src);
-void si_init_screen_buffer_functions(struct si_screen *sscreen);
-void si_init_buffer_functions(struct si_context *sctx);
-
 /* r600_perfcounters.c */
 void si_perfcounters_destroy(struct si_screen *sscreen);
 
-/* r600_texture.c */
-bool si_prepare_for_dma_blit(struct si_context *sctx,
-                            struct r600_texture *rdst,
-                            unsigned dst_level, unsigned dstx,
-                            unsigned dsty, unsigned dstz,
-                            struct r600_texture *rsrc,
-                            unsigned src_level,
-                            const struct pipe_box *src_box);
-void si_texture_get_fmask_info(struct si_screen *sscreen,
-                              struct r600_texture *rtex,
-                              unsigned nr_samples,
-                              struct r600_fmask_info *out);
-void si_texture_get_cmask_info(struct si_screen *sscreen,
-                              struct r600_texture *rtex,
-                              struct r600_cmask_info *out);
-void si_eliminate_fast_color_clear(struct si_context *sctx,
-                                  struct r600_texture *rtex);
-void si_texture_discard_cmask(struct si_screen *sscreen,
-                             struct r600_texture *rtex);
-bool si_init_flushed_depth_texture(struct pipe_context *ctx,
-                                  struct pipe_resource *texture,
-                                  struct r600_texture **staging);
-void si_print_texture_info(struct si_screen *sscreen,
-                          struct r600_texture *rtex, struct u_log_context 
*log);
-struct pipe_resource *si_texture_create(struct pipe_screen *screen,
-                                       const struct pipe_resource *templ);
-bool vi_dcc_formats_compatible(enum pipe_format format1,
-                              enum pipe_format format2);
-bool vi_dcc_formats_are_incompatible(struct pipe_resource *tex,
-                                    unsigned level,
-                                    enum pipe_format view_format);
-void vi_disable_dcc_if_incompatible_format(struct si_context *sctx,
-                                          struct pipe_resource *tex,
-                                          unsigned level,
-                                          enum pipe_format view_format);
-struct pipe_surface *si_create_surface_custom(struct pipe_context *pipe,
-                                             struct pipe_resource *texture,
-                                             const struct pipe_surface *templ,
-                                             unsigned width0, unsigned height0,
-                                             unsigned width, unsigned height);
-unsigned si_translate_colorswap(enum pipe_format format, bool do_endian_swap);
-void vi_separate_dcc_try_enable(struct si_context *sctx,
-                               struct r600_texture *tex);
-void vi_separate_dcc_start_query(struct si_context *sctx,
-                                struct r600_texture *tex);
-void vi_separate_dcc_stop_query(struct si_context *sctx,
-                               struct r600_texture *tex);
-void vi_separate_dcc_process_and_reset_stats(struct pipe_context *ctx,
-                                            struct r600_texture *tex);
-bool si_texture_disable_dcc(struct si_context *sctx,
-                           struct r600_texture *rtex);
-void si_init_screen_texture_functions(struct si_screen *sscreen);
-void si_init_context_texture_functions(struct si_context *sctx);
-
 
 /* Inline helpers. */
 
diff --git a/src/gallium/drivers/radeonsi/Makefile.sources 
b/src/gallium/drivers/radeonsi/Makefile.sources
index c008fc6..3b1726d 100644
--- a/src/gallium/drivers/radeonsi/Makefile.sources
+++ b/src/gallium/drivers/radeonsi/Makefile.sources
@@ -6,6 +6,7 @@ C_SOURCES := \
        cik_sdma.c \
        driinfo_radeonsi.h \
        si_blit.c \
+       si_buffer.c \
        si_clear.c \
        si_compute.c \
        si_compute.h \
@@ -42,4 +43,5 @@ C_SOURCES := \
        si_state_viewport.c \
        si_state.h \
        si_test_dma.c \
+       si_texture.c \
        si_uvd.c
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c 
b/src/gallium/drivers/radeonsi/si_buffer.c
similarity index 100%
rename from src/gallium/drivers/radeon/r600_buffer_common.c
rename to src/gallium/drivers/radeonsi/si_buffer.c
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h 
b/src/gallium/drivers/radeonsi/si_pipe.h
index d5a868b..45a92b4 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -743,6 +743,29 @@ void si_blit_decompress_depth(struct pipe_context *ctx,
                              unsigned first_layer, unsigned last_layer,
                              unsigned first_sample, unsigned last_sample);
 
+/* si_buffer.c */
+bool si_rings_is_buffer_referenced(struct si_context *sctx,
+                                  struct pb_buffer *buf,
+                                  enum radeon_bo_usage usage);
+void *si_buffer_map_sync_with_rings(struct si_context *sctx,
+                                   struct r600_resource *resource,
+                                   unsigned usage);
+void si_init_resource_fields(struct si_screen *sscreen,
+                            struct r600_resource *res,
+                            uint64_t size, unsigned alignment);
+bool si_alloc_resource(struct si_screen *sscreen,
+                      struct r600_resource *res);
+struct pipe_resource *si_aligned_buffer_create(struct pipe_screen *screen,
+                                              unsigned flags,
+                                              unsigned usage,
+                                              unsigned size,
+                                              unsigned alignment);
+void si_replace_buffer_storage(struct pipe_context *ctx,
+                              struct pipe_resource *dst,
+                              struct pipe_resource *src);
+void si_init_screen_buffer_functions(struct si_screen *sscreen);
+void si_init_buffer_functions(struct si_context *sctx);
+
 /* si_clear.c */
 void vi_dcc_clear_level(struct si_context *sctx,
                        struct r600_texture *rtex,
@@ -863,6 +886,60 @@ struct pipe_video_buffer *si_video_buffer_create(struct 
pipe_context *pipe,
 void si_update_vs_viewport_state(struct si_context *ctx);
 void si_init_viewport_functions(struct si_context *ctx);
 
+/* r600_texture.c */
+bool si_prepare_for_dma_blit(struct si_context *sctx,
+                            struct r600_texture *rdst,
+                            unsigned dst_level, unsigned dstx,
+                            unsigned dsty, unsigned dstz,
+                            struct r600_texture *rsrc,
+                            unsigned src_level,
+                            const struct pipe_box *src_box);
+void si_texture_get_fmask_info(struct si_screen *sscreen,
+                              struct r600_texture *rtex,
+                              unsigned nr_samples,
+                              struct r600_fmask_info *out);
+void si_texture_get_cmask_info(struct si_screen *sscreen,
+                              struct r600_texture *rtex,
+                              struct r600_cmask_info *out);
+void si_eliminate_fast_color_clear(struct si_context *sctx,
+                                  struct r600_texture *rtex);
+void si_texture_discard_cmask(struct si_screen *sscreen,
+                             struct r600_texture *rtex);
+bool si_init_flushed_depth_texture(struct pipe_context *ctx,
+                                  struct pipe_resource *texture,
+                                  struct r600_texture **staging);
+void si_print_texture_info(struct si_screen *sscreen,
+                          struct r600_texture *rtex, struct u_log_context 
*log);
+struct pipe_resource *si_texture_create(struct pipe_screen *screen,
+                                       const struct pipe_resource *templ);
+bool vi_dcc_formats_compatible(enum pipe_format format1,
+                              enum pipe_format format2);
+bool vi_dcc_formats_are_incompatible(struct pipe_resource *tex,
+                                    unsigned level,
+                                    enum pipe_format view_format);
+void vi_disable_dcc_if_incompatible_format(struct si_context *sctx,
+                                          struct pipe_resource *tex,
+                                          unsigned level,
+                                          enum pipe_format view_format);
+struct pipe_surface *si_create_surface_custom(struct pipe_context *pipe,
+                                             struct pipe_resource *texture,
+                                             const struct pipe_surface *templ,
+                                             unsigned width0, unsigned height0,
+                                             unsigned width, unsigned height);
+unsigned si_translate_colorswap(enum pipe_format format, bool do_endian_swap);
+void vi_separate_dcc_try_enable(struct si_context *sctx,
+                               struct r600_texture *tex);
+void vi_separate_dcc_start_query(struct si_context *sctx,
+                                struct r600_texture *tex);
+void vi_separate_dcc_stop_query(struct si_context *sctx,
+                               struct r600_texture *tex);
+void vi_separate_dcc_process_and_reset_stats(struct pipe_context *ctx,
+                                            struct r600_texture *tex);
+bool si_texture_disable_dcc(struct si_context *sctx,
+                           struct r600_texture *rtex);
+void si_init_screen_texture_functions(struct si_screen *sscreen);
+void si_init_context_texture_functions(struct si_context *sctx);
+
 
 /*
  * common helpers
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeonsi/si_texture.c
similarity index 100%
rename from src/gallium/drivers/radeon/r600_texture.c
rename to src/gallium/drivers/radeonsi/si_texture.c
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to