summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-02-27 15:10:11 +0000
committerKeith Whitwell <[email protected]>2009-02-27 15:30:34 +0000
commitb747e1dec4a2999412ee25371994a07a4bed900e (patch)
treeff9b983c48f2f638a6d9888ff4c25a3f474ac27f /src/gallium
parenta321b8ed6ea583f43f8d5ab5d1b918a96df44f1d (diff)
util: set vbuf.max_index in draw_vertex_buffer()
(cherry picked from commit 1350f2efba5eeceebe0e711db6152c29e9889ce7)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_draw_quad.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c
index f282f3d2891..f0bcd758999 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.c
+++ b/src/gallium/auxiliary/util/u_draw_quad.c
@@ -51,9 +51,11 @@ util_draw_vertex_buffer(struct pipe_context *pipe,
assert(num_attribs <= PIPE_MAX_ATTRIBS);
/* tell pipe about the vertex buffer */
+ memset(&vbuffer, 0, sizeof(vbuffer));
vbuffer.buffer = vbuf;
vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */
vbuffer.buffer_offset = offset;
+ vbuffer.max_index = num_verts - 1;
pipe->set_vertex_buffers(pipe, 1, &vbuffer);
/* tell pipe about the vertex attributes */