zink: simplify resource_check_defer_buffer_barrier()

this is a remnant of when the function was used for both images
and buffers

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
This commit is contained in:
Mike Blumenkrantz 2023-03-03 07:53:07 -05:00 committed by Marge Bot
parent ca43ecefa4
commit 30d59c469a

View file

@ -3722,8 +3722,8 @@ resource_check_defer_buffer_barrier(struct zink_context *ctx, struct zink_resour
{
assert(res->obj->is_buffer);
if (res->bind_count[0] - res->so_bind_count > 0) {
if ((res->obj->is_buffer && res->vbo_bind_mask && !(pipeline & VK_PIPELINE_STAGE_VERTEX_INPUT_BIT)) ||
((!res->obj->is_buffer || util_bitcount(res->vbo_bind_mask) != res->bind_count[0]) && !is_shader_pipline_stage(pipeline)))
if ((res->vbo_bind_mask && !(pipeline & VK_PIPELINE_STAGE_VERTEX_INPUT_BIT)) ||
(util_bitcount(res->vbo_bind_mask) != res->bind_count[0] && !is_shader_pipline_stage(pipeline)))
/* gfx rebind */
_mesa_set_add(ctx->need_barriers[0], res);
}