Mesa (staging/22.1): zink: directly reuse surface ivci when rebinding
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 16 17:21:02 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 36429346129e3484ce8973b1c7b588c74ec79fe0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36429346129e3484ce8973b1c7b588c74ec79fe0
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>
(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);
More information about the mesa-commit
mailing list