Module: Mesa Branch: main Commit: 41797b9e94d5fc432b8650ea028725e6cfed37b5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=41797b9e94d5fc432b8650ea028725e6cfed37b5
Author: Connor Abbott <[email protected]> Date: Mon Sep 11 16:51:26 2023 +0200 tu: Use pipeline feedback loop flag indirectly Remove another use of the pipeline. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25276> --- src/freedreno/vulkan/tu_cmd_buffer.cc | 9 ++++++++- src/freedreno/vulkan/tu_cmd_buffer.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index cbb9183106c..32451138cdc 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 12c0bc1b988..f07d21105bc 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,
