From 90974286abb1497f4725510d25f321e851c21c6b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 26 Sep 2025 12:36:02 +1000 Subject: [PATCH] fix llvmpipe constant loads on s390x Resolves: https://issues.redhat.com/browse/RHEL-107232 --- ...e-u8-u16-const-loads-properly-on-big-en.patch | 16 ++++++++++++++++ mesa.spec | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 0001-gallivm-handle-u8-u16-const-loads-properly-on-big-en.patch diff --git a/0001-gallivm-handle-u8-u16-const-loads-properly-on-big-en.patch b/0001-gallivm-handle-u8-u16-const-loads-properly-on-big-en.patch new file mode 100644 index 0000000..bd942c6 --- /dev/null +++ b/0001-gallivm-handle-u8-u16-const-loads-properly-on-big-en.patch @@ -0,0 +1,16 @@ +diff -up mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c.dma mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +--- mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c.dma 2025-05-29 01:20:23.000000000 +1000 ++++ mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c 2025-09-26 12:32:52.240568901 +1000 +@@ -1321,8 +1321,10 @@ emit_load_const(struct lp_build_nir_cont + + for (unsigned i = 0; i < instr->def.num_components; i++) { + outval[i] = lp_build_const_int_vec(bld_base->base.gallivm, int_bld->type, +- bits == 32 ? instr->value[i].u32 +- : instr->value[i].u64); ++ bits == 8 ? instr->value[i].u8 : ++ bits == 16 ? instr->value[i].u16 : ++ bits == 32 ? instr->value[i].u32 : ++ instr->value[i].u64); + } + for (unsigned i = instr->def.num_components; i < NIR_MAX_VEC_COMPONENTS; i++) { + outval[i] = NULL; diff --git a/mesa.spec b/mesa.spec index 7169224..773aef0 100644 --- a/mesa.spec +++ b/mesa.spec @@ -137,6 +137,9 @@ Patch50: 0001-Revert-hasvk-elk-stop-turning-load_push_constants-in.patch # to fix firefox browser issue with NV dGFX driver Patch60: 32886.patch +# Fix s390 loop counters +Patch70: 0001-gallivm-handle-u8-u16-const-loads-properly-on-big-en.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: gcc-c++