[vulkan] Add AHB support functions
bug: 122080810
This CL adds support functions for use with AHardwareBuffer
for getting buffer info and
acquiring/importing/creating buffers.
This is inspired by / based on Intel ANV
https://github.com/mesa3d/mesa/blob/master/src/intel/vulkan/anv_android.c
which has a similar layering between implementation-specific Vulkan
and AHardwareBuffer.
No new entry points are exposed yet.
Test: Builds
Change-Id: Ieb5bfcb8b65b87650cd4a2658668efac99f9105c
diff --git a/system/vulkan_enc/Android.mk b/system/vulkan_enc/Android.mk
index efa2799..d59336f 100644
--- a/system/vulkan_enc/Android.mk
+++ b/system/vulkan_enc/Android.mk
@@ -42,7 +42,8 @@
-DVK_USE_PLATFORM_ANDROID_KHR \
-DVK_NO_PROTOTYPES \
-LOCAL_SRC_FILES := HostVisibleMemoryVirtualization.cpp \
+LOCAL_SRC_FILES := AndroidHardwareBuffer.cpp \
+ HostVisibleMemoryVirtualization.cpp \
Resources.cpp \
Validation.cpp \
VulkanStream.cpp \
@@ -57,6 +58,7 @@
ifeq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST))
+LOCAL_CFLAGS += -D__ANDROID_API__=28
$(call emugl-export,SHARED_LIBRARIES,libgui)
else
$(call emugl-export,SHARED_LIBRARIES,libsync libnativewindow)