Skip to content
Snippets Groups Projects
Commit 191b8589 authored by WuZhen's avatar WuZhen Committed by Robert Foss
Browse files

Android: add Android.mk for llvmpipe

this commit enables llvmpipe when using swrast on android

(v1) original WuZhen patch
https://lists.freedesktop.org/archives/mesa-dev/2017-January/139789.html



(v2) resolution of conflicts and support for Rob Herring
"Android: push driver build details to driver makefiles"

Changes to be committed compared to WuZhen's:

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

Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 2c8ab9ad
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ MESA_PYTHON2 := python ...@@ -47,6 +47,7 @@ MESA_PYTHON2 := python
# in form of <driver name>.<boolean make variable> # in form of <driver name>.<boolean make variable>
classic_drivers := i915.HAVE_I915_DRI i965.HAVE_I965_DRI classic_drivers := i915.HAVE_I915_DRI i965.HAVE_I965_DRI
gallium_drivers := \ gallium_drivers := \
swrast.HAVE_GALLIUM_LLVMPIPE \
swrast.HAVE_GALLIUM_SOFTPIPE \ swrast.HAVE_GALLIUM_SOFTPIPE \
freedreno.HAVE_GALLIUM_FREEDRENO \ freedreno.HAVE_GALLIUM_FREEDRENO \
i915g.HAVE_GALLIUM_I915 \ i915g.HAVE_GALLIUM_I915 \
...@@ -84,7 +85,7 @@ else ...@@ -84,7 +85,7 @@ else
MESA_ENABLE_ASM := false MESA_ENABLE_ASM := false
endif endif
ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI)),) ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI) $(HAVE_GALLIUM_LLVMPIPE)),)
MESA_ENABLE_LLVM := true MESA_ENABLE_LLVM := true
endif endif
......
...@@ -34,7 +34,7 @@ SUBDIRS += auxiliary/pipe-loader ...@@ -34,7 +34,7 @@ SUBDIRS += auxiliary/pipe-loader
# Gallium drivers and their respective winsys # Gallium drivers and their respective winsys
# #
SUBDIRS += winsys/sw/dri drivers/softpipe SUBDIRS += winsys/sw/dri drivers/llvmpipe drivers/softpipe
SUBDIRS += winsys/freedreno/drm drivers/freedreno SUBDIRS += winsys/freedreno/drm drivers/freedreno
SUBDIRS += winsys/i915/drm drivers/i915 SUBDIRS += winsys/i915/drm drivers/i915
SUBDIRS += winsys/nouveau/drm drivers/nouveau SUBDIRS += winsys/nouveau/drm drivers/nouveau
......
# 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),)
GALLIUM_TARGET_DRIVERS += swrast kms_swrast
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_sw_dri libmesa_winsys_sw_kms_dri)
$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment