summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_vertex_shader.c
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-04-12 21:52:46 -0400
committerKeith Whitwell <keith@tungstengraphics.com>2008-04-14 11:00:35 +0100
commit3f7a3dd58c0ce2719af83ff1d89a26185d08c04c (patch)
treeefc128ea3e61e6e8ec6d18786590a89761775ffa /src/gallium/auxiliary/draw/draw_vertex_shader.c
parent808f968f3ad0cb32e86f517753d5715d00e9ec2c (diff)
Make shaders operate on a block of memory instead of arrays of vertex_header's
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vertex_shader.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vertex_shader.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vertex_shader.c b/src/gallium/auxiliary/draw/draw_vertex_shader.c
index 726921d77b..452d0175c3 100644
--- a/src/gallium/auxiliary/draw/draw_vertex_shader.c
+++ b/src/gallium/auxiliary/draw/draw_vertex_shader.c
@@ -57,18 +57,17 @@ draw_vertex_shader_queue_flush(struct draw_context *draw)
/* run vertex shader on vertex cache entries, four per invokation */
for (i = 0; i < draw->vs.queue_nr; i += MAX_SHADER_VERTICES) {
- struct vertex_header *dests[MAX_SHADER_VERTICES];
unsigned elts[MAX_SHADER_VERTICES];
int j, n = MIN2(MAX_SHADER_VERTICES, draw->vs.queue_nr - i);
+ struct vertex_header *dests =
+ draw_header_from_block(draw->vs.vertex_cache, i);
for (j = 0; j < n; j++) {
- elts[j] = draw->vs.queue[i + j].elt;
- dests[j] = draw->vs.queue[i + j].vertex;
+ elts[j] = draw->vs.elts[i + j];
}
for ( ; j < MAX_SHADER_VERTICES; j++) {
elts[j] = elts[0];
- dests[j] = draw->vs.queue[i + j].vertex;
}
assert(n > 0);