diff options
author | Brian Paul <[email protected]> | 2015-10-31 07:02:36 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-11-04 11:51:59 -0700 |
commit | bdf6cef0333bf7278e2e2347aaae399288e87dcd (patch) | |
tree | 7cc7adc6254eff9aa5d803a0d5533c22d551115a /src/mesa/vbo/vbo_exec_draw.c | |
parent | d31481e70ab0da293d4c3010815f643f161b7168 (diff) |
vbo: fix another GL_LINE_LOOP bug
Very long line loops which spanned 3 or more vertex buffers were not
handled correctly and could result in stray lines.
The piglit lineloop test draws 10000 vertices by default, and is not
long enough to trigger this. Even 'lineloop -count 100000' doesn't
trigger the bug.
For future reference, the issue can be reproduced by changing Mesa's
VBO_VERT_BUFFER_SIZE to 4096 and changing the piglit lineloop test to
use glVertex2f(), draw 3 loops instead of 1, and specifying -count
1023.
Acked-by: Sinclair Yeh <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index ed5d9e947b0..0d42618f246 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -117,6 +117,7 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) * subtract one from last_prim->start) so that we copy the 0th vertex * to the next vertex buffer. */ + assert(last_prim->start > 0); src -= sz; } /* fall-through */ |