gallivm: handle u16 correct on const loads.

I somehow screwed this up on my previous attempt at fixing this bug,

This should fix the loop limiter bug on big endian properly.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Fixes: e28cfb2bad ("gallivm: handle u8/u16 const loads properly on big-endian.")
(cherry picked from commit c016346b50)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
This commit is contained in:
Dave Airlie 2026-02-11 05:47:57 +10:00 committed by Marge Bot
parent 160efe917e
commit b53dbb573a
2 changed files with 2 additions and 5 deletions

View file

@ -84,7 +84,7 @@
"description": "gallivm: handle u16 correct on const loads.",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "e28cfb2bada2398a9ddcadd03fac060d5654a15e",
"notes": null

View file

@ -1269,10 +1269,7 @@ emit_load_const(struct lp_build_nir_soa_context *bld,
for (unsigned i = 0; i < instr->def.num_components; i++) {
outval[i] = lp_build_const_int_vec(bld->base.gallivm, int_bld->type,
bits == 8 ? instr->value[i].u8 :
bits == 16 ? instr->value[i].u32 :
bits == 32 ? instr->value[i].u32 :
instr->value[i].u64);
nir_const_value_as_uint(instr->value[i], bits));
}
for (unsigned i = instr->def.num_components; i < NIR_MAX_VEC_COMPONENTS; i++) {
outval[i] = NULL;