From: Erico Nunes Date: Sat, 10 Aug 2019 20:46:02 +0000 (+0200) Subject: lima/ppir: enable vectorize optimization X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4379dcc12d36bf9993a06c628c9426d4f54ba58d;p=mesa.git lima/ppir: enable vectorize optimization pp has vector units and some operations can be optimized when bundled together. Benchmarking this with piglit shaders shows that the instruction count can be greatly reduced on many examples with vectorize. Signed-off-by: Erico Nunes Reviewed-by: Qiang Yu --- diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index cb05c6f379f..b9c4cbc4d5f 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -169,6 +169,11 @@ lima_program_optimize_fs_nir(struct nir_shader *s) NIR_PASS_V(s, nir_lower_regs_to_ssa); NIR_PASS_V(s, nir_lower_tex, &tex_options); + do { + progress = false; + NIR_PASS(progress, s, nir_opt_vectorize); + } while (progress); + do { progress = false;