this avoids a GENERAL/FEEDBACK_LOOP layout transition where possible
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
/* can only feedback loop with fb+sampler bind; image bind must be GENERAL */
if (!res->fb_bind_count || !res->sampler_bind_count[0] || res->image_bind_count[0])
return false;
+ /* if zsbuf isn't used then it effectively has no fb binds */
+ if (!(res->aspect & VK_IMAGE_ASPECT_COLOR_BIT) && !zink_is_zsbuf_used(ctx))
+ return false;
bool is_feedback = false;
/* avoid false positives when a texture is bound but not used */
u_foreach_bit(vkstage, res->gfx_barrier) {