Skip to content

Commit

Permalink
mesa: fix softpipe/non llvmpipe build
Browse files Browse the repository at this point in the history
lavapipe/swrast vk hard depends on llvmpipe and does not work with
softpipe
  • Loading branch information
Johnnynator committed Jan 10, 2025
1 parent de143a1 commit 9688e3e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions srcpkgs/mesa/template
Original file line number Diff line number Diff line change
Expand Up @@ -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*|aarch64*|ppc64le*|arm*|riscv64*)
_have_llvmpipe=yes
;;
esac

# Set subpackages manually to set proper rdeps in 32bit pkgs.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9688e3e

Please sign in to comment.