diff options
author | Keith Whitwell <[email protected]> | 2008-04-17 13:14:22 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-04-17 14:23:13 +0100 |
commit | c96d565643de271c6bda066e892b25d0a97ea4d0 (patch) | |
tree | cd12a67d1d8e6d64e2eafc9cbde3564af0b5fbe9 | |
parent | 8abfcea690c66f75d61905f0ec5497b8fd7950d4 (diff) |
draw: keep record of number of active vertex buffers
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_private.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 0c314f6e1da..cdcbfdc3236 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -249,6 +249,7 @@ draw_set_vertex_buffers(struct draw_context *draw, draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ ); memcpy(draw->vertex_buffer, buffers, count * sizeof(buffers[0])); + draw->nr_vertex_buffers = count; } diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 8ac061cc9f8..359a8b8a3db 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -245,7 +245,10 @@ struct draw_context /* pipe state that we need: */ const struct pipe_rasterizer_state *rasterizer; struct pipe_viewport_state viewport; + struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; + unsigned nr_vertex_buffers; + struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS]; struct draw_vertex_shader *vertex_shader; |