summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-18 15:08:19 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-18 15:08:19 -0600
commitf1401385587882bb9d18a5f5b01dcbb71ddf0a2f (patch)
tree521de15341358b3090369d042fd7e2c7c58a2327 /src/gallium/auxiliary/draw/draw_pipe_vbuf.c
parent7d7f3e2c9451b2233c196d82d523c50b5d2616cc (diff)
downloadexternal_mesa3d-f1401385587882bb9d18a5f5b01dcbb71ddf0a2f.zip
external_mesa3d-f1401385587882bb9d18a5f5b01dcbb71ddf0a2f.tar.gz
external_mesa3d-f1401385587882bb9d18a5f5b01dcbb71ddf0a2f.tar.bz2
gallium: additional fixes to ensure even number of vertices per buffer
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_vbuf.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_vbuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index 10a1f7d..a6fde77 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -390,6 +390,9 @@ vbuf_alloc_vertices( struct vbuf_stage *vbuf )
/* Allocate a new vertex buffer */
vbuf->max_vertices = vbuf->render->max_vertex_buffer_bytes / vbuf->vertex_size;
+ /* even number */
+ vbuf->max_vertices = vbuf->max_vertices & ~1;
+
/* Must always succeed -- driver gives us a
* 'max_vertex_buffer_bytes' which it guarantees it can allocate,
* and it will flush itself if necessary to do so. If this does