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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16508>
(cherry picked from commit ca915c871f)
This commit is contained in:
Mike Blumenkrantz 2022-05-13 14:23:52 -04:00 committed by Dylan Baker
parent 8ddded8051
commit 3642934612
2 changed files with 3 additions and 3 deletions

View file

@ -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
},

View file

@ -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);