lima/ppir: duplicate consts in nir
Move the duplicate consts step to a nir pass. This makes the nir representation closer to what ppir will have in the result. Additionally, it handles the case where a const is used multiple times by a single node (which can happen in instructions like fcsel). The new implementation will only emit a single load const for that case. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4535>
This commit is contained in:
@@ -250,6 +250,7 @@ lima_program_optimize_fs_nir(struct nir_shader *s,
|
||||
|
||||
NIR_PASS_V(s, lima_nir_duplicate_load_uniforms);
|
||||
NIR_PASS_V(s, lima_nir_duplicate_load_inputs);
|
||||
NIR_PASS_V(s, lima_nir_duplicate_load_consts);
|
||||
|
||||
nir_sweep(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user