vc4: Just stream out fallback IB contents.
authorEric Anholt <eric@anholt.net>
Wed, 15 Apr 2015 05:42:02 +0000 (22:42 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 28 May 2015 00:29:11 +0000 (17:29 -0700)
commit10aacf5ae8f3e90e2f0967fbdcf96df93e346e20
tree70a8dd0af238e8dc128f369e5b4d1cdd6a702eb4
parentf8de6277bfa1a7db9a8c0f0baaa441276264a982
vc4: Just stream out fallback IB contents.

The idea I had when I wrote the original shadow code was that you'd see a
set_index_buffer to the IB, then a bunch of draws out of it.  What's
actually happening in openarena is that set_index_buffer occurs at every
draw, so we end up making a new shadow BO every time, and converting more
of the BO than is actually used in the draw.

While I could maybe come up with a better caching scheme, for now just
do the simple thing that doesn't result in a new shadow IB allocation
per draw.

Improves performance of isosurf in drawelements mode by 58.7967% +/-
3.86152% (n=8).
src/gallium/drivers/vc4/vc4_context.c
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/drivers/vc4/vc4_resource.c
src/gallium/drivers/vc4/vc4_resource.h
src/gallium/drivers/vc4/vc4_state.c