Mesa (main): zink: directly reuse surface ivci when rebinding

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun May 15 19:55:56 UTC 2022


Module: Mesa
Branch: main
Commit: ca915c871fb6c489c32c25d08626997d5ffc0196
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca915c871fb6c489c32c25d08626997d5ffc0196

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May 13 14:23:52 2022 -0400

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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16508>

---

 src/gallium/drivers/zink/zink_surface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c
index b4fab44338a..5e52c251b1a 100644
--- a/src/gallium/drivers/zink/zink_surface.c
+++ b/src/gallium/drivers/zink/zink_surface.c
@@ -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);



More information about the mesa-commit mailing list