libvulkan: Use a stub HAL when no real Vulkan HAL is present
This stub HAL enumerates zero VkPhysicalDevices. This allows a
VkInstane to be created and queried for physical devices successfully
even on devices without a Vulkan driver. Handling this with a stub HAL
avoids the need for NULL HAL and NULL driver function pointer checks
in many places throughout the loader, which would be more error-prone.
Fixes bug: 28100673
Change-Id: I76bea975929a85eda354730d6c815567b412b160
diff --git a/vulkan/libvulkan/Android.mk b/vulkan/libvulkan/Android.mk
index 0979471..7830c26 100644
--- a/vulkan/libvulkan/Android.mk
+++ b/vulkan/libvulkan/Android.mk
@@ -45,6 +45,7 @@
driver.cpp \
driver_gen.cpp \
layers_extensions.cpp \
+ stubhal.cpp \
swapchain.cpp \
vulkan_loader_data.cpp
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk