vc4: Use NIR texture lowering for texture swizzling.
authorEric Anholt <eric@anholt.net>
Sat, 19 Dec 2015 03:15:03 +0000 (19:15 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 6 Jan 2016 20:43:08 +0000 (12:43 -0800)
commit12519a972f53dba13289b0abebd558fd8506a539
treee09ab42fdc46bc7e43c84f098bd274683affce15
parent71db7d3dc577e48da3689fd66989ec3b0a069089
vc4: Use NIR texture lowering for texture swizzling.

We can't use its other features currently (mostly because we don't want
Newton-Raphson on rcps for texture coordinates), but it gets us started.

This eliminates some comparisons with constants in GLB2.7 and ETQW traces
at the QIR level by moving the comparisons into NIR, where they get
constant-folded out.

instructions in affected programs:     165 -> 156 (-5.45%)
total uniforms in shared programs: 32087 -> 32085 (-0.01%)
total estimated cycles in shared programs: 245762 -> 245752 (-0.00%)
estimated cycles in affected programs:     461 -> 451 (-2.17%)
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h