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>
(cherry picked from commit 4bad47e991)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41540>
This commit is contained in:
Karol Herbst 2026-05-06 21:44:21 +02:00 committed by Eric Engestrom
parent 5794559647
commit e9b5e3530f
2 changed files with 3 additions and 3 deletions

View file

@ -2754,7 +2754,7 @@
"description": "gallivm/nir/soa: use uint for booleans",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -5894,7 +5894,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);
}
@ -5957,7 +5957,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);
}