From 2d7dd415067f6a2af2a8149e4ac693443a23dfe2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 11 Sep 2025 13:26:13 -0400 Subject: [PATCH] tc: eliminate refcounting for set_shader_buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this is no longer necessary Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index e16f87b268e..68ad8f022e1 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2091,7 +2091,6 @@ static uint16_t ALWAYS_INLINE tc_call_set_shader_buffers(struct pipe_context *pipe, void *call) { struct tc_shader_buffers *p = (struct tc_shader_buffers *)call; - unsigned count = p->count; if (p->unbind) { pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, NULL, 0); @@ -2101,9 +2100,6 @@ tc_call_set_shader_buffers(struct pipe_context *pipe, void *call) pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, p->slot, p->writable_bitmask); - for (unsigned i = 0; i < count; i++) - tc_drop_resource_reference(p->slot[i].buffer); - return p->base.num_slots; } @@ -2135,9 +2131,7 @@ tc_set_shader_buffers(struct pipe_context *_pipe, struct pipe_shader_buffer *dst = &p->slot[i]; const struct pipe_shader_buffer *src = buffers + i; - tc_set_resource_reference(&dst->buffer, src->buffer); - dst->buffer_offset = src->buffer_offset; - dst->buffer_size = src->buffer_size; + *dst = *src; if (src->buffer) { struct threaded_resource *tres = threaded_resource(src->buffer);