From e393cece77fdb26d791208489d4a261ae24dc937 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 7 May 2026 11:42:48 +0200 Subject: [PATCH] pan/va: do not allow force_delta_enable on v9 This bit is reserved and should be zero on V9, so we should report an illegal instruction if we ever encounter it while packing. Reviewed-by: Iago Toral Quiroga Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Lorenzo Rossi --- src/panfrost/compiler/bifrost/valhall/va_pack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/compiler/bifrost/valhall/va_pack.c b/src/panfrost/compiler/bifrost/valhall/va_pack.c index 0790005e49a..72bcab9607c 100644 --- a/src/panfrost/compiler/bifrost/valhall/va_pack.c +++ b/src/panfrost/compiler/bifrost/valhall/va_pack.c @@ -1043,8 +1043,11 @@ va_pack_instr(const bi_instr *I, unsigned arch) hex |= (1ull << 46); if (I->op == BI_OPCODE_TEX_GRADIENT) { - if (I->force_delta_enable) + if (I->force_delta_enable) { + if (arch < 10) + invalid_instruction(I, "gradient instruction does not support .force_delta_enable"); hex |= (1ull << 12); + } if (I->lod_bias_disable) hex |= (1ull << 13); if (I->lod_clamp_disable)