From d4b4355b89e0c51d89c0dec0d6ec45ac352e626d Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 13 Jun 2018 16:16:07 +0100 Subject: [PATCH] Don't create aliasing fake physical devices --- renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index 97884541a..fb8e54900 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -46,8 +46,9 @@ static VkApplicationInfo renderdocAppInfo = { // code expect to copy it into a wrapped object static VkPhysicalDevice MakePhysicalDeviceHandleFromIndex(uint32_t physDeviceIndex) { - static uintptr_t loaderTable(0x100 + physDeviceIndex); - return VkPhysicalDevice(&loaderTable); + static uintptr_t loaderTable[32]; + loaderTable[physDeviceIndex] = (0x100 + physDeviceIndex); + return VkPhysicalDevice(&loaderTable[physDeviceIndex]); } static uint32_t GetPhysicalDeviceIndexFromHandle(VkPhysicalDevice physicalDevice)