gallium/u_threaded: fix draw_vertex_state with multi draws
authorMarek Olšák <marek.olsak@amd.com>
Wed, 6 Oct 2021 20:25:39 +0000 (16:25 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 8 Oct 2021 02:31:30 +0000 (02:31 +0000)
It caused an assertion failure in debug builds and a GPU hang in release
builds.

Fixes: 0842488859e - gallium/u_threaded: implement draw_vertex_state
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5457

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235>

src/gallium/auxiliary/util/u_threaded_context.c

index 1b4aaf2..8eb7f86 100644 (file)
@@ -3490,6 +3490,7 @@ tc_draw_vertex_state(struct pipe_context *_pipe,
          p->state = state;
 
       take_vertex_state_ownership = false;
+      p->partial_velem_mask = partial_velem_mask;
       p->info.mode = info.mode;
       p->info.take_vertex_state_ownership = false;
       p->num_draws = dr;