aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-03-18 11:46:45 +1000
committerDave Airlie <[email protected]>2015-03-20 09:46:30 +1000
commit9d97cd2e3e993658ebe038f4652dc59c3ae56031 (patch)
treebd9d4bb966d4515aa1c7abe51998a8de540ee086 /src/gallium/drivers/svga
parent201aef9d1370ff524f856b725d2328c4f48199e8 (diff)
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-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 3384095e6f5..038500a35bd 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);
}