Skip to content

Commit

Permalink
Clear the global PhysicalDevices map on vkDestroyInstance.
Browse files Browse the repository at this point in the history
A mapping is maintained in the values of this map that maps physical
devices to instances. If a driver uses the same id for physical devices
between two instances, this mapping is not updated and will point to
destroyed instances.
  • Loading branch information
pmuetschard committed Jan 25, 2019
1 parent 25695bb commit ee5ab36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gapis/api/vulkan/api/instance.api
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ cmd void vkDestroyInstance(
VkInstance instance,
AllocationCallbacks pAllocator) {
delete(Instances, instance)
for _, device, _ in PhysicalDevices {
delete(PhysicalDevices, device)
}
}

@indirect("VkInstance")
Expand Down

0 comments on commit ee5ab36

Please sign in to comment.