diff options
| author | 2016-05-27 08:22:49 +0000 | |
|---|---|---|
| committer | 2016-05-27 08:22:49 +0000 | |
| commit | a101f6a446722697e0ed6afb128829937b90d60a (patch) | |
| tree | 735eb9bb1d2cb43d152808877cc2f2503a746f36 | |
| parent | f7f2b0fd059bc26e27c022f3fb446fc74eab6c88 (diff) | |
| parent | 61b25fdffc360ab70e1f33be0bb43c911150277b (diff) | |
Merge "vulkan: fix crash when only non-global layers are enabled" into nyc-dev
| -rw-r--r-- | vulkan/libvulkan/api.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp index 805366820f..b699fe97fc 100644 --- a/vulkan/libvulkan/api.cpp +++ b/vulkan/libvulkan/api.cpp @@ -602,6 +602,13 @@ VkResult LayerChain::ActivateLayers(VkPhysicalDevice physical_dev, new (&layers_[layer_count_++]) ActiveLayer{GetLayerRef(l), {}}; } + // this may happen when all layers are non-global ones + if (!layer_count_) { + get_instance_proc_addr_ = driver::GetInstanceProcAddr; + get_device_proc_addr_ = driver::GetDeviceProcAddr; + return VK_SUCCESS; + } + SetupLayerLinks(); return VK_SUCCESS; |