From 6287346482563f57a71938b86dcbb60a334b3fee Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 19 Sep 2024 13:16:50 -0400 Subject: [PATCH] agx: handle bounds_agx fallback when optimization fails. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index bab51f46549..fa540f3997d 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1849,6 +1849,9 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr) return agx_icmpsel_to(b, dst, s0, s1, s0, s1, AGX_ICOND_ULT); case nir_op_umax: return agx_icmpsel_to(b, dst, s0, s1, s0, s1, AGX_ICOND_UGT); + case nir_op_bounds_agx: + /* end offset > bound ? 0 : data */ + return agx_icmpsel_to(b, dst, s1, s2, agx_zero(), s0, AGX_ICOND_UGT); case nir_op_iadd: return agx_iadd_to(b, dst, s0, s1, 0);