Mesa (main): zink: always check for fb rebinds when starting renderpass
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed May 11 01:43:41 UTC 2022
Module: Mesa
Branch: main
Commit: 9aab9b4a1b2986240da945d73916601aaf09bdef
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9aab9b4a1b2986240da945d73916601aaf09bdef
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Apr 29 10:52:27 2022 -0400
zink: always check for fb rebinds when starting renderpass
ensure the right image is being used
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
---
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 a4362968c2e..5285748e45a 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -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);
More information about the mesa-commit
mailing list