From e4da10b4cbbb05bb27fe1b98eff9ce8a6b8ffca7 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Aug 2025 16:07:34 -0400 Subject: [PATCH] tc: add a function to check the internal buffer lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 11 +++++++++++ src/gallium/auxiliary/util/u_threaded_context.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 91d502dcd96..5ec2851f002 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -5696,3 +5696,14 @@ threaded_context_get_renderpass_info(struct threaded_context *tc) info = info->next; } } + +bool +threaded_context_is_buffer_on_busy_list(struct pipe_context *_pipe, struct pipe_resource *resource) +{ + struct threaded_context *tc = threaded_context(_pipe); + struct threaded_resource *tres = threaded_resource(resource); + + assert(resource->target == PIPE_BUFFER); + + return tc_is_buffer_on_busy_list(tc, tres); +} diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h index 8beb9c91e2a..d2da0c631e7 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.h +++ b/src/gallium/auxiliary/util/u_threaded_context.h @@ -869,6 +869,8 @@ tc_set_vertex_elements_for_call(struct pipe_vertex_buffer *buffers, ptr[-1] = state; } +bool +threaded_context_is_buffer_on_busy_list(struct pipe_context *_pipe, struct pipe_resource *resource); #ifdef __cplusplus } #endif