From 9257997e3e9b158b6053754df29d1b80c75f76ae Mon Sep 17 00:00:00 2001 From: Radu Costas Date: Mon, 23 Mar 2026 14:37:43 +0200 Subject: [PATCH] pco: Amend errant nir_move_option Move options were bit or-ing from the wrong enum, causing undefined behaviour when the number of intrinsics changed. Replaced it with the values from the right nir_move_options enum that were previously working. (Further refinement needed on these after extensive testing.) Fixes: f1b24267d25 ("pco: rework nir processing and passes") Signed-off-by: Radu Costas Reviewed-by: Simon Perretta (cherry picked from commit 721c1b8f655e75b1958f71bc898d61d61f8956f3) Part-of: --- .pick_status.json | 2 +- src/imagination/pco/pco_nir.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 220bffce359..435830a0a0e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3374,7 +3374,7 @@ "description": "pco: Amend errant nir_move_option", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f1b24267d25bcf3a29228b705a253a6c4b40b8af", "notes": null diff --git a/src/imagination/pco/pco_nir.c b/src/imagination/pco/pco_nir.c index ec51364fd1c..26687beb401 100644 --- a/src/imagination/pco/pco_nir.c +++ b/src/imagination/pco/pco_nir.c @@ -827,8 +827,9 @@ void pco_lower_nir(pco_ctx *ctx, nir_shader *nir, pco_data *data) nir_move_options move_options = nir_move_load_global | nir_move_load_ubo | nir_move_load_ssbo | nir_move_load_input | - nir_move_load_frag_coord | - nir_intrinsic_load_uniform; + nir_move_load_frag_coord | nir_move_alu | + nir_move_comparisons | nir_move_copies; + NIR_PASS(_, nir, nir_opt_sink, move_options); NIR_PASS(_, nir, nir_opt_move, move_options);