diff options
author | Zack Rusin <zack@kde.org> | 2010-05-31 20:41:18 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-06-08 06:28:11 -0400 |
commit | ba5975dd3274a3cc760e79dabaf9c11b96673f4a (patch) | |
tree | 0fc15ba8416e0c9f55feef086143fecb9908e529 /src/gallium/drivers/softpipe/sp_state_so.c | |
parent | c9db97c8229689060fab0edee7df717f804b99ce (diff) |
gallium: add interface for DrawAuto and implement it in softpipe
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_so.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_so.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_so.c b/src/gallium/drivers/softpipe/sp_state_so.c index 49bde22e97..8bd20cd2ac 100644 --- a/src/gallium/drivers/softpipe/sp_state_so.c +++ b/src/gallium/drivers/softpipe/sp_state_so.c @@ -93,7 +93,14 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe, softpipe->dirty |= SP_NEW_SO_BUFFERS; for (i = 0; i < num_buffers; ++i) { - void *mapped = softpipe_resource(buffers[i])->data; + void *mapped; + struct softpipe_resource *res = softpipe_resource(buffers[i]); + + softpipe->so_target.buffer[i] = res; + softpipe->so_target.offset[i] = offsets[i]; + softpipe->so_target.so_count[i] = 0; + + mapped = res->data; if (offsets[i] >= 0) map_buffers[i] = ((char*)mapped) + offsets[i]; else { @@ -102,5 +109,7 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe, map_buffers[i] = mapped; } } + softpipe->so_target.num_buffers = num_buffers; + draw_set_mapped_so_buffers(softpipe->draw, map_buffers, num_buffers); } |