zink: also set null fbfetch surfaces when no fb surface is bound

if nullDescriptor is supported, of course

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
This commit is contained in:
Mike Blumenkrantz 2024-02-19 09:21:28 -05:00 committed by Marge Bot
parent f3347a4603
commit 263d262025

View file

@ -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;