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).
10aacf5 vc4: Just stream out fallback IB contents.
src/gallium/drivers/vc4/vc4_context.c | 7 +++++++
src/gallium/drivers/vc4/vc4_context.h | 2 ++
src/gallium/drivers/vc4/vc4_draw.c | 15 +++++++++++----
src/gallium/drivers/vc4/vc4_resource.c | 33 +++++++++++++++-----------------
src/gallium/drivers/vc4/vc4_resource.h | 6 ++++--
src/gallium/drivers/vc4/vc4_state.c | 20 ++-----------------
6 files changed, 41 insertions(+), 42 deletions(-)
Upstream: cgit.freedesktop.org