Mesa (gallium-mesa-7.4): util: set vbuf.max_index in draw_vertex_buffer()
Keith Whitwell
keithw at kemper.freedesktop.org
Fri Feb 27 15:22:17 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 1350f2efba5eeceebe0e711db6152c29e9889ce7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1350f2efba5eeceebe0e711db6152c29e9889ce7
Author: Keith Whitwell <keithw at vmware.com>
Date: Fri Feb 27 15:10:11 2009 +0000
util: set vbuf.max_index in draw_vertex_buffer()
---
src/gallium/auxiliary/util/u_draw_quad.c | 2 ++
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 1af5755..16138cc 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.c
+++ b/src/gallium/auxiliary/util/u_draw_quad.c
@@ -52,9 +52,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 */
More information about the mesa-commit
mailing list