From 1aa23f2e1bb86a603b397eb4a4a3b994a9dc02e5 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 15 Nov 2025 13:38:04 +0300 Subject: [PATCH] mesa: gate NPU drivers on 64-bit targets only ethosu fails to build entirely, rocket does a bunch of pointer-to-int64 and back casts that will be wildly unsafe on 32-bit. --- pkgs/development/libraries/mesa/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 5e99a1608664..4320ea6d6360 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -51,7 +51,6 @@ "asahi" # Apple AGX "crocus" # Intel legacy "d3d12" # WSL emulated GPU (aka Dozen) - "ethosu" # ARM Ethos NPU "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs) "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) "i915" # Intel extra legacy @@ -63,7 +62,6 @@ "r300" # very old AMD "r600" # less old AMD "radeonsi" # new AMD (GCN+) - "rocket" # Rockchip NPU "softpipe" # older software renderer "svga" # VMWare virtualized GPU "tegra" # Nvidia Tegra SoCs @@ -71,6 +69,10 @@ "vc4" # Broadcom VC4 (Raspberry Pi 0-3) "virgl" # QEMU virtualized GPU (aka VirGL) "zink" # generic OpenGL over Vulkan, experimental + ] + ++ lib.optionals stdenv.hostPlatform.is64bit [ + "ethosu" # ARM Ethos NPU, does not build on 32-bit + "rocket" # Rockchip NPU, probably horribly broken on 32-bit ], vulkanDrivers ? [ "amd" # AMD (aka RADV)