summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-04-01 19:01:32 -0400
committerMarek Olšák <[email protected]>2018-04-05 15:34:58 -0400
commit321bd6c280bf54b00921014d77732a8dbdf83c21 (patch)
treef5d1530a486f37adacc642793c3902f1c72d6d7b /src/gallium
parentd58080b318ebb360e3ed8c2dc479f348345c0799 (diff)
radeonsi: move r600_buffer_common.c and r600_texture.c into radeonsi
Acked-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/Makefile.sources2
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h80
-rw-r--r--src/gallium/drivers/radeonsi/Makefile.sources2
-rw-r--r--src/gallium/drivers/radeonsi/si_buffer.c (renamed from src/gallium/drivers/radeon/r600_buffer_common.c)0
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h77
-rw-r--r--src/gallium/drivers/radeonsi/si_texture.c (renamed from src/gallium/drivers/radeon/r600_texture.c)0
6 files changed, 80 insertions, 81 deletions
diff --git a/src/gallium/drivers/radeon/Makefile.sources b/src/gallium/drivers/radeon/Makefile.sources
index dd08b2285fa..fbd1ab697a9 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 4e377d45407..81bf3865ed9 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 c008fc6f396..3b1726d17dc 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
index 0af97f4c427..0af97f4c427 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/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 7c1214542bd..29ee25abf56 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -746,6 +746,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,
@@ -866,6 +889,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
index 77117ea961c..77117ea961c 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c