zink: always check for fb rebinds when starting renderpass

ensure the right image is being used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
This commit is contained in:
Mike Blumenkrantz 2022-04-29 10:52:27 -04:00 committed by Marge Bot
parent 17ac8e7604
commit 9aab9b4a1b
1 changed files with 4 additions and 0 deletions

View File

@ -2235,6 +2235,10 @@ prep_fb_attachments(struct zink_context *ctx, VkImageView *att)
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
struct zink_surface *surf = zink_csurface(ctx->fb_state.cbufs[i]);
struct zink_surface *transient = zink_transient_surface(ctx->fb_state.cbufs[i]);
if (surf && zink_resource(surf->base.texture)->obj != surf->obj) {
zink_resource_rebind(ctx, zink_resource(surf->base.texture));
surf = zink_csurface(ctx->fb_state.cbufs[i]);
}
if (transient) {
att[i] = prep_fb_attachment(ctx, transient, i);
att[i + cresolve_offset] = prep_fb_attachment(ctx, surf, i);