tu: Don't use pipeline for bandwidth validity
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 12 Sep 2023 18:53:31 +0000 (20:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 19:03:57 +0000 (19:03 +0000)
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
src/freedreno/vulkan/tu_pipeline.cc

index 7dda789..a4eae51 100644 (file)
@@ -3080,6 +3080,7 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer,
 
    if (pipeline->bandwidth.valid)
       cmd->state.bandwidth = pipeline->bandwidth;
+   cmd->state.pipeline_bandwidth = pipeline->bandwidth.valid;
 
    struct tu_cs *cs = &cmd->draw_cs;
 
index 31fda5e..fd6265e 100644 (file)
@@ -485,7 +485,7 @@ struct tu_cmd_state
    bool stencil_back_write;
    bool pipeline_feedback_loop_ds;
 
-   bool pipeline_blend_lrz;
+   bool pipeline_blend_lrz, pipeline_bandwidth;
    uint32_t pipeline_draw_states;
 
    /* VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT and
index 3a85ddc..46120fe 100644 (file)
@@ -3615,7 +3615,7 @@ tu_emit_draw_state(struct tu_cmd_buffer *cmd)
    }
    if (EMIT_STATE(bandwidth) ||
        ((cmd->state.dirty & TU_CMD_DIRTY_SUBPASS) &&
-        !cmd->state.pipeline->base.bandwidth.valid))
+        !cmd->state.pipeline_bandwidth))
       tu_calc_bandwidth(&cmd->state.bandwidth, &cmd->vk.dynamic_graphics_state.cb,
                         &cmd->state.vk_rp);
    DRAW_STATE(blend_constants, VK_DYNAMIC_STATE_BLEND_CONSTANTS,