# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/mesa/hotfix-mips64.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Attempt to fix illegal instruction on Sgi MIPS"4" machines, as it does not yet fully work there are likely more hiding somewhere. --- mesa-25.2.1/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp.vanilla 2025-08-26 18:49:44.207513051 +0200 +++ mesa-25.2.1/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 2025-08-26 18:50:42.784035892 +0200 @@ -576,7 +576,7 @@ * implemented, feedback to mips64r2 for all other ordinary mips64 cpu. */ if (MCPU == "generic") - MCPU = util_get_cpu_caps()->has_msa ? "mips64r5" : "mips64r2"; + if (util_get_cpu_caps()->has_msa) MCPU = "mips64r5"; #endif builder.setMCPU(MCPU); --- mesa-25.2.1/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp.vanilla 2025-08-26 19:18:32.337704077 +0200 +++ mesa-25.2.1/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp 2025-08-26 19:19:19.357108798 +0200 @@ -493,7 +493,7 @@ * implemented, feedback to mips64r2 for all other ordinary mips64 cpu. */ if (MCPU == "generic") - MCPU = util_get_cpu_caps()->has_msa ? "mips64r5" : "mips64r2"; + if (util_get_cpu_caps()->has_msa) MCPU = "mips64r5"; #endif #if DETECT_ARCH_RISCV64 == 1