From 4bad47e99190fb60d69d8ee04f9193827b204f9a Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 6 May 2026 21:44:21 +0200 Subject: [PATCH] gallivm/nir/soa: use uint for booleans Otherwise we'll hit a LLVM assert when handling load_const: llvm/include/llvm/ADT/APInt.h:121: llvm::APInt::APInt(unsigned int, uint64_t, bool, bool): Assertion `llvm::isIntN(BitWidth, val) && "Value is not an N-bit signed value"' failed. Cc: mesa-stable Reviewed-by: Dave Airlie Acked-by: Adam Jackson Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index 591d77e2cee..8743845ae7e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -5898,7 +5898,7 @@ void lp_build_nir_soa_func(struct gallivm_state *gallivm, } { struct lp_type bool_type; - bool_type = lp_int_type(type); + bool_type = lp_uint_type(type); bool_type.width /= 32; lp_build_context_init(&bld.bool_bld, gallivm, bool_type); } @@ -5961,7 +5961,7 @@ void lp_build_nir_soa_func(struct gallivm_state *gallivm, } { struct lp_type bool_type; - bool_type = lp_int_type(elem_type); + bool_type = lp_uint_type(elem_type); bool_type.width /= 32; lp_build_context_init(&bld.scalar_bool_bld, gallivm, bool_type); }