From 707d2e8b3e53c761720adaca7137b242dff344b6 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 9 Apr 2017 15:57:45 +0200 Subject: gallium: fold u_trim_pipe_prim call from st/mesa to drivers Most drivers don't need it and shouldn't need it because it can't be used in some cases (indirect draws, primitive restart, count from streamout). Reviewed-by: Brian Paul --- src/gallium/drivers/r300/r300_render.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/r300/r300_render.c') diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index ad0f4896172..9702a2e32ed 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -847,6 +847,9 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe, return; } + if (!u_trim_pipe_prim(info->mode, (unsigned*)&info->count)) + return; + r300_update_derived_state(r300); draw_vbo(r300->draw, info); -- cgit v1.2.3