aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo 'Grim' Cabrita <grimkriegor@krutt.org>2019-07-19 23:07:32 (GMT)
committerRicardo 'Grim' Cabrita <grimkriegor@krutt.org>2019-07-22 17:45:15 (GMT)
commitf6e5382a00c1ecb905cea55cf9d1a4cd57d622a0 (patch)
treef0cc5a49be569ad33be294916b8f855b453c029e
parent0caa02f8dc3cef41aaf2d237dd7df572550da90b (diff)
downloadexternal_mesa3d-replicant-9.zip
external_mesa3d-replicant-9.tar.gz
external_mesa3d-replicant-9.tar.bz2
android: Enable llvmpipe when using the swrast driverHEADreplicant-9
(v1) original patches by Wu Zhen https://patchwork.freedesktop.org/series/6451/ https://patchwork.freedesktop.org/series/17611/ (v2) resolution of conflicts and support for Rob Herring's "Android: push driver build details to driver makefiles" also by Wu Zhen https://github.com/maurossi/mesa/commit/f7c2a171a4320a5a713861440f5f3df2611d7b1e.patch (v3) compatibility with Android 9 by the Replicant project Changes from v1 to v2 of the patch: Android.mk add swrast.HAVE_GALLIUM_LLVMPIPE, MESA_ENABLE_LLVM rules src/gallium/Android.mk resolution of conflicts src/gallium/drivers/llvmpipe/Android.mk added GALLIUM_LIBS rules src/gallium/targets/dri/Android.mk resolution of conflicts Changes from v2 to v3 of the patch: src/gallium/drivers/llvmpipe/Android.mk Added module libmesa_winsys_sw_kms_dri Call mesa-build-with-llvm instead of directly assigning LOCAL_SHARED_LIBRARIES src/gallium/targets/dri/Android.mk Include libLLVM as a shared library when building the gallium_dri module Co-authored-by: Wu Zhen <wuzhen@jidemail.com> Signed-off-by: Ricardo 'Grim' Cabrita <grimkriegor@krutt.org>
-rw-r--r--Android.mk3
-rw-r--r--src/gallium/Android.mk2
-rw-r--r--src/gallium/drivers/llvmpipe/Android.mk43
-rw-r--r--src/gallium/targets/dri/Android.mk4
4 files changed, 50 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 7da17a1..8593204 100644
--- a/Android.mk
+++ b/Android.mk
@@ -48,6 +48,7 @@ MESA_PYTHON2 := python
# in form of <driver name>.<boolean make variable>
classic_drivers := i915.HAVE_I915_DRI i965.HAVE_I965_DRI
gallium_drivers := \
+ swrast.HAVE_GALLIUM_LLVMPIPE \
swrast.HAVE_GALLIUM_SOFTPIPE \
freedreno.HAVE_GALLIUM_FREEDRENO \
i915g.HAVE_GALLIUM_I915 \
@@ -83,7 +84,7 @@ endif
$(foreach d, $(MESA_BUILD_CLASSIC) $(MESA_BUILD_GALLIUM), $(eval $(d) := true))
-ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI)),)
+ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI) $(HAVE_GALLIUM_LLVMPIPE)),)
MESA_ENABLE_LLVM := true
endif
diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk
index 37e923c..e264fa9 100644
--- a/src/gallium/Android.mk
+++ b/src/gallium/Android.mk
@@ -34,7 +34,7 @@ SUBDIRS += auxiliary/pipe-loader
# Gallium drivers and their respective winsys
#
-SUBDIRS += winsys/sw/kms-dri winsys/sw/dri drivers/softpipe
+SUBDIRS += winsys/sw/kms-dri winsys/sw/dri drivers/llvmpipe drivers/softpipe
SUBDIRS += winsys/freedreno/drm drivers/freedreno
SUBDIRS += winsys/i915/drm drivers/i915
SUBDIRS += winsys/nouveau/drm drivers/nouveau
diff --git a/src/gallium/drivers/llvmpipe/Android.mk b/src/gallium/drivers/llvmpipe/Android.mk
new file mode 100644
index 0000000..beb7beb
--- /dev/null
+++ b/src/gallium/drivers/llvmpipe/Android.mk
@@ -0,0 +1,43 @@
+# Mesa 3-D graphics library
+#
+# Copyright (C) 2015-2016 Zhen Wu <wuzhen@jidemail.com>
+# Copyright (C) 2015-2016 Jide Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+LOCAL_PATH := $(call my-dir)
+
+# get C_SOURCES
+include $(LOCAL_PATH)/Makefile.sources
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ $(C_SOURCES)
+
+LOCAL_MODULE := libmesa_pipe_llvmpipe
+
+$(call mesa-build-with-llvm)
+
+include $(GALLIUM_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_LLVMPIPE),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_sw_dri libmesa_winsys_sw_kms_dri)
+endif
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index 10b27a8..811516f 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -61,6 +61,10 @@ ifeq ($(USE_LIBBACKTRACE),true)
LOCAL_SHARED_LIBRARIES += libbacktrace
endif
+ifeq ($(HAVE_GALLIUM_LLVMPIPE),true)
+$(call mesa-build-with-llvm)
+endif
+
$(foreach d, $(MESA_BUILD_GALLIUM), $(eval LOCAL_CFLAGS += $(patsubst HAVE_%,-D%,$(d))))
# sort GALLIUM_LIBS to remove any duplicates