* 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,
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);
} 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);
}
}
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);
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);
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])