Module: Mesa Branch: main Commit: 28496f6ff21584766012a696b885dd4a1b4da73f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28496f6ff21584766012a696b885dd4a1b4da73f
Author: Mike Blumenkrantz <[email protected]> Date: Fri May 7 08:52:50 2021 -0400 zink: remove no-longer-used resource helper functions Acked-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437> --- src/gallium/drivers/zink/zink_resource.c | 36 -------------------------------- src/gallium/drivers/zink/zink_resource.h | 3 --- 2 files changed, 39 deletions(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 6e26d5118e9..ce2c6b37c80 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -87,14 +87,6 @@ get_resource_usage(struct zink_resource *res) return batch_uses; } -static void -resource_sync_writes_from_batch_usage(struct zink_context *ctx, struct zink_resource *res) -{ - uint32_t writes = p_atomic_read(&res->obj->writes.usage); - - zink_wait_on_batch(ctx, writes); -} - static uint32_t mem_hash(const void *key) { @@ -812,34 +804,6 @@ init_mem_range(struct zink_screen *screen, struct zink_resource *res, VkDeviceSi return range; } -bool -zink_resource_has_curr_read_usage(struct zink_context *ctx, struct zink_resource *res) -{ - return res->obj->reads.usage == ctx->curr_batch; -} - -static uint32_t -get_most_recent_access(struct zink_resource *res, enum zink_resource_access flags) -{ - uint32_t usage[3]; // read, write, failure - uint32_t latest = ARRAY_SIZE(usage) - 1; - usage[latest] = 0; - - if (flags & ZINK_RESOURCE_ACCESS_READ) { - usage[0] = p_atomic_read(&res->obj->reads.usage); - if (usage[0] > usage[latest]) { - latest = 0; - } - } - if (flags & ZINK_RESOURCE_ACCESS_WRITE) { - usage[1] = p_atomic_read(&res->obj->writes.usage); - if (usage[1] > usage[latest]) { - latest = 1; - } - } - return usage[latest]; -} - static void * map_resource(struct zink_screen *screen, struct zink_resource *res) { diff --git a/src/gallium/drivers/zink/zink_resource.h b/src/gallium/drivers/zink/zink_resource.h index 24d5b7631ab..c64e5d59ea5 100644 --- a/src/gallium/drivers/zink/zink_resource.h +++ b/src/gallium/drivers/zink/zink_resource.h @@ -152,9 +152,6 @@ zink_resource_setup_transfer_layouts(struct zink_context *ctx, struct zink_resou bool zink_resource_has_usage(struct zink_resource *res, enum zink_resource_access usage); -bool -zink_resource_has_curr_read_usage(struct zink_context *ctx, struct zink_resource *res); - void zink_destroy_resource_object(struct zink_screen *screen, struct zink_resource_object *resource_object); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
