summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_vertex_shader.c
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-04-14 12:27:24 -0400
committerZack Rusin <zack@tungstengraphics.com>2008-04-14 12:27:24 -0400
commite3309197855b5caf7c4c167d1e7beedf33ed2fdd (patch)
tree62da46cce8915788cc5a1370c717f9e85a30b4e4 /src/gallium/auxiliary/draw/draw_vertex_shader.c
parent871d39ec8c168fa58d8758013e99da63fa58111d (diff)
pass vertex size to shaders so that callee can decide on the size
of the vertices and not always have to use the maximum vertex allocation size for them
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vertex_shader.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vertex_shader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vertex_shader.c b/src/gallium/auxiliary/draw/draw_vertex_shader.c
index 452d0175c3..8572a6d40c 100644
--- a/src/gallium/auxiliary/draw/draw_vertex_shader.c
+++ b/src/gallium/auxiliary/draw/draw_vertex_shader.c
@@ -60,7 +60,8 @@ draw_vertex_shader_queue_flush(struct draw_context *draw)
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);
+ draw_header_from_block(draw->vs.vertex_cache,
+ MAX_VERTEX_ALLOCATION, i);
for (j = 0; j < n; j++) {
elts[j] = draw->vs.elts[i + j];
@@ -73,7 +74,7 @@ draw_vertex_shader_queue_flush(struct draw_context *draw)
assert(n > 0);
assert(n <= MAX_SHADER_VERTICES);
- shader->run(shader, draw, elts, n, dests);
+ shader->run(shader, draw, elts, n, dests, MAX_VERTEX_ALLOCATION);
}
draw->vs.post_nr = draw->vs.queue_nr;