mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-25 18:00:52 +01:00
radv: do not add extra SGPR when push constants are not used
This is not because the vertex stage needs some push constants that other stages need them too. This should reduce the number of loaded SGPRs in some situations. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
39097282f7
commit
0c4a30eb51
1 changed files with 2 additions and 1 deletions
|
|
@ -149,7 +149,8 @@ ac_nir_shader_info_pass(struct nir_shader *nir,
|
|||
struct nir_function *func = (struct nir_function *)exec_list_get_head(&nir->functions);
|
||||
|
||||
info->needs_push_constants = false;
|
||||
if (options->layout->push_constant_size ||
|
||||
if ((options->layout->push_constant_size &&
|
||||
options->layout->push_constant_stages & (1 << nir->info.stage)) ||
|
||||
options->layout->dynamic_offset_count)
|
||||
info->needs_push_constants = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue