diff options
author | Brian Paul <brianp@vmware.com> | 2010-12-08 19:00:44 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-12-08 19:00:44 -0700 |
commit | 2d62fb6c3f7dd7261513253767cc63ff00fad9bb (patch) | |
tree | da1de221ad5ab43d562bcc2ddaa7e2a87e4ee94f /src/gallium/auxiliary | |
parent | 0be042cb4d256393750f7060d79bdaa2cd47d72e (diff) |
draw: setup instance ID for SSE generator
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_sse.c | 6 |
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 0b0c6077c6..672efe25cc 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; + } } |