Module: Mesa Branch: main Commit: 5ae1c76baa02c17e509854b164491d24ae75bff1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ae1c76baa02c17e509854b164491d24ae75bff1
Author: Mike Blumenkrantz <[email protected]> Date: Thu Jul 14 18:16:36 2022 -0400 zink: flag renderpass change if renderpass clears change Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640> --- src/gallium/drivers/zink/zink_clear.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c index c3d355e1b97..668e53bb513 100644 --- a/src/gallium/drivers/zink/zink_clear.c +++ b/src/gallium/drivers/zink/zink_clear.c @@ -239,6 +239,8 @@ zink_clear(struct pipe_context *pctx, return; } + unsigned rp_clears_enabled = ctx->rp_clears_enabled; + if (ctx->void_clears & buffers) { unsigned void_clears = ctx->void_clears & buffers; ctx->void_clears &= ~buffers; @@ -289,6 +291,7 @@ zink_clear(struct pipe_context *pctx, else ctx->rp_clears_enabled |= (buffers & PIPE_CLEAR_DEPTHSTENCIL); } + ctx->rp_changed |= ctx->rp_clears_enabled != rp_clears_enabled; } static inline bool @@ -593,6 +596,7 @@ fb_clears_apply_internal(struct zink_context *ctx, struct pipe_resource *pres, i void zink_fb_clear_reset(struct zink_context *ctx, unsigned i) { + unsigned rp_clears_enabled = ctx->clears_enabled; util_dynarray_clear(&ctx->fb_clears[i].clears); if (i == PIPE_MAX_COLOR_BUFS) { ctx->clears_enabled &= ~PIPE_CLEAR_DEPTHSTENCIL; @@ -601,6 +605,8 @@ zink_fb_clear_reset(struct zink_context *ctx, unsigned i) ctx->clears_enabled &= ~(PIPE_CLEAR_COLOR0 << i); ctx->rp_clears_enabled &= ~(PIPE_CLEAR_COLOR0 << i); } + if (ctx->rp_clears_enabled != rp_clears_enabled) + ctx->rp_changed = true; } void
