From af49f9697ab88e3f3c2dba6d943cdf6347758747 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 22 Jul 2021 14:08:31 +1000 Subject: [PATCH] gallivvm/nir: handle non-32bit mask scatter stores Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index 5874e76..a861f07 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -300,7 +300,8 @@ emit_mask_scatter(struct lp_build_nir_soa_context *bld, if (scalar_pred) { LLVMValueRef real_val, dst_val; dst_val = LLVMBuildLoad(builder, scalar_ptr, ""); - real_val = lp_build_select(&bld->uint_elem_bld, scalar_pred, val, dst_val); + scalar_pred = LLVMBuildTrunc(builder, scalar_pred, LLVMInt1TypeInContext(gallivm->context), ""); + real_val = LLVMBuildSelect(builder, scalar_pred, val, dst_val, ""); LLVMBuildStore(builder, real_val, scalar_ptr); } else { -- 2.7.4