diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2023-07-13 10:33:58 -0400 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-07-21 18:08:13 +0100 |
commit | d55b6ae40d8678cb03accb6b2ee6797417e2f5f7 (patch) | |
tree | fdf17915c7c0d89aad1e3ae80f4c075e06949fd5 | |
parent | 186da6f7db6236907cb2b9f1408d6c87ac69c355 (diff) | |
download | mesa-d55b6ae40d8678cb03accb6b2ee6797417e2f5f7.tar.gz mesa-d55b6ae40d8678cb03accb6b2ee6797417e2f5f7.tar.bz2 mesa-d55b6ae40d8678cb03accb6b2ee6797417e2f5f7.zip |
zink: be even dumber about buffer refs when replacing storage
these extra checks can cause issues when multiple contexts and transfer
ops are involved
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24141>
(cherry picked from commit d744bb5bfc4b347adeb9afb1a806e5d4ea7e634f)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_context.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json index 5e19e48cbdf..ad92b02e61b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -337,7 +337,7 @@ "description": "zink: be even dumber about buffer refs when replacing storage", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index de1a93f3523..d928a9bf555 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -4706,9 +4706,7 @@ zink_context_replace_buffer_storage(struct pipe_context *pctx, struct pipe_resou assert(d->obj); assert(s->obj); util_idalloc_mt_free(&screen->buffer_ids, delete_buffer_id); - /* add a ref just like check_resource_for_batch_ref() would've */ - if (zink_resource_has_binds(d) && zink_resource_has_usage(d)) - zink_batch_reference_resource(&ctx->batch, d); + zink_batch_reference_resource(&ctx->batch, d); /* don't be too creative */ zink_resource_object_reference(screen, &d->obj, s->obj); d->valid_buffer_range = s->valid_buffer_range; |