Mesa (staging/22.1): zink: unset res->swapchain upon killing a swapchain

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 16:22:55 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 87c3b8df5b11b52dd1d398ef64eb04fc0fc24246
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87c3b8df5b11b52dd1d398ef64eb04fc0fc24246

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>
(cherry picked from commit 23892bff6b4394eb7f445e6eff4d07ea16c1b4ab)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_kopper.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index aa5e1a0e5a5..e3c6a9317f9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1741,7 +1741,7 @@
         "description": "zink: unset res->swapchain upon killing a swapchain",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
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