OSDN Git Service

u_primconvert: add primitive restart support
authorDave Airlie <airlied@gmail.com>
Wed, 18 Mar 2015 01:46:45 +0000 (11:46 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Mar 2015 23:46:30 +0000 (09:46 +1000)
commit9d97cd2e3e993658ebe038f4652dc59c3ae56031
treebd9d4bb966d4515aa1c7abe51998a8de540ee086
parent201aef9d1370ff524f856b725d2328c4f48199e8
u_primconvert: add primitive restart support

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.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/indices/u_indices.c
src/gallium/auxiliary/indices/u_indices.h
src/gallium/auxiliary/indices/u_indices_gen.py
src/gallium/auxiliary/indices/u_primconvert.c
src/gallium/auxiliary/indices/u_unfilled_gen.py
src/gallium/auxiliary/indices/u_unfilled_indices.c
src/gallium/drivers/svga/svga_draw_elements.c