From bee6c18117577f871a4737a6be77af04c6f11577 Mon Sep 17 00:00:00 2001 From: Awoloszyn Date: Thu, 5 Nov 2020 10:54:43 -0500 Subject: [PATCH] Fix for deletion of instances in multi-instance program. --- gapis/api/vulkan/api/instance.api | 4 +++- gapis/api/vulkan/synthetic.api | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gapis/api/vulkan/api/instance.api b/gapis/api/vulkan/api/instance.api index 4c93828b8a..fdf2f00bab 100644 --- a/gapis/api/vulkan/api/instance.api +++ b/gapis/api/vulkan/api/instance.api @@ -81,7 +81,9 @@ cmd void vkDestroyInstance( AllocationCallbacks pAllocator) { delete(Instances, instance) for _, device, _ in PhysicalDevices { - delete(PhysicalDevices, device) + if (PhysicalDevices[device].Instance == instance) { + delete(PhysicalDevices, device) + } } } diff --git a/gapis/api/vulkan/synthetic.api b/gapis/api/vulkan/synthetic.api index 958722ba11..72a953881b 100644 --- a/gapis/api/vulkan/synthetic.api +++ b/gapis/api/vulkan/synthetic.api @@ -38,7 +38,9 @@ cmd void replayDestroyVkInstance( // vkDestroyInstance() in vulkan.api. Change both together delete(Instances, instance) for _, device, _ in PhysicalDevices { - delete(PhysicalDevices, device) + if (PhysicalDevices[device].Instance == instance) { + delete(PhysicalDevices, device) + } } }