aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-29 23:21:01 +0100
committerMichal Krol <[email protected]>2009-12-29 23:21:01 +0100
commit7ca0ce38340144794267609646048b3820d594ab (patch)
tree7c31399f0373cb652b682e9af0fedde839d58a77 /src/gallium/auxiliary/draw/draw_pt_fetch_emit.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_pt_fetch_emit.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_emit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
index e7fe6b3b768..40bfc0fbb22 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
@@ -169,6 +169,7 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
key.element[i].input_format = input_format;
key.element[i].input_buffer = input_buffer;
key.element[i].input_offset = input_offset;
+ key.element[i].instance_divisor = src->instance_divisor;
key.element[i].output_format = output_format;
key.element[i].output_offset = dst_offset;
@@ -314,6 +315,7 @@ static void fetch_emit_run_linear( struct draw_pt_middle_end *middle,
feme->translate->run( feme->translate,
start,
count,
+ draw->instance_id,
hw_verts );
if (0) {
@@ -374,6 +376,7 @@ static boolean fetch_emit_run_linear_elts( struct draw_pt_middle_end *middle,
feme->translate->run( feme->translate,
start,
count,
+ draw->instance_id,
hw_verts );
draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) );