From 84bcdc521dccfc61ba811a2d3138c1fc106d68e3 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 12 May 2023 12:10:27 -0400 Subject: [PATCH] zink: use batch usage function for a simple case no functional changes Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index c87cce7..455655a 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -101,7 +101,7 @@ check_resource_for_batch_ref(struct zink_context *ctx, struct zink_resource *res * - if tracking will be added here, also reapply usage to avoid dangling usage once tracking is removed * TODO: somehow fix this for perf because it's an extra hash lookup */ - if (!res->obj->dt && (res->obj->bo->reads || res->obj->bo->writes)) + if (!res->obj->dt && zink_resource_has_usage(res)) zink_batch_reference_resource_rw(&ctx->batch, res, !!res->obj->bo->writes); else zink_batch_reference_resource(&ctx->batch, res); -- 2.7.4