vc4: Avoid VS shader recompiles by keeping a set of FS inputs seen so far.
authorEric Anholt <eric@anholt.net>
Wed, 3 Aug 2016 18:55:55 +0000 (11:55 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 4 Aug 2016 15:48:27 +0000 (08:48 -0700)
commit2350569a78c60d32e3b751b4386ea7e6d7e2ebe9
treebfa6665039f9d99215394493858761f2c6a99df5
parent62ea2461edbd4db2b82df02f7a77bcb707e65656
vc4: Avoid VS shader recompiles by keeping a set of FS inputs seen so far.

We don't want to bake the whole array into the FS key, because of the
hashing overhead.  But we can keep a set of the arrays seen, and use a
pointer to the copy in as the array's proxy.

Between this and the previous patch, gl-1.0-blend-func now passes on
hardware, where previously it was filling the 256MB CMA area with shaders
and OOMing.

Drops 712 shaders from shader-db.
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h