From 5b0971c64d2b0f1c3aa29bd81b6c3172a52e7408 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 10 Jan 2023 10:51:06 -0500 Subject: [PATCH] zink: set surface->dt when updating swapchain this otherwise re-creates swapchain surfaces on every frame and has a significant perf hit for no reason cc: mesa-stable Part-of: (cherry picked from commit b2739c9f00557347008dfc500dcc584abb81378b) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_surface.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 49b762b..614ba84 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -319,7 +319,7 @@ "description": "zink: set surface->dt when updating swapchain", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c index 0a48d7a..5b53928 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -465,6 +465,7 @@ 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]) { /* no current swapchain imageview exists: create it */ -- 2.7.4