draw: setup instance ID for SSE generator

This commit is contained in:
Brian Paul 2010-12-08 19:00:44 -07:00
parent 0be042cb4d
commit 2d62fb6c3f
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}