From 413947e2de620a15fc8eddb316c3b1d058200b7b Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 5 Mar 2025 13:26:59 -0500 Subject: [PATCH] tu: Fix static blend bandwidth calculation We were never setting the valid bit, so would never happen. If it did happen, we forgot to merge in the bandwidth calculation from child libraries. Part-of: --- src/freedreno/vulkan/tu_pipeline.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/freedreno/vulkan/tu_pipeline.cc b/src/freedreno/vulkan/tu_pipeline.cc index b86fc909152..488f7af64bc 100644 --- a/src/freedreno/vulkan/tu_pipeline.cc +++ b/src/freedreno/vulkan/tu_pipeline.cc @@ -2109,6 +2109,9 @@ tu_pipeline_builder_parse_libraries(struct tu_pipeline_builder *builder, pipeline->prim_order = library->base.prim_order; } + if (library->base.bandwidth.valid) + pipeline->bandwidth = library->base.bandwidth; + pipeline->set_state_mask |= library->base.set_state_mask; u_foreach_bit (i, library->base.set_state_mask) { @@ -2896,6 +2899,8 @@ tu_calc_bandwidth(struct tu_bandwidth *bandwidth, vk_format_to_pipe_format(rp->stencil_attachment_format), UTIL_FORMAT_COLORSPACE_ZS, 1) / 8; } + + bandwidth->valid = true; } /* Return true if the blend state reads the color attachments. */