mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 12:50:25 +01:00
zink: add a batch ref for committed sparse resources
this ensures that the sparse commit will complete before the resource
is destroyed
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29123>
(cherry picked from commit 67a356742f)
This commit is contained in:
parent
57a534364f
commit
fe050bd235
2 changed files with 5 additions and 2 deletions
|
|
@ -304,7 +304,7 @@
|
|||
"description": "zink: add a batch ref for committed sparse resources",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -4860,8 +4860,11 @@ zink_resource_commit(struct pipe_context *pctx, struct pipe_resource *pres, unsi
|
|||
VkSemaphore sem = VK_NULL_HANDLE;
|
||||
bool ret = zink_bo_commit(ctx, res, level, box, commit, &sem);
|
||||
if (ret) {
|
||||
if (sem)
|
||||
if (sem) {
|
||||
zink_batch_add_wait_semaphore(&ctx->batch, sem);
|
||||
zink_batch_reference_resource_rw(&ctx->batch, res, true);
|
||||
ctx->batch.has_work = true;
|
||||
}
|
||||
} else {
|
||||
check_device_lost(ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue