summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-09 02:13:10 +0200
committerMarek Olšák <[email protected]>2010-06-09 02:26:24 +0200
commit8f17e011c341ff78ada9543545c1f41caf66b2e9 (patch)
tree45011af6002e694230e964bd94bff109844e9719 /src/gallium/auxiliary/util/u_blitter.c
parent89dc925150a6e180c80f75a84196008dc954ae99 (diff)
util: reference vertex buffers in blitter
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index ae4c80c6450..dfe2101c2e5 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -282,6 +282,7 @@ static void blitter_check_saved_CSOs(struct blitter_context_priv *ctx)
static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
{
struct pipe_context *pipe = ctx->pipe;
+ unsigned i;
/* restore the state objects which are always required to be saved */
pipe->bind_blend_state(pipe, ctx->blitter.saved_blend_state);
@@ -328,6 +329,13 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
pipe->set_vertex_buffers(pipe,
ctx->blitter.saved_num_vertex_buffers,
ctx->blitter.saved_vertex_buffers);
+
+ for (i = 0; i < ctx->blitter.saved_num_vertex_buffers; i++) {
+ if (ctx->blitter.saved_vertex_buffers[i].buffer) {
+ pipe_resource_reference(&ctx->blitter.saved_vertex_buffers[i].buffer,
+ NULL);
+ }
+ }
ctx->blitter.saved_num_vertex_buffers = ~0;
}
}