zink: trigger multi-context buffer invalidate on internal buffer invalidate

this is the same as zink_context_replace_buffer_storage()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit dedfb5ef78)
This commit is contained in:
Mike Blumenkrantz 2025-07-30 13:41:58 -04:00 committed by Eric Engestrom
parent 73e06731df
commit b537520197
2 changed files with 3 additions and 2 deletions

View file

@ -7814,7 +7814,7 @@
"description": "zink: trigger multi-context buffer invalidate on internal buffer invalidate",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -2161,7 +2161,8 @@ invalidate_buffer(struct zink_context *ctx, struct zink_resource *res)
res->queue = VK_QUEUE_FAMILY_IGNORED;
if (needs_bda)
zink_resource_get_address(screen, res);
zink_resource_rebind(ctx, res);
if (!zink_resource_rebind(ctx, res))
ctx->buffer_rebind_counter = p_atomic_inc_return(&screen->buffer_rebind_counter);
return true;
}