diff options
author | Brian Paul <[email protected]> | 2010-08-03 14:13:13 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-08-03 16:37:58 -0600 |
commit | 0e7b53c75be6051b2a935e65f4dbc02449714ee1 (patch) | |
tree | 1a72cb149baa2af879d3ab884598da05436d99d6 /src/gallium/auxiliary/draw/draw_pt.c | |
parent | f94e7e25d101a8691a5276a5aa0eb97d2f4eebbc (diff) |
draw: use instance divisor in draw_print_arrays()
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 0a413286425..248927505da 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -259,6 +259,11 @@ draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count) for (j = 0; j < draw->pt.nr_vertex_elements; j++) { uint buf = draw->pt.vertex_element[j].vertex_buffer_index; ubyte *ptr = (ubyte *) draw->pt.user.vbuffer[buf]; + + if (draw->pt.vertex_element[j].instance_divisor) { + ii = draw->instance_id / draw->pt.vertex_element[j].instance_divisor; + } + ptr += draw->pt.vertex_buffer[buf].buffer_offset; ptr += draw->pt.vertex_buffer[buf].stride * ii; ptr += draw->pt.vertex_element[j].src_offset; |