zink: outdent code in add_implicit_color_feedback_loop()

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20674>
This commit is contained in:
Mike Blumenkrantz 2023-01-12 10:17:30 -05:00 committed by Marge Bot
parent 487e5cc781
commit 230a554719

View file

@ -283,25 +283,25 @@ draw(struct zink_context *ctx,
static void
add_implicit_color_feedback_loop(struct zink_context *ctx, struct zink_resource *res)
{
if (res->fb_bind_count && res->sampler_bind_count[0] && (!(ctx->feedback_loops & res->fb_binds))) {
/* new feedback loop detected */
if (res->aspect == VK_IMAGE_ASPECT_COLOR_BIT) {
if (!ctx->gfx_pipeline_state.feedback_loop)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.feedback_loop = true;
} else {
if (!ctx->gfx_pipeline_state.feedback_loop_zs)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.feedback_loop_zs = true;
}
ctx->rp_layout_changed = true;
ctx->feedback_loops |= res->fb_binds;
u_foreach_bit(idx, res->fb_binds) {
if (zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout)
ctx->dynamic_fb.attachments[idx].imageLayout = VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT;
else
ctx->dynamic_fb.attachments[idx].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
}
if (!res->fb_bind_count || !res->sampler_bind_count[0] || ctx->feedback_loops & res->fb_binds)
return;
/* new feedback loop detected */
if (res->aspect == VK_IMAGE_ASPECT_COLOR_BIT) {
if (!ctx->gfx_pipeline_state.feedback_loop)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.feedback_loop = true;
} else {
if (!ctx->gfx_pipeline_state.feedback_loop_zs)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.feedback_loop_zs = true;
}
ctx->rp_layout_changed = true;
ctx->feedback_loops |= res->fb_binds;
u_foreach_bit(idx, res->fb_binds) {
if (zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout)
ctx->dynamic_fb.attachments[idx].imageLayout = VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT;
else
ctx->dynamic_fb.attachments[idx].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
}
}