zink: avoid unnecessary resource refs during descriptor update

this was necessary if resources could be on both gfx and compute batches,
but now there's only one type of batch

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9786>
This commit is contained in:
Mike Blumenkrantz 2020-11-30 11:59:28 -05:00 committed by Marge Bot
parent 87de6c3c7d
commit 9871c883cc
1 changed files with 1 additions and 1 deletions

View File

@ -350,7 +350,7 @@ write_descriptors(struct zink_context *ctx, struct zink_descriptor_set *zds, uns
for (int i = 0; zds->pool->key.num_descriptors && i < util_dynarray_num_elements(&zds->barriers, struct zink_descriptor_barrier); ++i) {
struct zink_descriptor_barrier *barrier = util_dynarray_element(&zds->barriers, struct zink_descriptor_barrier, i);
if (need_resource_refs || (ctx->curr_compute && ctx->curr_program))
if (need_resource_refs)
zink_batch_reference_resource_rw(batch, barrier->res, zink_resource_access_is_write(barrier->access));
zink_resource_barrier(ctx, NULL, barrier->res,
barrier->layout, barrier->access, barrier->stage);