vbo/dlist: add vertices to incomplete primitives
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 3 Jan 2022 09:55:38 +0000 (10:55 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jan 2022 08:45:05 +0000 (08:45 +0000)
commitdcbf2423d284b7bf2d0dc3e622c73de00c7d5bf4
treee93ed138edea1b27123a927d0eadc1b6b5a11fd5
parent7a1d3d3abc5366ea75e2b159cd2e46c4b7ea815c
vbo/dlist: add vertices to incomplete primitives

If a primitive is added with missing vertices, this will shift all
the vertices and produce incorrect rendering.

In issue #5786 the app uses GL_LINE_STRIPS with a single vertex.

Adding extra vertices can make the initial estimation for the index
buffer size incorrect, so this buffer can now be growed if needed.

Fixes: ac3d4c7635b ("vbo/dlist: convert LINE_STRIPS to LINES")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5786
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14243>
src/mesa/vbo/vbo_save_api.c