summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2018-02-01 10:38:48 -0800
committer Yiwei Zhang <zzyiwei@google.com> 2018-02-01 23:49:27 +0000
commitfc9199f9ee7b33105276d5becd3bc882c28c9646 (patch)
treec29246714ab4d11cd299440206516d0173b953a1
parent0d3890a91fcc9e3c7c37c252294a6480c2638d30 (diff)
stubhal: add EnumeratePhysicalDeviceGroups
Since in VK1.1 loader VkPhysicalDeviceGroupProperties get queried by calling vkEnumeratePhysicalDeviceGroups, the same stub function needs to be added in stubhal. e.g. gce_x86_phone-userdebug_fastbuild3c_linux is using stubhal. Bug: b/72809176 Test: VulkanFeaturesTest Test: adb shell cmd gpu vkjson Change-Id: I16f9e5fd1cb8845edd3f1ef171af7942c671647f
-rw-r--r--vulkan/libvulkan/stubhal.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/vulkan/libvulkan/stubhal.cpp b/vulkan/libvulkan/stubhal.cpp
index 726e8549d7..7404b94df4 100644
--- a/vulkan/libvulkan/stubhal.cpp
+++ b/vulkan/libvulkan/stubhal.cpp
@@ -97,6 +97,14 @@ VKAPI_ATTR VkResult EnumeratePhysicalDevices(VkInstance /*instance*/,
return VK_SUCCESS;
}
+VKAPI_ATTR VkResult
+EnumeratePhysicalDeviceGroups(VkInstance /*instance*/,
+ uint32_t* count,
+ VkPhysicalDeviceGroupProperties* /*properties*/) {
+ *count = 0;
+ return VK_SUCCESS;
+}
+
VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance,
const char* name) {
if (strcmp(name, "vkCreateInstance") == 0)
@@ -108,6 +116,9 @@ VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance,
EnumerateInstanceExtensionProperties);
if (strcmp(name, "vkEnumeratePhysicalDevices") == 0)
return reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices);
+ if (strcmp(name, "vkEnumeratePhysicalDeviceGroups") == 0)
+ return reinterpret_cast<PFN_vkVoidFunction>(
+ EnumeratePhysicalDeviceGroups);
if (strcmp(name, "vkGetInstanceProcAddr") == 0)
return reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr);
// Per the spec, return NULL if instance is NULL.