zink: fix shader read access removal for barrier generation

barrier access is based on total binds per gfx/compute, not per stage

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522>
This commit is contained in:
Mike Blumenkrantz 2023-02-24 11:03:57 -05:00 committed by Marge Bot
parent 00288d4f53
commit ddb116d755

View file

@ -1506,8 +1506,9 @@ zink_set_constant_buffer(struct pipe_context *pctx,
ALWAYS_INLINE static void
unbind_descriptor_reads(struct zink_resource *res, gl_shader_stage pstage)
{
if (!res->sampler_binds[pstage] && !res->image_binds[pstage])
res->barrier_access[pstage == MESA_SHADER_COMPUTE] &= ~VK_ACCESS_SHADER_READ_BIT;
bool is_compute = pstage == MESA_SHADER_COMPUTE;
if (!res->sampler_bind_count[is_compute] && !res->image_bind_count[is_compute])
res->barrier_access[is_compute] &= ~VK_ACCESS_SHADER_READ_BIT;
}
ALWAYS_INLINE static void