aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_vs_sse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_sse.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_sse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c
index dee7c0da9b6..d55b9b08070 100644
--- a/src/gallium/auxiliary/draw/draw_vs_sse.c
+++ b/src/gallium/auxiliary/draw/draw_vs_sse.c
@@ -71,6 +71,12 @@ vs_sse_prepare( struct draw_vertex_shader *base,
struct tgsi_exec_machine *machine = shader->machine;
machine->Samplers = draw->vs.samplers;
+
+ if (base->info.uses_instanceid) {
+ unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID];
+ assert(i < Elements(machine->SystemValue));
+ machine->SystemValue[i][0] = base->draw->instance_id;
+ }
}