diff options
author | Eric Anholt <[email protected]> | 2015-04-14 22:42:02 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-05-27 17:29:11 -0700 |
commit | 10aacf5ae8f3e90e2f0967fbdcf96df93e346e20 (patch) | |
tree | 70a8dd0af238e8dc128f369e5b4d1cdd6a702eb4 /src/gallium/drivers/vc4/vc4_resource.h | |
parent | f8de6277bfa1a7db9a8c0f0baaa441276264a982 (diff) |
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).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.h b/src/gallium/drivers/vc4/vc4_resource.h index 2ed848bc7b9..b3cba8f2f65 100644 --- a/src/gallium/drivers/vc4/vc4_resource.h +++ b/src/gallium/drivers/vc4/vc4_resource.h @@ -107,8 +107,10 @@ struct pipe_resource *vc4_resource_create(struct pipe_screen *pscreen, const struct pipe_resource *tmpl); void vc4_update_shadow_baselevel_texture(struct pipe_context *pctx, struct pipe_sampler_view *view); -void vc4_update_shadow_index_buffer(struct pipe_context *pctx, - const struct pipe_index_buffer *ib); +struct pipe_resource *vc4_get_shadow_index_buffer(struct pipe_context *pctx, + const struct pipe_index_buffer *ib, + uint32_t count, + uint32_t *offset); void vc4_dump_surface(struct pipe_surface *psurf); #endif /* VC4_RESOURCE_H */ |