KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

PreRecord Free/Destroy calls #2620

Closed jzulauf-lunarg closed 6 years ago

jzulauf-lunarg commented 6 years ago

Fixes #2607 and #2608

To avoid Destroy/Create and Free/Alloc race conditions (when a driver returns a destroyed(freed) handle between the PreCall and PostCall phases of a validation intercept routine, PostCallRecord functionality has been moved to PreCall. This affects the following calls

FreeMemory
DestroyFence
DestroySemaphore
DestroyEvent
DestroyQueryPool
DestroyBuffer
DestroyBufferView
DestroyImage
DestroyImageView
DestroyPipeline
DestroySampler
DestroyDescriptorSetLayout
DestroyFramebuffer
DestroyRenderPass
FreeDescriptorSets

Did not alter the destroy functions for Instance, Device, or the Debug or layer extensions.

@cnorthrop -- this change touches a lot of routines making sure the Android view is okay

DominikWitczakAMD commented 6 years ago

While I can't comment on actual changes in the layer since I don't have any experience working with that code, I can definitely confirm I can't repro the reported issues with these changes in. Good work :-)