diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-18 15:08:19 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-18 15:08:19 -0600 |
commit | f1401385587882bb9d18a5f5b01dcbb71ddf0a2f (patch) | |
tree | 521de15341358b3090369d042fd7e2c7c58a2327 /src/gallium/auxiliary/draw/draw_pipe_vbuf.c | |
parent | 7d7f3e2c9451b2233c196d82d523c50b5d2616cc (diff) |
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.c | 3 |
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 10a1f7df79..a6fde77a0e 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 |