Module: Mesa Branch: main Commit: 63aa5909b4c8bb50763e07f38a3892b513986e97 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=63aa5909b4c8bb50763e07f38a3892b513986e97
Author: Emma Anholt <[email protected]> Date: Mon Feb 27 14:24:07 2023 -0800 panfrost/midgard: Fix handling of csel with a vector constant condition. If it's not all true or all false, then you'll have a csel with a vector constant, and the backend failed to translate appropriately. Expand the constant to fix it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21476> --- src/panfrost/midgard/midgard_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 13d454faf1a..e067d0a5688 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -947,6 +947,9 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr) op = is_float ? (mixed ? midgard_alu_op_fcsel_v : midgard_alu_op_fcsel) : (mixed ? midgard_alu_op_icsel_v : midgard_alu_op_icsel); + int index = nir_src_index(ctx, &instr->src[0].src); + emit_explicit_constant(ctx, index, index); + break; }
