diff options
author | Brian Paul <[email protected]> | 2011-01-15 10:24:08 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-15 10:24:08 -0700 |
commit | 652901e95b4ed406293d0e1fabee857c054119b1 (patch) | |
tree | a4b40b134f7c6491cd8d9fe37590e99428d8fab5 /src/gallium/auxiliary/draw/draw_vs_exec.c | |
parent | 21001d2ba79be26f565a6795a907ec266564f4cd (diff) | |
parent | b7c38734c9d85f9dad1796d97690be2d9c55c397 (diff) |
Merge branch 'draw-instanced'
Conflicts:
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/glsl/ir_set_program_inouts.cpp
src/mesa/tnl/t_vb_program.c
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_exec.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_exec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c index 667eb507855..c41d7c42a01 100644 --- a/src/gallium/auxiliary/draw/draw_vs_exec.c +++ b/src/gallium/auxiliary/draw/draw_vs_exec.c @@ -99,6 +99,12 @@ vs_exec_run_linear( struct draw_vertex_shader *shader, tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS, constants, const_size); + if (shader->info.uses_instanceid) { + unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID]; + assert(i < Elements(machine->SystemValue)); + machine->SystemValue[i][0] = shader->draw->instance_id; + } + for (i = 0; i < count; i += MAX_TGSI_VERTICES) { unsigned int max_vertices = MIN2(MAX_TGSI_VERTICES, count - i); |