summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_blitter.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-04-18 14:50:14 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-04-18 15:29:23 +0200
commit64aa67a360ab09db1691b37b86178e008c4e3711 (patch)
treec254f6314390ec929f53c61daaff46243339d615 /src/gallium/auxiliary/util/u_blitter.c
parent5df6c430619d7652a5d0c0fb6c87332407b5330e (diff)
u_blitter: add support for saving vertex buffers
Currently r300g does not save vertex buffer on blitter calls. It gets away with it because the current Mesa state tracker usually resets vertex buffers on every draw calls. However, this is wrong. nvfx won't be lucky because it needs to use the blitter inside draw calls.
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 f3b42f7bf9..956aedc8a1 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -132,6 +132,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
ctx->blitter.saved_fb_state.nr_cbufs = ~0;
ctx->blitter.saved_num_sampler_views = ~0;
ctx->blitter.saved_num_sampler_states = ~0;
+ ctx->blitter.saved_num_vertex_buffers = ~0;
/* blend state objects */
memset(&blend, 0, sizeof(blend));
@@ -318,6 +319,13 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
ctx->blitter.saved_sampler_views);
ctx->blitter.saved_num_sampler_views = ~0;
}
+
+ if (ctx->blitter.saved_num_vertex_buffers != ~0) {
+ pipe->set_vertex_buffers(pipe,
+ ctx->blitter.saved_num_vertex_buffers,
+ ctx->blitter.saved_vertex_buffers);
+ ctx->blitter.saved_num_vertex_buffers = ~0;
+ }
}
static void blitter_set_rectangle(struct blitter_context_priv *ctx,