[Mesa-dev] [PATCH 1/2] anv: android build system changes
Tapani Pälli
tapani.palli at intel.com
Thu Sep 14 06:57:40 UTC 2017
Following changes are made to support VK_ANDROID_native_buffer:
- bring in vk_android_native_buffer.xml
- rename target as vulkan.$(TARGET_BOARD_PLATFORM)
- use LOCAL_PROPRIETARY_MODULE to install under vendor path
- link with libsync and liblog
Tested by running different Sascha Williams demos on Android-IA.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/intel/Android.vulkan.mk | 14 ++++++++++----
src/intel/vulkan/anv_android.c | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
index 990bdb52fd..9619a29100 100644
--- a/src/intel/Android.vulkan.mk
+++ b/src/intel/Android.vulkan.mk
@@ -67,7 +67,8 @@ $(intermediates)/vulkan/dummy.c:
$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
$(VK_ENTRYPOINTS_SCRIPT) \
--outdir $(dir $@) \
- --xml $(MESA_TOP)/src/vulkan/registry/vk.xml
+ --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
+ --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(intermediates)
@@ -223,12 +224,14 @@ $(intermediates)/vulkan/anv_entrypoints.c:
@mkdir -p $(dir $@)
$(VK_ENTRYPOINTS_SCRIPT) \
--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
+ --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \
--outdir $(dir $@)
$(intermediates)/vulkan/anv_extensions.c:
@mkdir -p $(dir $@)
$(VK_EXTENSIONS_SCRIPT) \
--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
+ --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \
--out $@
LOCAL_SHARED_LIBRARIES := libdrm
@@ -243,18 +246,21 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_MODULE := libvulkan_intel
+LOCAL_MODULE := vulkan.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PROPRIETARY_MODULE := true
+LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_CFLAGS := -DLOG_TAG=\"INTEL-MESA\"
LOCAL_LDFLAGS += -Wl,--build-id=sha1
LOCAL_SRC_FILES := \
- $(VULKAN_GEM_FILES)
+ $(VULKAN_GEM_FILES) $(VULKAN_ANDROID_FILES)
LOCAL_C_INCLUDES := \
$(VULKAN_COMMON_INCLUDES) \
+ frameworks/native/vulkan/include/hardware \
$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_anv_entrypoints,,)/vulkan
LOCAL_EXPORT_C_INCLUDE_DIRS := $(MESA_TOP)/src/intel/vulkan
@@ -276,7 +282,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_intel_compiler \
libmesa_anv_entrypoints
-LOCAL_SHARED_LIBRARIES := libdrm libz
+LOCAL_SHARED_LIBRARIES := libdrm libz libsync liblog
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
index 6b19ace4d2..081524305b 100644
--- a/src/intel/vulkan/anv_android.c
+++ b/src/intel/vulkan/anv_android.c
@@ -23,7 +23,7 @@
#include <hardware/gralloc.h>
#include <hardware/hardware.h>
-#include <hardware/hwvulkan.h>
+#include "hwvulkan.h"
#include <vulkan/vk_android_native_buffer.h>
#include <vulkan/vk_icd.h>
#include <sync/sync.h>
--
2.13.5
More information about the mesa-dev
mailing list