From 633cf4eca1dec92605bfcf045c37ffc797132fa3 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 11 May 2022 16:31:33 -0700 Subject: [PATCH] freedreno/ir3: Fix 16-bit bit_count. No need to do the 16-bit lowering if it already is. Reviewed-by: Matt Turner Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 980c83b48ba..5a02af2e253 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -769,7 +769,7 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu) break; } case nir_op_bit_count: { - if (ctx->compiler->gen < 5) { + if (ctx->compiler->gen < 5 || (src[0]->dsts[0]->flags & IR3_REG_HALF)) { dst[0] = ir3_CBITS_B(b, src[0], 0); break; }