From 9bcc72c2361a2897bf542be656e7604c47f4b96f Mon Sep 17 00:00:00 2001 From: alexvorxx Date: Wed, 11 Jan 2023 18:55:31 +0300 Subject: [PATCH] zink: set surface->dt when updating swapchain Apply commit https://gitlab.freedesktop.org/mesa/mesa/-/commit/b2739c9f00557347008dfc500dcc584abb81378b Maybe improve performance: "this otherwise re-creates swapchain surfaces on every frame and has a significant perf hit for no reason" --- src/gallium/drivers/zink/zink_surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c index bd29f53..ce22662 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -439,6 +439,8 @@ zink_surface_swapchain_update(struct zink_context *ctx, struct zink_surface *sur surface->base.width = res->base.b.width0; surface->base.height = res->base.b.height0; init_surface_info(surface, res, &surface->ivci); + + surface->dt = res->obj->dt; } if (!surface->swapchain[res->obj->dt_idx]) { assert(res->obj->image && cdt->swapchain->images[res->obj->dt_idx] == res->obj->image);