radeonsi: make some functions non-static
authorMarek Olšák <marek.olsak@amd.com>
Tue, 12 Feb 2019 19:49:55 +0000 (14:49 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 16 May 2019 17:10:07 +0000 (13:10 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h
src/gallium/drivers/radeonsi/si_state_shaders.c

index bc91e6f5148d434a6765e7cbdb674d0e5237cda5..7debbc1f3d4047d0b56a97c613655fa3049ea1ff 100644 (file)
@@ -4411,21 +4411,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,
@@ -4441,8 +4433,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);
@@ -4476,7 +4468,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);
                        }
                }
 
index 15c4ef6d9a1d09242628fd16ba699bec66ef807b..613aa32a312d52ffaaf388ef6a7b3bc8b1cd6301 100644 (file)
@@ -556,6 +556,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);
 
@@ -583,6 +594,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);
index 8ae77fda3f3009fc4346c4d9625235fecd8aa423..28360aae9657d421356ab70a10967b81df6a7477 100644 (file)
@@ -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])