Module: Mesa Branch: main Commit: 0f4c3cb05c02c244fb782d75196ff07b42d475fc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f4c3cb05c02c244fb782d75196ff07b42d475fc
Author: Mike Blumenkrantz <[email protected]> Date: Wed Mar 8 15:06:49 2023 -0500 aux/tc: fix renderpass splitting on flush 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800> --- 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) {
