mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radeonsi: set num_vs_inputs from nir->num_inputs and use it more
Acked-by: Pierre-Eric Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
This commit is contained in:
parent
46c77ed745
commit
f249c297b2
3 changed files with 5 additions and 5 deletions
|
|
@ -89,7 +89,7 @@ get_vertex_index_for_all_inputs(nir_shader *nir, struct lower_vs_inputs_state *s
|
|||
si_nir_load_internal_binding(sel->screen, b, s->args, SI_VS_CONST_INSTANCE_DIVISORS, 4);
|
||||
}
|
||||
|
||||
for (int i = 0; i < sel->info.num_inputs; i++)
|
||||
for (int i = 0; i < sel->info.num_vs_inputs; i++)
|
||||
s->vertex_index[i] = get_vertex_index(b, i, s);
|
||||
}
|
||||
|
||||
|
|
@ -589,7 +589,7 @@ si_nir_lower_vs_inputs(nir_shader *nir, struct si_shader *shader, struct si_shad
|
|||
const struct si_shader_selector *sel = shader->selector;
|
||||
|
||||
/* no inputs to lower */
|
||||
if (!sel->info.num_inputs)
|
||||
if (!sel->info.num_vs_inputs && !nir->info.vs.blit_sgprs_amd)
|
||||
return false;
|
||||
|
||||
struct lower_vs_inputs_state state = {
|
||||
|
|
|
|||
|
|
@ -667,8 +667,8 @@ void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir,
|
|||
info->has_divergent_loop = nir_has_divergent_loop(nir);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX) {
|
||||
info->num_vs_inputs =
|
||||
nir->info.stage == MESA_SHADER_VERTEX && !nir->info.vs.blit_sgprs_amd ? info->num_inputs : 0;
|
||||
info->num_vs_inputs = nir->info.stage == MESA_SHADER_VERTEX && !nir->info.vs.blit_sgprs_amd ?
|
||||
nir->num_inputs : 0;
|
||||
unsigned num_vbos_in_sgprs = si_num_vbos_in_user_sgprs_inline(sscreen->info.gfx_level);
|
||||
info->num_vbos_in_user_sgprs = MIN2(info->num_vs_inputs, num_vbos_in_sgprs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2322,7 +2322,7 @@ void si_vs_key_update_inputs(struct si_context *sctx)
|
|||
key->ge.mono.instance_divisor_is_fetched = elts->instance_divisor_is_fetched;
|
||||
key->ge.opt.prefer_mono = elts->instance_divisor_is_fetched;
|
||||
|
||||
unsigned count_mask = (1 << vs->info.num_inputs) - 1;
|
||||
unsigned count_mask = (1 << vs->info.num_vs_inputs) - 1;
|
||||
unsigned fix = elts->fix_fetch_always & count_mask;
|
||||
unsigned opencode = elts->fix_fetch_opencode & count_mask;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue