zink: don't rely on implicit access for generated barriers

compute shaders will get this wrong, so calculate access manually
using binding info

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>
This commit is contained in:
Mike Blumenkrantz 2022-04-08 10:26:37 -04:00 committed by Marge Bot
parent a72f05ff96
commit 3bd9fcfa3d

View file

@ -402,6 +402,11 @@ update_barriers(struct zink_context *ctx, bool is_compute)
if (res->image_bind_count[is_compute] != res->bind_count[is_compute] ||
res->write_bind_count[is_compute] != res->image_bind_count[is_compute])
access |= VK_ACCESS_SHADER_READ_BIT;
} else {
if (res->bind_count[is_compute] != res->write_bind_count[is_compute])
access |= VK_ACCESS_SHADER_READ_BIT;
if (res->write_bind_count[is_compute])
access |= VK_ACCESS_SHADER_WRITE_BIT;
}
if (is_compute)
pipeline = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;