diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index d73aedcf708..227175b2ce8 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -3473,8 +3473,8 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, cmd->state.dirty |= TU_CMD_DIRTY_PER_VIEW_VIEWPORT; } - if (gfx_pipeline->feedback_loop_ds != cmd->state.pipeline_feedback_loop_ds) { - cmd->state.pipeline_feedback_loop_ds = gfx_pipeline->feedback_loop_ds; + if (gfx_pipeline->feedback_loops != cmd->state.pipeline_feedback_loops) { + cmd->state.pipeline_feedback_loops = gfx_pipeline->feedback_loops; cmd->state.dirty |= TU_CMD_DIRTY_LRZ; } } @@ -4974,7 +4974,7 @@ tu6_build_depth_plane_z_mode(struct tu_cmd_buffer *cmd, struct tu_cs *cs) const struct tu_subpass *subpass = cmd->state.subpass; if ((fs->variant->has_kill || - cmd->state.pipeline_feedback_loop_ds) && + (cmd->state.pipeline_feedback_loops & VK_IMAGE_ASPECT_DEPTH_BIT)) && (depth_write || stencil_write)) { zmode = (cmd->state.lrz.valid && cmd->state.lrz.enabled) ? A6XX_EARLY_LRZ_LATE_Z diff --git a/src/freedreno/vulkan/tu_cmd_buffer.h b/src/freedreno/vulkan/tu_cmd_buffer.h index 97b5d3f7eb1..2516704c469 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.h +++ b/src/freedreno/vulkan/tu_cmd_buffer.h @@ -505,11 +505,11 @@ struct tu_cmd_state bool blend_reads_dest; bool stencil_front_write; bool stencil_back_write; - bool pipeline_feedback_loop_ds; bool pipeline_sysmem_single_prim_mode; bool pipeline_has_tess; bool pipeline_has_gs; bool pipeline_disable_gmem; + VkImageAspectFlags pipeline_feedback_loops; bool pipeline_blend_lrz, pipeline_bandwidth; uint32_t pipeline_draw_states; diff --git a/src/freedreno/vulkan/tu_pipeline.cc b/src/freedreno/vulkan/tu_pipeline.cc index f539cdd31c3..e39b3af99d2 100644 --- a/src/freedreno/vulkan/tu_pipeline.cc +++ b/src/freedreno/vulkan/tu_pipeline.cc @@ -3870,12 +3870,8 @@ tu_pipeline_builder_build(struct tu_pipeline_builder *builder, &gfx_pipeline->sample_locations; vk_dynamic_graphics_state_fill(&gfx_pipeline->dynamic_state, &builder->graphics_state); - gfx_pipeline->feedback_loop_color = - (builder->graphics_state.pipeline_flags & - VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT); - gfx_pipeline->feedback_loop_ds = - (builder->graphics_state.pipeline_flags & - VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT); + gfx_pipeline->feedback_loops = + vk_pipeline_flags_feedback_loops(builder->graphics_state.pipeline_flags); gfx_pipeline->feedback_loop_may_involve_textures = builder->graphics_state.feedback_loop_not_input_only; } diff --git a/src/freedreno/vulkan/tu_pipeline.h b/src/freedreno/vulkan/tu_pipeline.h index fde929728e8..cf49249acdf 100644 --- a/src/freedreno/vulkan/tu_pipeline.h +++ b/src/freedreno/vulkan/tu_pipeline.h @@ -204,7 +204,7 @@ struct tu_graphics_pipeline { */ struct vk_sample_locations_state sample_locations; - bool feedback_loop_color, feedback_loop_ds; + VkImageAspectFlags feedback_loops; bool feedback_loop_may_involve_textures; };