From 960a6316d4f817ed20ea261e6f10baf22bc9abbd Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 11 Jul 2022 21:49:55 -0400 Subject: [PATCH] zink: use sampler_bind_count to simplify some code Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 92f28dcbf32..82e9dc9ba97 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2354,8 +2354,8 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns layout = zink_render_pass_attachment_get_barrier_info(&rt, i < ctx->fb_state.nr_cbufs, &pipeline, &access); } zink_resource_image_barrier(ctx, res, layout, access, pipeline); - if (i == ctx->fb_state.nr_cbufs && res->bind_count[0] && res->bind_count[0] != res->image_bind_count[0]) { - unsigned find = res->bind_count[0] - res->image_bind_count[0]; + if (i == ctx->fb_state.nr_cbufs && res->sampler_bind_count[0]) { + unsigned find = res->sampler_bind_count[0]; for (unsigned i = 0; find && i < PIPE_SHADER_COMPUTE; i++) { u_foreach_bit(slot, res->sampler_binds[i]) { /* only set layout, skip rest of update */