From: Mike Blumenkrantz Date: Tue, 7 Jun 2022 00:54:53 +0000 (-0400) Subject: zink: only update layout when doing mixed zs attachment renderpass check X-Git-Tag: upstream/22.3.5~7792 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb5973a3dd78c540eb799959cdfe0cad890d821d;p=platform%2Fupstream%2Fmesa.git zink: only update layout when doing mixed zs attachment renderpass check avoid doing any sort of extra work here and avoid multi-context weirdness cc: mesa-stable Reviewed-by: Dave Airlie Part-of: --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 4960f9a..e3963ec 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2214,7 +2214,9 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns unsigned find = res->bind_count[0] - res->image_bind_count[0]; 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); + /* only set layout, skip rest of update */ + if (ctx->di.descriptor_res[ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW][i][slot] == res) + ctx->di.textures[i][slot].imageLayout = zink_descriptor_util_image_layout_eval(ctx, res, false); find--; if (!find) break; }