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 <airlied@redhat.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41404>
This commit is contained in:
Karol Herbst 2026-05-06 21:44:21 +02:00 committed by Marge Bot
parent 3df48dec23
commit 4bad47e991

View file

@ -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);
}