From 11238774a42160199b5ea139496e09058d4c368a Mon Sep 17 00:00:00 2001 From: Simon Perretta Date: Fri, 6 Dec 2024 17:52:15 +0000 Subject: [PATCH] pco: amend z/w usage code Signed-off-by: Simon Perretta Acked-by: Frank Binns Part-of: --- src/imagination/pco/pco_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imagination/pco/pco_nir.c b/src/imagination/pco/pco_nir.c index d700b7e0d6e..111d507a894 100644 --- a/src/imagination/pco/pco_nir.c +++ b/src/imagination/pco/pco_nir.c @@ -277,10 +277,11 @@ static bool gather_fs_data_pass(UNUSED struct nir_builder *b, unsigned component = nir_intrinsic_component(intr); unsigned chans = intr->def.num_components; + assert(component == 2 || chans == 1); pco_data *data = cb_data; - data->fs.uses.z |= (component + chans > 2); + data->fs.uses.z |= (component == 2); data->fs.uses.w |= (component + chans > 3); return false;