Module: Mesa Branch: main Commit: e3f0eaf5f9cd1ba8d081ae09a6411e8217d1adae URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3f0eaf5f9cd1ba8d081ae09a6411e8217d1adae
Author: Mike Blumenkrantz <[email protected]> Date: Wed Mar 15 18:48:22 2023 -0400 zink: disable queries when flushing clears from set_fb this otherwise has weird side effects, especially with rp optimizing enabled Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800> --- src/gallium/drivers/zink/zink_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 56ede69c621..d58434e3174 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3277,8 +3277,12 @@ zink_set_framebuffer_state(struct pipe_context *pctx, } if (ctx->fb_state.zsbuf != state->zsbuf) flush_clears |= zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS); - if (flush_clears) + if (flush_clears) { + bool queries_disabled = ctx->queries_disabled; + ctx->queries_disabled = true; zink_batch_rp(ctx); + ctx->queries_disabled = queries_disabled; + } for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) { struct pipe_surface *psurf = ctx->fb_state.cbufs[i]; if (i < state->nr_cbufs)
