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>
This commit is contained in:
Mike Blumenkrantz 2022-05-13 14:23:52 -04:00 committed by Marge Bot
parent fa3d51892a
commit ca915c871f
1 changed files with 2 additions and 2 deletions

View File

@ -342,8 +342,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);