From 36429346129e3484ce8973b1c7b588c74ec79fe0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 13 May 2022 14:23:52 -0400 Subject: [PATCH] zink: directly reuse surface ivci when rebinding this is simpler and also fixes rebinding samplerviews which use a levelCount > 1 cc: mesa-stable Reviewed-by: Dave Airlie Part-of: (cherry picked from commit ca915c871fb6c489c32c25d08626997d5ffc0196) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_surface.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0400d10c092..7a99f0d157f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -517,7 +517,7 @@ "description": "zink: directly reuse surface ivci when rebinding", "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 361affcc874..adbfba22fb2 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -373,8 +373,8 @@ zink_rebind_surface(struct zink_context *ctx, struct pipe_surface **psurface) if (surface->simage_view) return false; assert(!res->obj->dt); - VkImageViewCreateInfo ivci = create_ivci(screen, - zink_resource((*psurface)->texture), (*psurface), surface->base.texture->target); + VkImageViewCreateInfo ivci = surface->ivci; + ivci.image = res->obj->image; uint32_t hash = hash_ivci(&ivci); simple_mtx_lock(&res->surface_mtx);