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 <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7679>
This commit is contained in:
Marek Olšák 2020-11-21 22:19:46 -05:00
parent 375453bb8b
commit 87b57aa30f

View file

@ -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;