From 6d1a08c9b98b20e21903f46f491016358e391c4c Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Tue, 26 May 2015 12:16:22 -0500 Subject: [PATCH] layers: Fixed dispatch table teardown issues in ObjectTracker Table pointers need to be saved before tables destroyed. --- vk-layer-generate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vk-layer-generate.py b/vk-layer-generate.py index 6f57e49f..184cf365 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -1330,6 +1330,7 @@ class ObjectTrackerSubcommand(Subcommand): destroy_line += ' destroy_obj(%s);\n' % (proto.params[2].name) destroy_line += ' loader_platform_thread_unlock_mutex(&objLock);\n' elif 'DestroyDevice' in proto.name: + using_line = ' VkLayerDispatchTable *pDisp = *(VkLayerDispatchTable **) device;\n' destroy_line = ' loader_platform_thread_lock_mutex(&objLock);\n' destroy_line += ' destroy_obj(device);\n' destroy_line += ' // Report any remaining objects\n' @@ -1347,6 +1348,7 @@ class ObjectTrackerSubcommand(Subcommand): destroy_line += ' destroyQueueMemRefLists();\n' destroy_line += ' loader_platform_thread_unlock_mutex(&objLock);\n' elif 'DestroyInstance' in proto.name: + using_line = ' VkLayerInstanceDispatchTable *pDisp = *(VkLayerInstanceDispatchTable **) instance;\n' destroy_line = ' loader_platform_thread_lock_mutex(&objLock);\n' destroy_line += ' destroy_obj(%s);\n' % (param0_name) destroy_line += ' // Report any remaining objects in LL\n' -- 2.34.1