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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
This commit is contained in:
Mike Blumenkrantz 2022-04-05 12:09:02 -04:00 committed by Marge Bot
parent 65394fcaef
commit f05d0f1238

View file

@ -1828,6 +1828,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);