else if (!zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout &&
layout == VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT)
layout = VK_IMAGE_LAYOUT_GENERAL;
- zink_screen(ctx->base.screen)->image_barrier(ctx, res, layout, access, pipeline);
+ if (res->valid || res->layout != layout)
+ zink_screen(ctx->base.screen)->image_barrier(ctx, res, layout, access, pipeline);
res->obj->unordered_read = res->obj->unordered_write = false;
if (i == ctx->fb_state.nr_cbufs && res->sampler_bind_count[0])
update_res_sampler_layouts(ctx, res);