From 0f4c3cb05c02c244fb782d75196ff07b42d475fc Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 8 Mar 2023 15:06:49 -0500 Subject: [PATCH] aux/tc: fix renderpass splitting on flush MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it's expected that a driver won't immediately trigger a deferred flush if a fence is present, so don't split the renderpass in this case since that breaks everything Fixes: 07017aa137b ("util/tc: implement renderpass tracking") Acked-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 495fe501cae..ce069f2c4fd 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -3437,7 +3437,8 @@ tc_flush(struct pipe_context *_pipe, struct pipe_fence_handle **fence, bool async = flags & (PIPE_FLUSH_DEFERRED | PIPE_FLUSH_ASYNC); bool deferred = (flags & PIPE_FLUSH_DEFERRED) > 0; - tc->in_renderpass = false; + if (!deferred || !fence) + tc->in_renderpass = false; if (async && tc->options.create_fence) { if (fence) {