From d0bc4974fa705ed56e642daea7df6f2626c012ba Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 6 Oct 2021 12:32:05 -0700 Subject: [PATCH] android: Allow forcing softpipe When dealing with swrast, there's two possibilities: If you have LLVM, you get llvmpipe, which is pretty fast. If you don't, you get softpipe, which is slow, but does have a couple nice qualities, like being smaller and not needing executable memory for JIT. If you're building a driver that requires LLVM like radeonsi then you need the LLVM stub for the build to find LLVM. But for swrast, since it can mean either softpipe/llvmpipe, you don't strictly need LLVM. So this just makes the Android build files flexible like the Meson build files (where you can specify -Dllvm=disabled even if LLVM is findable). Reviewed-by: Roman Stratiienko Part-of: --- android/Android.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/Android.mk b/android/Android.mk index 2523bc4fd4a..846907d553f 100644 --- a/android/Android.mk +++ b/android/Android.mk @@ -45,8 +45,10 @@ MESON_GEN_PKGCONFIGS := backtrace cutils expat hardware libdrm:$(LIBDRM_VERSION) LOCAL_CFLAGS += $(BOARD_MESA3D_CFLAGS) ifneq ($(filter swr swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),) +ifeq ($(BOARD_MESA3D_FORCE_SOFTPIPE),) MESON_GEN_LLVM_STUB := true endif +endif ifneq ($(filter zink,$(BOARD_MESA3D_GALLIUM_DRIVERS)),) LOCAL_SHARED_LIBRARIES += libvulkan