summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-12 20:15:41 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-12 20:15:41 +0100
commitbddbe95616987fe637a71616b5f9130160f1ea07 (patch)
tree893b9e0dac08c946ec4d5ea7f928bb31df818569
parent5ee081425fe0dcd47f4bda5d58c67b76fba39a82 (diff)
downloadexternal_mesa3d-replicant-6.0-0001.zip
external_mesa3d-replicant-6.0-0001.tar.gz
external_mesa3d-replicant-6.0-0001.tar.bz2
enable standalone build of llvmpipe for ARMHEADreplicant-6.0-0001replicant-6.0
also add profiling flags Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--Android.common.mk11
-rw-r--r--src/egl/drivers/dri2/platform_android.c15
-rw-r--r--src/gallium/state_trackers/dri/Android.mk3
-rw-r--r--src/gallium/targets/dri/Android.mk4
4 files changed, 30 insertions, 3 deletions
diff --git a/Android.common.mk b/Android.common.mk
index ebd76f8..388d91f 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -122,6 +122,17 @@ endif
# uncomment to keep the debug symbols
#LOCAL_STRIP_MODULE := false
+# uncomment for profiling
+#LOCAL_CFLAGS += \
+# -DPROFILE \
+# -fno-omit-frame-pointer \
+# -fno-optimize-sibling-calls
+
+#LOCAL_CPPFLAGS += \
+# -DPROFILE \
+# -fno-omit-frame-pointer \
+# -fno-optimize-sibling-calls
+
ifeq ($(strip $(LOCAL_MODULE_TAGS)),)
LOCAL_MODULE_TAGS := optional
endif
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 67f799c..30ecefe 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -30,7 +30,10 @@
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
+
+#ifdef HAVE_LIBDRM
#include <xf86drm.h>
+#endif
#if ANDROID_VERSION >= 0x402
#include <sync/sync.h>
@@ -538,7 +541,11 @@ droid_create_image_from_prime_fd(_EGLDisplay *disp, _EGLContext *ctx,
EGL_NONE, 0
};
+#ifdef HAVE_LIBDRM
return dri2_create_image_dma_buf(disp, ctx, NULL, attr_list_yv12);
+#else
+ return NULL;
+#endif
}
const EGLint attr_list[] = {
@@ -551,7 +558,11 @@ droid_create_image_from_prime_fd(_EGLDisplay *disp, _EGLContext *ctx,
EGL_NONE, 0
};
+#ifdef HAVE_LIBDRM
return dri2_create_image_dma_buf(disp, ctx, NULL, attr_list);
+#else
+ return NULL;
+#endif
}
static _EGLImage *
@@ -1216,7 +1227,11 @@ dri2_initialize_android_drm(_EGLDriver *drv, _EGLDisplay *dpy)
goto cleanup_driver_name;
}
+#ifdef HAVE_LIBDRM
dri2_dpy->is_render_node = drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER;
+#else
+ dri2_dpy->is_render_node = false;
+#endif
/* render nodes cannot use Gem names, and thus do not support
* the __DRI_DRI2_LOADER extension */
diff --git a/src/gallium/state_trackers/dri/Android.mk b/src/gallium/state_trackers/dri/Android.mk
index 4bdd136..bec13d5 100644
--- a/src/gallium/state_trackers/dri/Android.mk
+++ b/src/gallium/state_trackers/dri/Android.mk
@@ -42,11 +42,10 @@ LOCAL_STATIC_LIBRARIES := \
ifneq ($(filter swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(drisw_SOURCES)
+LOCAL_SHARED_LIBRARIES := libdrm
endif
-ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(dri2_SOURCES)
-endif
LOCAL_MODULE := libmesa_st_dri
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index 18aefe3..f4b5fef 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -125,7 +125,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
ifeq ($(MESA_ENABLE_LLVM),true)
-LOCAL_STATIC_LIBRARIES := libelf libz
+LOCAL_STATIC_LIBRARIES := \
+ libLLVMExecutionEngine \
+ libelf libz
LOCAL_LDLIBS += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-lgcc)
endif