aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-05-28 13:14:07 -0400
committerZack Rusin <[email protected]>2010-06-08 06:28:10 -0400
commita45b7f47ee0e38b288cc8fc4f6a1c013e8c227bc (patch)
tree39d93f4236a0068db6f515b2f0681c6da4dc016d /src/gallium/auxiliary/draw/draw_context.c
parenta2817f6ae566b672f195cff22e14e2058d3617ea (diff)
gallium: basic and initial implementation of the stream output interface
aka transform feedback
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 61980c3e4f5..7c7702549e0 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -574,3 +574,25 @@ draw_get_rasterizer_no_cull( struct draw_context *draw,
}
return draw->rasterizer_no_cull[scissor][flatshade];
}
+
+void
+draw_set_mapped_so_buffers(struct draw_context *draw,
+ void *buffers[PIPE_MAX_SO_BUFFERS],
+ unsigned num_buffers)
+{
+ int i;
+
+ for (i = 0; i < num_buffers; ++i) {
+ draw->so.buffers[i] = buffers[i];
+ }
+ draw->so.num_buffers = num_buffers;
+}
+
+void
+draw_set_so_state(struct draw_context *draw,
+ struct pipe_stream_output_state *state)
+{
+ memcpy(&draw->so.state,
+ state,
+ sizeof(struct pipe_stream_output_state));
+}