Module: Mesa Branch: main Commit: 9e5d927d22203e0dc22aa9b9381e6a9b64500048 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e5d927d22203e0dc22aa9b9381e6a9b64500048
Author: Mike Blumenkrantz <michael.blumenkra...@gmail.com> Date: Mon Apr 19 16:34:56 2021 -0400 zink: remove compute cruft from resource mapping this used to sync the compute batch, now it does nothing Reviewed-by: Dave Airlie <airl...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10707> --- src/gallium/drivers/zink/zink_resource.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 7817003befc..80908a2b195 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -83,14 +83,6 @@ get_resource_usage(struct zink_resource *res) return batch_uses; } -static void -resource_sync_reads(struct zink_context *ctx, struct zink_resource *res) -{ - uint32_t reads = p_atomic_read(&res->obj->reads.usage); - assert(reads); - zink_wait_on_batch(ctx, reads); -} - static void resource_sync_writes_from_batch_usage(struct zink_context *ctx, struct zink_resource *res) { @@ -1043,14 +1035,11 @@ zink_transfer_map(struct pipe_context *pctx, base = map_resource(screen, res); if (!base) return NULL; - /* special case compute reads since they aren't handled by zink_fence_wait() */ - if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_READ)) - resource_sync_reads(ctx, res); if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_RW)) { - if (usage & PIPE_MAP_READ) - resource_sync_writes_from_batch_usage(ctx, res); - else + if (usage & PIPE_MAP_WRITE) zink_fence_wait(pctx); + else + resource_sync_writes_from_batch_usage(ctx, res); } VkImageSubresource isr = { res->aspect, _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit