From 263d26202558a503610470209a07850c4ee54152 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 19 Feb 2024 09:21:28 -0500 Subject: [PATCH] zink: also set null fbfetch surfaces when no fb surface is bound if nullDescriptor is supported, of course Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index b5c09172bbe..c52fc83a390 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2643,6 +2643,10 @@ zink_update_fbfetch(struct zink_context *ctx) bool fbfetch_ms = ctx->fb_state.cbufs[0]->texture->nr_samples > 1; if (zink_get_fs_base_key(ctx)->fbfetch_ms != fbfetch_ms) zink_set_fs_base_key(ctx)->fbfetch_ms = fbfetch_ms; + } else { + ctx->di.fbfetch.imageView = zink_screen(ctx->base.screen)->info.rb2_feats.nullDescriptor ? + VK_NULL_HANDLE : + zink_get_dummy_surface(ctx, 0)->image_view; } bool ret = false; ctx->di.fbfetch.imageLayout = VK_IMAGE_LAYOUT_GENERAL;