vc4: Avoid emitting small immediates for UBO indirect load address guards.
authorEric Anholt <eric@anholt.net>
Tue, 7 Feb 2017 01:30:59 +0000 (17:30 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 10 Feb 2017 22:17:04 +0000 (14:17 -0800)
commitb2309393039b2ec0cc00a8e6fd828c60c4ef1e11
treed3968c9e1e8bc045e5cd4612b85155f3e6e31dab
parentd7b3707c612027b354deea6bc5eae56a02d5f8d5
vc4: Avoid emitting small immediates for UBO indirect load address guards.

The kernel will reject our shader if we emit one here, and having 4, 8, or
12 as the top end of our UBO clamp rare is enough that it's not worth
making the kernel let us.

Fixes piglit fs-const-array-of-struct and
fs-const-array-of-struct-of-array since recent GLSL linking changes made
us get this as an indirect load of a uniform, instead of a tempoary.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/vc4/vc4_opt_small_immediates.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.c
src/gallium/drivers/vc4/vc4_qir.h
src/gallium/drivers/vc4/vc4_qpu_emit.c