Mesa (main): zink: break out of zs mixed layout update loop when work is done

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 03:05:35 UTC 2022


Module: Mesa
Branch: main
Commit: 8f9c21b15edf82225916b2db186538d7f8836944
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f9c21b15edf82225916b2db186538d7f8836944

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Jun  6 20:54:25 2022 -0400

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

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900>

---

 src/gallium/drivers/zink/zink_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index a05a6b09c73..4960f9aa650 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -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--;



More information about the mesa-commit mailing list