Mesa (main): zink: unset res->swapchain upon killing a swapchain
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 13 20:27:47 UTC 2022
Module: Mesa
Branch: main
Commit: 23892bff6b4394eb7f445e6eff4d07ea16c1b4ab
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23892bff6b4394eb7f445e6eff4d07ea16c1b4ab
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Jun 13 15:04:34 2022 -0400
zink: unset res->swapchain upon killing a swapchain
this otherwise causes the driver to make bad assumptions about
how the resource should be handled
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17009>
---
src/gallium/drivers/zink/zink_kopper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c
index 5b3622248e9..0a68a6158cc 100644
--- a/src/gallium/drivers/zink/zink_kopper.c
+++ b/src/gallium/drivers/zink/zink_kopper.c
@@ -521,6 +521,7 @@ kill_swapchain(struct zink_context *ctx, struct zink_resource *res)
struct pipe_resource *pres = screen->base.resource_create(&screen->base, &res->base.b);
zink_resource_object_reference(screen, &res->obj, zink_resource(pres)->obj);
res->layout = VK_IMAGE_LAYOUT_UNDEFINED;
+ res->swapchain = false;
pipe_resource_reference(&pres, NULL);
}
More information about the mesa-commit
mailing list