projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
691048a
)
draw: setup instance ID for VS interpreter
author
Brian Paul
<brianp@vmware.com>
Thu, 9 Dec 2010 02:00:32 +0000
(19:00 -0700)
committer
Brian Paul
<brianp@vmware.com>
Thu, 9 Dec 2010 02:00:32 +0000
(19:00 -0700)
src/gallium/auxiliary/draw/draw_vs_exec.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/draw/draw_vs_exec.c
b/src/gallium/auxiliary/draw/draw_vs_exec.c
index dab3eb1ca8eab68eca95182e966175d72770a998..08608b480e03f3617ef6f980efab08f93d8bcc96 100644
(file)
--- 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);