st: add early to st_prune_releasebufs
Call it before tc_add_set_vertex_elements_and_buffers_call to
make sure that its use from st_setup_current -> st_add_releasebuf
won't insert calls into the batch.
Fixes: 1638d486 ("gallium/u_threaded,st/mesa: add a merged set_vertex_elements_and_buffers call")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37763>
This commit is contained in:
committed by
Marge Bot
parent
ae75b59cb5
commit
6f241b7f6a
@@ -429,6 +429,14 @@ st_update_array_templ(struct st_context *st,
|
||||
num_vbuffers_tc = util_bitcount_fast<POPCNT>(inputs_read &
|
||||
enabled_arrays);
|
||||
|
||||
/* Call this before tc_add_set_vertex_elements_and_buffers_call to not
|
||||
* insert tc_resource_release calls before tc_set_vertex_elements_for_call
|
||||
* is used.
|
||||
*/
|
||||
if (UPDATE_VELEMS && ALLOW_ZERO_STRIDE_ATTRIBS &&
|
||||
st->release_counter != st->work_counter)
|
||||
st_prune_releasebufs(st);
|
||||
|
||||
/* Add up to 1 vertex buffer for zero-stride vertex attribs. */
|
||||
num_vbuffers_tc += ALLOW_ZERO_STRIDE_ATTRIBS &&
|
||||
inputs_read & ~enabled_arrays;
|
||||
|
||||
Reference in New Issue
Block a user