summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_so.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-03-30 00:21:03 -0700
committerZack Rusin <zackr@vmware.com>2013-04-03 10:16:25 -0700
commit246e68735fe22b4d9f510f8fb1bb8b7bb448b068 (patch)
treee3c43babfe3385c84c062a0dcf364581c538f72b /src/gallium/drivers/llvmpipe/lp_state_so.c
parent7ca65a68e1bb9b53737facb9e787944cfeaec0aa (diff)
downloadexternal_mesa3d-246e68735fe22b4d9f510f8fb1bb8b7bb448b068.zip
external_mesa3d-246e68735fe22b4d9f510f8fb1bb8b7bb448b068.tar.gz
external_mesa3d-246e68735fe22b4d9f510f8fb1bb8b7bb448b068.tar.bz2
llvmpipe: reset so buffers when not appending
We need to reset the internal state of the so buffers or we'll keep appending even though we're not supposed to. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_so.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_so.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_so.c b/src/gallium/drivers/llvmpipe/lp_state_so.c
index 58bab39..fa58f79 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_so.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_so.c
@@ -70,6 +70,12 @@ llvmpipe_set_so_targets(struct pipe_context *pipe,
int i;
for (i = 0; i < num_targets; i++) {
pipe_so_target_reference((struct pipe_stream_output_target **)&llvmpipe->so_targets[i], targets[i]);
+ /* if we're not appending then lets reset the internal
+ data of our so target */
+ if (!(append_bitmask & (1 << i)) && llvmpipe->so_targets[i]) {
+ llvmpipe->so_targets[i]->internal_offset = 0;
+ llvmpipe->so_targets[i]->emitted_vertices = 0;
+ }
}
for (; i < llvmpipe->num_so_targets; i++) {