Loading vulkan/libvulkan/stubhal.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ VKAPI_ATTR VkResult EnumeratePhysicalDevices(VkInstance /*instance*/, return VK_SUCCESS; } VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance /*instance*/, VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name) { if (strcmp(name, "vkCreateInstance") == 0) return reinterpret_cast<PFN_vkVoidFunction>(CreateInstance); Loading @@ -110,7 +110,9 @@ VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance /*instance*/, return reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices); if (strcmp(name, "vkGetInstanceProcAddr") == 0) return reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr); // Per the spec, return NULL if instance is NULL. if (!instance) return nullptr; // None of the other Vulkan functions should ever be called, as they all // take a VkPhysicalDevice or other object obtained from a physical device. return reinterpret_cast<PFN_vkVoidFunction>(NoOp); Loading Loading
vulkan/libvulkan/stubhal.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ VKAPI_ATTR VkResult EnumeratePhysicalDevices(VkInstance /*instance*/, return VK_SUCCESS; } VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance /*instance*/, VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name) { if (strcmp(name, "vkCreateInstance") == 0) return reinterpret_cast<PFN_vkVoidFunction>(CreateInstance); Loading @@ -110,7 +110,9 @@ VKAPI_ATTR PFN_vkVoidFunction GetInstanceProcAddr(VkInstance /*instance*/, return reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices); if (strcmp(name, "vkGetInstanceProcAddr") == 0) return reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr); // Per the spec, return NULL if instance is NULL. if (!instance) return nullptr; // None of the other Vulkan functions should ever be called, as they all // take a VkPhysicalDevice or other object obtained from a physical device. return reinterpret_cast<PFN_vkVoidFunction>(NoOp); Loading