gallium/u_threaded: skip refcounting only once
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 12 Apr 2021 08:56:27 +0000 (10:56 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 14 Apr 2021 05:50:20 +0000 (07:50 +0200)
commit15e24850b77c373c97d4f4b654d67d28807a70a7
tree641cff169b90b73026a5027f129cfce5a69ccf79
parent165a69d2f74aefe80b070209e77950446a97c8b5
gallium/u_threaded: skip refcounting only once

If info->take_index_buffer_ownership is true we can skip
refcounting but only for the first iteration of the loop.
The next iterations have to use tc_set_resource_reference.

Fixes: 363c1ef0c0e ("gallium/u_threaded: split draws that don't fit in a batch")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10171>
src/gallium/auxiliary/util/u_threaded_context.c