summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_draw_elements.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2015-03-18 11:46:45 +1000
committerDave Airlie <airlied@redhat.com>2015-03-20 09:46:30 +1000
commit9d97cd2e3e993658ebe038f4652dc59c3ae56031 (patch)
treebd9d4bb966d4515aa1c7abe51998a8de540ee086 /src/gallium/drivers/svga/svga_draw_elements.c
parent201aef9d1370ff524f856b725d2328c4f48199e8 (diff)
downloadexternal_mesa3d-9d97cd2e3e993658ebe038f4652dc59c3ae56031.zip
external_mesa3d-9d97cd2e3e993658ebe038f4652dc59c3ae56031.tar.gz
external_mesa3d-9d97cd2e3e993658ebe038f4652dc59c3ae56031.tar.bz2
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>
Diffstat (limited to 'src/gallium/drivers/svga/svga_draw_elements.c')
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index 3384095..038500a 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -70,7 +70,7 @@ translate_indices(struct svga_hwtnl *hwtnl, struct pipe_resource *src,
if (dst_map == NULL)
goto fail;
- translate((const char *) src_map + offset, 0, nr, dst_map);
+ translate((const char *) src_map + offset, 0, 0, nr, 0, dst_map);
pipe_buffer_unmap(pipe, src_transfer);
pipe_buffer_unmap(pipe, dst_transfer);
@@ -153,6 +153,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
count,
hwtnl->api_pv,
hwtnl->hw_pv,
+ PR_DISABLE,
&gen_prim, &gen_size, &gen_nr, &gen_func);
}