From: Connor Abbott Date: Mon, 11 Sep 2023 14:51:26 +0000 (+0200) Subject: tu: Use pipeline feedback loop flag indirectly X-Git-Tag: upstream/23.3.3~1642 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41797b9e94d5fc432b8650ea028725e6cfed37b5;p=platform%2Fupstream%2Fmesa.git tu: Use pipeline feedback loop flag indirectly Remove another use of the pipeline. Part-of: --- diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index cbb9183..3245113 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -3106,6 +3106,13 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, cmd->state.per_view_viewport = pipeline->program.per_view_viewport; cmd->state.dirty |= TU_CMD_DIRTY_PER_VIEW_VIEWPORT; } + + if (cmd->state.pipeline->feedback_loop_ds != + cmd->state.pipeline_feedback_loop_ds) { + cmd->state.pipeline_feedback_loop_ds = + cmd->state.pipeline->feedback_loop_ds; + cmd->state.dirty |= TU_CMD_DIRTY_LRZ; + } } static void @@ -4476,7 +4483,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_loop_ds) && (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 12c0bc1..f07d211 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.h +++ b/src/freedreno/vulkan/tu_cmd_buffer.h @@ -481,6 +481,7 @@ struct tu_cmd_state bool blend_reads_dest; bool stencil_front_write; bool stencil_back_write; + bool pipeline_feedback_loop_ds; /* VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT and * VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT are allowed to run simultaniously,