Mesa (staging/22.0): zink: unset resource layout+access when doing storage setup
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 6 21:00:59 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 9b7a9e1e8d73a792003ef62754625db26be37e20
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b7a9e1e8d73a792003ef62754625db26be37e20
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Apr 5 12:09:02 2022 -0400
zink: unset resource layout+access when doing storage setup
the previous access info is transferred to the staging resource for the copy,
and the new image has no access info
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
(cherry picked from commit f05d0f123881116e8ecbc20130bdc5818db0e5dc)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_resource.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index d92aca1f02c..f34a4a97223 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -164,7 +164,7 @@
"description": "zink: unset resource layout+access when doing storage setup",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"because_sha": null
},
{
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 5ad74a32d4a..863db67acbe 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1809,6 +1809,10 @@ zink_resource_object_init_storage(struct zink_context *ctx, struct zink_resource
}
struct zink_resource staging = *res;
staging.obj = old_obj;
+ staging.all_binds = 0;
+ res->layout = VK_IMAGE_LAYOUT_UNDEFINED;
+ res->obj->access = 0;
+ res->obj->access_stage = 0;
bool needs_unref = true;
if (zink_resource_has_usage(res)) {
zink_batch_reference_resource_move(&ctx->batch, res);
More information about the mesa-commit
mailing list