zink: break out of zs mixed layout update loop when work is done

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900>
This commit is contained in:
Mike Blumenkrantz 2022-06-06 20:54:25 -04:00 committed by Marge Bot
parent ffb0c97caf
commit 8f9c21b15e
1 changed files with 1 additions and 1 deletions

View File

@ -2212,7 +2212,7 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
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];
for (unsigned i = 0; i < PIPE_SHADER_COMPUTE; i++) {
for (unsigned i = 0; find && i < PIPE_SHADER_COMPUTE; i++) {
u_foreach_bit(slot, res->sampler_binds[i]) {
update_descriptor_state_sampler(ctx, i, slot, res);
find--;