From db5ad8e3d2bd573a09b1613dc8b126820aed94cc Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Tue, 8 Jul 2025 13:13:22 +0200 Subject: [PATCH] pan/bi: Disallow FAU for CLPER in bi_check_fau_src Previously this was allowing invalid forms like "CLPER.i32.subgroup8.zero lane-id, src1" to reach bi_pack. This fixes the assert that can be seen with "dEQP-VK.glsl.derivate.dfdxsubgroup.*" but doesn't fix failures. Fixes: 0acc6b564ef ("pan/bi: Rework FAU lowering") Signed-off-by: Mary Guillemard Reviewed-by: Eric R. Smith Part-of: --- src/panfrost/compiler/bifrost/bi_schedule.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/panfrost/compiler/bifrost/bi_schedule.c b/src/panfrost/compiler/bifrost/bi_schedule.c index e014bfdbcf6..c583e27630a 100644 --- a/src/panfrost/compiler/bifrost/bi_schedule.c +++ b/src/panfrost/compiler/bifrost/bi_schedule.c @@ -2035,6 +2035,11 @@ bi_check_fau_src(bi_instr *ins, unsigned s, uint32_t *constants, assert(s < ins->nr_srcs); bi_index src = ins->src[s]; + /* CLPER only support registers on source 0 */ + if (s == 0 && + (ins->op == BI_OPCODE_CLPER_OLD_I32 || ins->op == BI_OPCODE_CLPER_I32)) + return false; + /* Staging registers can't have FAU accesses */ if (bi_is_staging_src(ins, s)) return (src.type != BI_INDEX_CONSTANT) && (src.type != BI_INDEX_FAU);