Mesa (main): zink: don't free non-fbfetch dsl structs when switching to fbfetch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Feb 26 15:37:06 UTC 2022
Module: Mesa
Branch: main
Commit: e1964e1dde7bf44ceeaf3fa8b3869e791af4a369
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1964e1dde7bf44ceeaf3fa8b3869e791af4a369
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Feb 23 13:46:30 2022 -0500
zink: don't free non-fbfetch dsl structs when switching to fbfetch
this triggers invalid access when recycling in-flight non-fbfetch sets
cc: mesa-stable
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15173>
---
src/gallium/drivers/zink/zink_descriptors.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c
index 61da3fda755..118fd9e6e9c 100644
--- a/src/gallium/drivers/zink/zink_descriptors.c
+++ b/src/gallium/drivers/zink/zink_descriptors.c
@@ -1757,8 +1757,9 @@ zink_descriptor_util_init_fbfetch(struct zink_context *ctx)
struct zink_screen *screen = zink_screen(ctx->base.screen);
VKSCR(DestroyDescriptorSetLayout)(screen->dev, ctx->dd->push_dsl[0]->layout, NULL);
- ralloc_free(ctx->dd->push_dsl[0]);
- ralloc_free(ctx->dd->push_layout_keys[0]);
+ //don't free these now, let ralloc free on teardown to avoid invalid access
+ //ralloc_free(ctx->dd->push_dsl[0]);
+ //ralloc_free(ctx->dd->push_layout_keys[0]);
ctx->dd->push_dsl[0] = create_gfx_layout(ctx, &ctx->dd->push_layout_keys[0], true);
ctx->dd->has_fbfetch = true;
if (screen->descriptor_mode != ZINK_DESCRIPTOR_MODE_LAZY)
More information about the mesa-commit
mailing list