summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 81858e01cac..10bf9f54c10 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -233,24 +233,28 @@ void draw_set_viewport_state( struct draw_context *draw,
void
-draw_set_vertex_buffer(struct draw_context *draw,
- unsigned attr,
- const struct pipe_vertex_buffer *buffer)
+draw_set_vertex_buffers(struct draw_context *draw,
+ unsigned count,
+ const struct pipe_vertex_buffer *buffers)
{
+ assert(count <= PIPE_MAX_ATTRIBS);
+
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
- assert(attr < PIPE_MAX_ATTRIBS);
- draw->vertex_buffer[attr] = *buffer;
+
+ memcpy(draw->vertex_buffer, buffers, count * sizeof(buffers[0]));
}
void
-draw_set_vertex_element(struct draw_context *draw,
- unsigned attr,
- const struct pipe_vertex_element *element)
+draw_set_vertex_elements(struct draw_context *draw,
+ unsigned count,
+ const struct pipe_vertex_element *elements)
{
+ assert(count <= PIPE_MAX_ATTRIBS);
+
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
- assert(attr < PIPE_MAX_ATTRIBS);
- draw->vertex_element[attr] = *element;
+
+ memcpy(draw->vertex_element, elements, count * sizeof(elements[0]));
}