zink: fixes for flushing clears
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

* immediately terminate renderpass after flushing
this otherwise could persist and trigger a bad state where the
zsbuf is eliminated

* no-op if already in renderpass
this function can be called from within a renderpass, at which time
it should do nothing because clears will be flushed automatically

Fixes: 5de34e47ad6 ("zink: unify/fix clear flushing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37052>
This commit is contained in:
Mike Blumenkrantz 2025-08-28 07:47:56 -04:00 committed by Marge Bot
parent b82e49f644
commit 1d3f52f78f
2 changed files with 5 additions and 8 deletions

View file

@ -132,11 +132,3 @@ wayland-dEQP-EGL.functional.resize.surface_size.grow,Fail
wayland-dEQP-EGL.functional.resize.surface_size.shrink,Fail
wayland-dEQP-EGL.functional.resize.surface_size.stretch_height,Fail
wayland-dEQP-EGL.functional.resize.surface_size.stretch_width,Fail
# Failing since https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37024
# It got merged since this weird job succeeded without running any tests:
# https://gitlab.freedesktop.org/mesa/mesa/-/jobs/83398228
spec@arb_depth_buffer_float@fbo-clear-formats stencil,Fail
spec@arb_depth_buffer_float@fbo-clear-formats stencil@GL_DEPTH32F_STENCIL8,Fail
spec@ext_packed_depth_stencil@fbo-clear-formats stencil,Fail
spec@ext_packed_depth_stencil@fbo-clear-formats stencil@GL_DEPTH_STENCIL,Fail

View file

@ -3384,6 +3384,10 @@ zink_batch_no_rp(struct zink_context *ctx)
static void
zink_flush_clears(struct zink_context *ctx)
{
/* may be called recursively, e.g., from texture_barrier */
if (ctx->in_rp)
return;
struct zink_screen *screen = zink_screen(ctx->base.screen);
bool general_layout = screen->driver_workarounds.general_layout;
bool queries_disabled = ctx->queries_disabled;
@ -3427,6 +3431,7 @@ zink_flush_clears(struct zink_context *ctx)
ctx->blitting = blitting;
if (!blitting)
ctx->fb_state = fb;
zink_batch_no_rp(ctx);
}
static uint32_t