Skip to content

Commit

Permalink
Fix for deletion of instances in multi-instance program.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Nov 5, 2020
1 parent 52e6888 commit bee6c18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gapis/api/vulkan/api/instance.api
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion gapis/api/vulkan/synthetic.api
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit bee6c18

Please sign in to comment.