tu: Use pipeline feedback loop flag indirectly
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 11 Sep 2023 14:51:26 +0000 (16:51 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 19:03:56 +0000 (19:03 +0000)
Remove another use of the pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25276>

src/freedreno/vulkan/tu_cmd_buffer.cc
src/freedreno/vulkan/tu_cmd_buffer.h

index cbb9183..3245113 100644 (file)
@@ -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
index 12c0bc1..f07d211 100644 (file)
@@ -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,