vc4: Upload CS/VS UBO uniforms together.
authorEric Anholt <eric@anholt.net>
Thu, 1 Dec 2016 20:15:10 +0000 (12:15 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 10 Apr 2019 18:45:30 +0000 (11:45 -0700)
commitafad1f7d625d9402a0f7fe57287d536d7d9b4b5a
treebe9d359f82ae50816ea1da7529ed3e02995efc33
parent0204fb77e0133f9e365bd9d7749984b3421bbed5
vc4: Upload CS/VS UBO uniforms together.

Same as I did for V3D, drop all this code trying to GC the
non-indirectly-loaded uniforms from the UBO that's used for indirect
access of gallium cb[0].  While it does successfully drop some of those,
it came at the cost of uploading the VS's indirect unifroms twice, for the
bin and render versions of the shader.

With the UBO loads simplified, I was also able to easily backport V3D's
change to pack a UBO offset into the uniform_data[] field so that we don't
need to do the add of the uniform base in the shader.

As a bonus, now vc4 doesn't depend on mesa/st type_size functions.

total uniforms in shared programs: 25514 -> 25490 (-0.09%)
total instructions in shared programs: 77019 -> 76836 (-0.24%)
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h
src/gallium/drivers/vc4/vc4_uniforms.c