v3d: Use ldunif instructions for uniforms.
authorEric Anholt <eric@anholt.net>
Tue, 26 Feb 2019 18:17:59 +0000 (10:17 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2019 20:57:39 +0000 (12:57 -0800)
commit110f14d4b4bdee779a35c26e3224a9d28eb81fa7
treea5da34b8b3372a22d30535d15772c0d188008dab
parent4036fce8fd75277567894afc595e16a4742d4587
v3d: Use ldunif instructions for uniforms.

The idea is that for repeated use of the same uniform, we could avoid
loading it on each consumer.  The results look pretty good.

total instructions in shared programs: 6413571 -> 6521464 (1.68%)
total threads in shared programs: 154214 -> 154000 (-0.14%)
total uniforms in shared programs: 2393604 -> 2119629 (-11.45%)
total spills in shared programs: 4960 -> 4984 (0.48%)
total fills in shared programs: 6350 -> 6418 (1.07%)

Once we do scheduling at the NIR level, the register pressure (and thus
also instructions) issues we see here will drop back down.
src/broadcom/Makefile.sources
src/broadcom/compiler/meson.build
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c
src/broadcom/compiler/vir_dump.c
src/broadcom/compiler/vir_lower_uniforms.c [deleted file]
src/broadcom/compiler/vir_opt_copy_propagate.c
src/broadcom/compiler/vir_opt_small_immediates.c
src/broadcom/compiler/vir_register_allocate.c
src/broadcom/compiler/vir_to_qpu.c