[21/26] radeonsi: make some functions non-static

Submitted by Marek Olšák on Feb. 13, 2019, 5:16 a.m.

Details

Message ID 20190213051621.6235-22-maraeo@gmail.com
State Accepted
Commit b206f007de566ee538c15d2e57ae27172ce494d2
Headers show
Series "RadeonSI: Primitive culling with async compute" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák Feb. 13, 2019, 5:16 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/gallium/drivers/radeonsi/si_state.c       | 20 ++++++-------------
 src/gallium/drivers/radeonsi/si_state.h       | 15 ++++++++++++++
 .../drivers/radeonsi/si_state_shaders.c       |  8 ++++----
 3 files changed, 25 insertions(+), 18 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index b49a1b3695e..5a9597bdd8d 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4399,21 +4399,13 @@  static void si_delete_sampler_state(struct pipe_context *ctx, void *state)
  * Vertex elements & buffers
  */
 
-struct util_fast_udiv_info32 {
-   unsigned multiplier; /* the "magic number" multiplier */
-   unsigned pre_shift; /* shift for the dividend before multiplying */
-   unsigned post_shift; /* shift for the dividend after multiplying */
-   int increment; /* 0 or 1; if set then increment the numerator, using one of
-                     the two strategies */
-};
-
-static struct util_fast_udiv_info32
-util_compute_fast_udiv_info32(uint32_t D, unsigned num_bits)
+struct si_fast_udiv_info32
+si_compute_fast_udiv_info32(uint32_t D, unsigned num_bits)
 {
 	struct util_fast_udiv_info info =
 		util_compute_fast_udiv_info(D, num_bits, 32);
 
-	struct util_fast_udiv_info32 result = {
+	struct si_fast_udiv_info32 result = {
 		info.multiplier,
 		info.pre_shift,
 		info.post_shift,
@@ -4429,8 +4421,8 @@  static void *si_create_vertex_elements(struct pipe_context *ctx,
 	struct si_screen *sscreen = (struct si_screen*)ctx->screen;
 	struct si_vertex_elements *v = CALLOC_STRUCT(si_vertex_elements);
 	bool used[SI_NUM_VERTEX_BUFFERS] = {};
-	struct util_fast_udiv_info32 divisor_factors[SI_MAX_ATTRIBS] = {};
-	STATIC_ASSERT(sizeof(struct util_fast_udiv_info32) == 16);
+	struct si_fast_udiv_info32 divisor_factors[SI_MAX_ATTRIBS] = {};
+	STATIC_ASSERT(sizeof(struct si_fast_udiv_info32) == 16);
 	STATIC_ASSERT(sizeof(divisor_factors[0].multiplier) == 4);
 	STATIC_ASSERT(sizeof(divisor_factors[0].pre_shift) == 4);
 	STATIC_ASSERT(sizeof(divisor_factors[0].post_shift) == 4);
@@ -4466,7 +4458,7 @@  static void *si_create_vertex_elements(struct pipe_context *ctx,
 			} else {
 				v->instance_divisor_is_fetched |= 1u << i;
 				divisor_factors[i] =
-					util_compute_fast_udiv_info32(instance_divisor, 32);
+					si_compute_fast_udiv_info32(instance_divisor, 32);
 			}
 		}
 
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 8f3a3224edf..b3ed1517d85 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -535,6 +535,17 @@  void si_save_qbo_state(struct si_context *sctx, struct si_qbo_state *st);
 void si_set_occlusion_query_state(struct si_context *sctx,
 				  bool old_perfect_enable);
 
+struct si_fast_udiv_info32 {
+   unsigned multiplier; /* the "magic number" multiplier */
+   unsigned pre_shift; /* shift for the dividend before multiplying */
+   unsigned post_shift; /* shift for the dividend after multiplying */
+   int increment; /* 0 or 1; if set then increment the numerator, using one of
+                     the two strategies */
+};
+
+struct si_fast_udiv_info32
+si_compute_fast_udiv_info32(uint32_t D, unsigned num_bits);
+
 /* si_state_binning.c */
 void si_emit_dpbb_state(struct si_context *sctx);
 
@@ -562,6 +573,10 @@  int si_shader_select_with_key(struct si_screen *sscreen,
 			      struct si_shader_key *key,
 			      int thread_index,
 			      bool optimized_or_none);
+void si_shader_selector_key_vs(struct si_context *sctx,
+			       struct si_shader_selector *vs,
+			       struct si_shader_key *key,
+			       struct si_vs_prolog_bits *prolog_key);
 
 /* si_state_draw.c */
 void si_emit_cache_flush(struct si_context *sctx);
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 146e0f87693..80d4f7222da 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1370,10 +1370,10 @@  static unsigned si_get_alpha_test_func(struct si_context *sctx)
 	return PIPE_FUNC_ALWAYS;
 }
 
-static void si_shader_selector_key_vs(struct si_context *sctx,
-				      struct si_shader_selector *vs,
-				      struct si_shader_key *key,
-				      struct si_vs_prolog_bits *prolog_key)
+void si_shader_selector_key_vs(struct si_context *sctx,
+			       struct si_shader_selector *vs,
+			       struct si_shader_key *key,
+			       struct si_vs_prolog_bits *prolog_key)
 {
 	if (!sctx->vertex_elements ||
 	    vs->info.properties[TGSI_PROPERTY_VS_BLIT_SGPRS])