summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErico Nunes <[email protected]>2019-08-10 22:46:02 +0200
committerErico Nunes <[email protected]>2019-08-25 18:29:12 +0000
commit4379dcc12d36bf9993a06c628c9426d4f54ba58d (patch)
tree8ee6aa4cb90171e282af65943415e79a42dc2811 /src/gallium
parent2a8a81d10982b98868ef6cfab69693d0b70f091e (diff)
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 <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/lima/lima_program.c5
1 files changed, 5 insertions, 0 deletions
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
@@ -171,6 +171,11 @@ lima_program_optimize_fs_nir(struct nir_shader *s)
do {
progress = false;
+ NIR_PASS(progress, s, nir_opt_vectorize);
+ } while (progress);
+
+ do {
+ progress = false;
NIR_PASS_V(s, nir_lower_vars_to_ssa);
NIR_PASS(progress, s, nir_lower_alu_to_scalar, alu_lower);