Mesa (master): draw: setup instance ID for VS interpreter
Brian Paul
brianp at kemper.freedesktop.org
Sat Jan 15 17:25:56 UTC 2011
Module: Mesa
Branch: master
Commit: 0be042cb4d256393750f7060d79bdaa2cd47d72e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0be042cb4d256393750f7060d79bdaa2cd47d72e
Author: Brian Paul <brianp at vmware.com>
Date: Wed Dec 8 19:00:32 2010 -0700
draw: setup instance ID for VS interpreter
---
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 dab3eb1..08608b4 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);
More information about the mesa-commit
mailing list