From 82842a7ee21bb0184528af935abc3d2978ff0c82 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 10 Jan 2025 22:17:19 +0100 Subject: [PATCH] mesa: fix softpipe/non llvmpipe build lavapipe/swrast vk hard depends on llvmpipe and does not work with softpipe --- srcpkgs/mesa/template | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index 85f030b489fc8c..b8a2f024649eb1 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -35,8 +35,9 @@ build_options_default="wayland" # especially on big endian it's all kinds of broken, and e.g. on # 32-bit powerpc it does not work at all, so fall back to softpipe case "$XBPS_TARGET_MACHINE" in - i686*|x86_64*|aarch64*|ppc64le*|arm*) ;; - *) configure_args+=" -Ddraw-use-llvm=false" ;; + i686*|x86_64*|ppc64le*|arm*|riscv64*) + _have_llvmpipe=yes + ;; esac # Set subpackages manually to set proper rdeps in 32bit pkgs. @@ -51,8 +52,7 @@ replaces="libGL>=10_1<19.2.5_2 libEGL>=10_1<19.2.5_2 libGLES>=10_1<19.2.5_2" # swrast always present _gallium_drivers=" -Dgallium-drivers=swrast" -_vulkan_drivers=" -Dvulkan-drivers=swrast" -subpackages+=" mesa-vulkan-lavapipe" +_vulkan_drivers=" -Dvulkan-drivers=" # amd and nvidia drivers on all platforms except where it makes no sense # amd implicitly enables clover opencl, also enable hwdec and virgl too @@ -79,6 +79,12 @@ case "$XBPS_TARGET_MACHINE" in ;; esac +if [ "$_have_llvmpipe" ]; then + subpackages+=" mesa-vulkan-lavapipe" + configure_args+=" -Ddraw-use-llvm=false" + _vulkan_drivers+=",swrast" +fi + if [ "$_have_amd" ]; then # amd cards can use clover _have_opencl=yes