aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-13 21:20:18 +0200
committerMarek Olšák <[email protected]>2012-04-18 16:19:39 +0200
commit462dcf617303a507a1b000f52abbfa3fe695bb95 (patch)
treea9e5a0aa0fba4e9336911feb598a9f806e9aa32c /src/gallium/auxiliary/util/u_blit.c
parent5db9cedeafe98c5ac094fc32f7b4d275c273b867 (diff)
gallium/u_blit: don't release vertex buffer at end of frame / in glFlush
There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
Diffstat (limited to 'src/gallium/auxiliary/util/u_blit.c')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index 1279733881a..e5b97f720ab 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -232,8 +232,10 @@ get_next_slot( struct blit_state *ctx )
{
const unsigned max_slots = 4096 / sizeof ctx->vertices;
- if (ctx->vbuf_slot >= max_slots)
- util_blit_flush( ctx );
+ if (ctx->vbuf_slot >= max_slots) {
+ pipe_resource_reference(&ctx->vbuf, NULL);
+ ctx->vbuf_slot = 0;
+ }
if (!ctx->vbuf) {
ctx->vbuf = pipe_buffer_create(ctx->pipe->screen,
@@ -674,17 +676,6 @@ util_blit_pixels(struct blit_state *ctx,
}
-/* Release vertex buffer at end of frame to avoid synchronous
- * rendering.
- */
-void util_blit_flush( struct blit_state *ctx )
-{
- pipe_resource_reference(&ctx->vbuf, NULL);
- ctx->vbuf_slot = 0;
-}
-
-
-
/**
* Copy pixel block from src texture to dst surface.
* The sampler view's first_level field indicates the source