From 87b57aa30f5cb6069e23bbe1a2cfd558b1a119cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 21 Nov 2020 22:19:46 -0500 Subject: [PATCH] gallium/u_threaded: clear vertices_per_patch if prim type != PATCHES We use memcmp when combining back-to-back draws into a multi draw. Clear vertices_per_patch if it's irrelevant to help memcmp return a match. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 4b60cc7b2a2..c654d633b19 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -105,6 +105,9 @@ simplify_draw_info(struct pipe_draw_info *info) /* This shouldn't be set when merging single draws. */ info->increment_draw_id = false; + if (info->mode != PIPE_PRIM_PATCHES) + info->vertices_per_patch = 0; + if (info->index_size) { if (!info->primitive_restart) info->restart_index = 0;