diff options
| author | 2017-01-06 18:38:58 +0000 | |
|---|---|---|
| committer | 2017-01-06 18:38:58 +0000 | |
| commit | dfb2b9bda6eba216ada854241b25f281b833a83b (patch) | |
| tree | ba9d652886c3ebe38e836f5573c96c1efea46ccb /vulkan/libvulkan/api.cpp | |
| parent | ace30d2b6e1773a381e321d1c0e895c4d40646d4 (diff) | |
| parent | 1531bf11e3ea065137562ce29e07ee5e40f3bacc (diff) | |
Merge "vulkan: Correct access after free issue"
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
| -rw-r--r-- | vulkan/libvulkan/api.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp index 4d30bbb965..f5daca7020 100644 --- a/vulkan/libvulkan/api.cpp +++ b/vulkan/libvulkan/api.cpp @@ -1049,7 +1049,8 @@ VkBool32 LayerChain::DebugReportCallback(VkDebugReportFlagsEXT flags, VkResult LayerChain::CreateInstance(const VkInstanceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkInstance* instance_out) { - LayerChain chain(true, driver::DebugReportLogger(*create_info), + const driver::DebugReportLogger logger(*create_info); + LayerChain chain(true, logger, (allocator) ? *allocator : driver::GetDefaultAllocator()); VkResult result = chain.ActivateLayers(create_info->ppEnabledLayerNames, @@ -1074,8 +1075,9 @@ VkResult LayerChain::CreateDevice(VkPhysicalDevice physical_dev, const VkDeviceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkDevice* dev_out) { + const driver::DebugReportLogger logger = driver::Logger(physical_dev); LayerChain chain( - false, driver::Logger(physical_dev), + false, logger, (allocator) ? *allocator : driver::GetData(physical_dev).allocator); VkResult result = chain.ActivateLayers( |