OSDN Git Service

android: fix for jb-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 15 Jul 2013 16:50:29 +0000 (00:50 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 23 Jul 2013 17:16:52 +0000 (01:16 +0800)
Fix the building errors of gallium drivers

* Ensure libmesa_glsl is built with stlport
* Implement program_invocation_short_name for android
* Add libmesa_pipe_radeon for r600g

src/egl/main/Android.mk
src/gallium/Android.mk
src/gallium/drivers/r300/r300_chipset.c
src/gallium/drivers/radeon/Android.mk [new file with mode: 0644]
src/glsl/Android.mk

index 30e5ea7..331c6b8 100644 (file)
@@ -121,11 +121,13 @@ endif
 # r300g/r600g/radeonsi
 ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_winsys_radeon
+LOCAL_SHARED_LIBRARIES += libdrm_radeon
 ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_r300
 endif
 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_pipe_r600
+gallium_DRIVERS += libmesa_pipe_r600 libmesa_pipe_radeon
+LOCAL_SHARED_LIBRARIES += libstlport
 endif
 ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_radeonsi
index 4e5acc8..1bc28c2 100644 (file)
@@ -61,7 +61,7 @@ ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
 SUBDIRS += drivers/r300
 endif
 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
-SUBDIRS += drivers/r600
+SUBDIRS += drivers/r600 drivers/radeon
 endif
 ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
 SUBDIRS += drivers/radeonsi
index 11061ed..73a4bbd 100644 (file)
 
 static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
 {
+#ifdef ANDROID
+    extern const char *__progname;
+    const char *arg = strrchr(__progname, '/');
+    const char *program_invocation_short_name = arg ? arg + 1 : __progname;
+#endif
     static const char *list[] = {
         "X",    /* the DDX or indirect rendering */
         "Xorg", /* (alternative name) */
diff --git a/src/gallium/drivers/radeon/Android.mk b/src/gallium/drivers/radeon/Android.mk
new file mode 100644 (file)
index 0000000..2d7767b
--- /dev/null
@@ -0,0 +1,38 @@
+# Mesa 3-D graphics library
+#
+# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
+# Copyright (C) 2010-2011 LunarG 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_C_INCLUDES := $(DRM_TOP)
+
+LOCAL_MODULE := libmesa_pipe_radeon
+
+include $(GALLIUM_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
index f088e67..7c4ca9c 100644 (file)
@@ -39,12 +39,12 @@ LOCAL_SRC_FILES := \
        $(LIBGLSL_FILES)
 
 LOCAL_C_INCLUDES := \
-       external/astl/include \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/mesa
 
 LOCAL_MODULE := libmesa_glsl
 
+include external/stlport/libstlport.mk
 include $(LOCAL_PATH)/Android.gen.mk
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)