From b53dbb573af7d3a40bd02ed38850fcd73ef3b452 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 11 Feb 2026 05:47:57 +1000 Subject: [PATCH] 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 Cc: mesa-stable Fixes: e28cfb2bada2 ("gallivm: handle u8/u16 const loads properly on big-endian.") (cherry picked from commit c016346b50e9085b531f9bcbd7cfd63d3806a3e1) Part-of: --- .pick_status.json | 2 +- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 895fc7aa731..716d2547560 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index ee00083c460..9e84d0a009b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -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;