v3d: Delay emitting ldvpm on V3D 4.x until it's actually used.
authorEric Anholt <eric@anholt.net>
Fri, 15 Feb 2019 05:11:20 +0000 (21:11 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 19 Feb 2019 02:09:07 +0000 (18:09 -0800)
commit1a775d43c9360257b267d097f60fc6ef751730f2
treeb78c5c58b0416bb1044c4eaa9ea45f071abf853e
parent5a84d46896dc16309325c0e60674347c12665eef
v3d: Delay emitting ldvpm on V3D 4.x until it's actually used.

For V3D 3.x, we emitted the ldvpms all at the top so that we didn't need
to do VPM setup when the load_inputs are out of order.  For V3D 4.x, we
can reduce register pressure by delaying our loads until they're actually
needed.  This also avoids a bunch of silly MOVs in the pre-opt VIR dump.

total instructions in shared programs: 6421415 -> 6419933 (-0.02%)
total uniforms in shared programs: 2393139 -> 2393140 (<.01%)
total threads in shared programs: 153864 -> 153906 (0.03%)
src/broadcom/compiler/nir_to_vir.c