u_primconvert: add primitive restart support

Graphics / Mesa 3D Graphics Library / Mesa - Dave Airlie [gmail.com] - 19 March 2015 18:46 UTC

This add primitive restart support to the prim conversion.

This involves changing the API for the translate functions as we need to pass the prim restart index and the original number of indices into the translate functions.

primitive restart is support for quads, quad strips and polygons.

This deal with the case where the actual number of output primitives is less than the initially calculated number, by filling the rest of the output primitives with the restart index, the other option is to reduce the output prim number, but that will make the generator code a bit messier.

9d97cd2 u_primconvert: add primitive restart support
src/gallium/auxiliary/indices/u_indices.c | 36 ++--
src/gallium/auxiliary/indices/u_indices.h | 9 +-
src/gallium/auxiliary/indices/u_indices_gen.py | 198 ++++++++++++++------
src/gallium/auxiliary/indices/u_primconvert.c | 6 +-
src/gallium/auxiliary/indices/u_unfilled_gen.py | 20 +-
src/gallium/auxiliary/indices/u_unfilled_indices.c | 18 +-
src/gallium/drivers/svga/svga_draw_elements.c | 3 +-
7 files changed, 203 insertions(+), 87 deletions(-)

Upstream: cgit.freedesktop.org


  • Share