summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-29 23:21:01 +0100
committerMichal Krol <michal@vmware.com>2009-12-29 23:21:01 +0100
commit7ca0ce38340144794267609646048b3820d594ab (patch)
tree7c31399f0373cb652b682e9af0fedde839d58a77 /src/gallium/auxiliary/draw/draw_pipe_vbuf.c
parent7124fa16efe0f8ffb402bcd182f276032bed378d (diff)
Implement draw_arrays_instanced() in softpipe.
Modify the translate module to respect instance divisors and accept instance id as a parameter to calculate input vertex offset.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_vbuf.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_vbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index 1a5269c0de..bb8a8ff491 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -138,7 +138,7 @@ emit_vertex( struct vbuf_stage *vbuf,
/* Note: we really do want data[0] here, not data[pos]:
*/
vbuf->translate->set_buffer(vbuf->translate, 0, vertex->data[0], 0);
- vbuf->translate->run(vbuf->translate, 0, 1, vbuf->vertex_ptr);
+ vbuf->translate->run(vbuf->translate, 0, 1, 0, vbuf->vertex_ptr);
if (0) draw_dump_emitted_vertex(vbuf->vinfo, (uint8_t *)vbuf->vertex_ptr);
@@ -275,6 +275,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
hw_key.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
hw_key.element[i].input_buffer = src_buffer;
hw_key.element[i].input_offset = src_offset;
+ hw_key.element[i].instance_divisor = 0;
hw_key.element[i].output_format = output_format;
hw_key.element[i].output_offset = dst_offset;