vc4: Avoid generating a custom shader per level in glGenerateMipmaps().
authorEric Anholt <eric@anholt.net>
Tue, 2 Aug 2016 23:01:34 +0000 (16:01 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 3 Aug 2016 17:55:54 +0000 (10:55 -0700)
commitbc1fc9c98539f38f5a29b314d4a993a2e2f7ca0a
tree06709a819a2d87b53148f2b777afc71e656126b5
parente97e9e62a1de9689ce8a2a77cb9657b387a1d14b
vc4: Avoid generating a custom shader per level in glGenerateMipmaps().

We were baking in the LOD of the source level to each shader.  Instead,
pass it in as a uniform -- this requires storing it to a temp register,
but that's better than compiling a ton of separate shaders:

total instructions in shared programs: 115032 -> 115036 (0.00%)
instructions in affected programs:     96 -> 100 (4.17%)
LOST:                                  572
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h
src/gallium/drivers/vc4/vc4_uniforms.c