From 79a4d22928e2b1b3e4a4246384b33c42a14cdb57 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 6 Jan 2023 13:46:37 -0500 Subject: [PATCH] zink: only update framebuffer object during swapchain update if framebuffer exists otherwise this might be randomly creating an unused framebuffer for dynamic render cc: mesa-stable Part-of: --- src/gallium/drivers/zink/zink_render_pass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_render_pass.c b/src/gallium/drivers/zink/zink_render_pass.c index 6a3912fa052..ac134422c5d 100644 --- a/src/gallium/drivers/zink/zink_render_pass.c +++ b/src/gallium/drivers/zink/zink_render_pass.c @@ -835,7 +835,8 @@ zink_render_update_swapchain(struct zink_context *ctx) zink_kopper_fixup_depth_buffer(ctx); if (ctx->fb_state.width != old_w || ctx->fb_state.height != old_h) ctx->scissor_changed = true; - zink_update_framebuffer_state(ctx); + if (ctx->framebuffer) + zink_update_framebuffer_state(ctx); ctx->swapchain_size.width = ctx->swapchain_size.height = 0; } }