vulkan: do not use exported functions internally
Our vkGet*ProcAddr uses the exported functions. They will break when any
of the exported functions are overridden (e.g., through LD_PRELOAD).
Unexport and move all exported functions to vulkan::api namespace.
Re-export them by having vkFoo as a wrapper to vulkan::api::Foo.
Another option is to re-export vulkan::api::Foo by having vkFoo as an
alias using __attribute__((alias)). That results in smaller binaries.
But we will not be able to catch mismatches between vulkan.h and
vulkan.api.
To avoid future breakage, define VK_NO_PROTOTYPES for all files except
api_gen.cpp.
Bug: 28886971
Change-Id: I08fde7ebb247f8c7e040ccf812b40b02094d3c7f
diff --git a/vulkan/libvulkan/Android.mk b/vulkan/libvulkan/Android.mk
index 0beffdd..d2e28ff 100644
--- a/vulkan/libvulkan/Android.mk
+++ b/vulkan/libvulkan/Android.mk
@@ -20,6 +20,7 @@
LOCAL_CFLAGS := -DLOG_TAG=\"vulkan\" \
-DVK_USE_PLATFORM_ANDROID_KHR \
+ -DVK_NO_PROTOTYPES \
-std=c99 -fvisibility=hidden -fstrict-aliasing \
-Weverything -Werror \
-Wno-padded \