From 76b28c19fa8c9607ae5e5f962aeb3676e190b038 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Thu, 17 Oct 2024 15:52:16 -0700 Subject: [PATCH] panvk: add note about pan_lower_store_component requirements This tripped me up in the multiview implementation. The commit message that introduced the pass mentioned that we're relying on nir_lower_io_to_temporaries, but this was dropped when it was copied to the comment block. Signed-off-by: Benjamin Lee Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/util/pan_lower_store_component.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/util/pan_lower_store_component.c b/src/panfrost/util/pan_lower_store_component.c index 8ca139a3a8a..2d1d16bb6a1 100644 --- a/src/panfrost/util/pan_lower_store_component.c +++ b/src/panfrost/util/pan_lower_store_component.c @@ -32,6 +32,9 @@ * location_frac, we'll need to lower to a single varying store that collects * all of the channels together. This is because the varying instruction on * Midgard and Bifrost is slot-based, writing out an entire vec4 slot at a time. + * + * NOTE: this expects all stores to be outside of control flow, and with + * constant offsets. It should be run after nir_lower_io_to_temporaries. */ static bool lower_store_component(nir_builder *b, nir_intrinsic_instr *intr, void *data)