layers: fix threading destroy instance
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Fri, 15 Jan 2016 18:58:33 +0000 (11:58 -0700)
committerJon Ashburn <jon@lunarg.com>
Thu, 21 Jan 2016 01:04:49 +0000 (18:04 -0700)
The threading layer was using the generic destroy_instance
utility when it should be using the utility that takes
a map.

layers/vk_layer_table.h
vk-layer-generate.py

index 816b6a6..04ea266 100644 (file)
@@ -54,3 +54,5 @@ VkLayerDeviceCreateInfo *get_chain_info(const VkDeviceCreateInfo *pCreateInfo);
 
 void destroy_device_dispatch_table(dispatch_key key);
 void destroy_instance_dispatch_table(dispatch_key key);
+void destroy_dispatch_table(device_table_map &map, dispatch_key key);
+void destroy_dispatch_table(instance_table_map &map, dispatch_key key);
index 6c8a2c8..f8518ee 100755 (executable)
@@ -2456,7 +2456,7 @@ class ThreadingSubcommand(Subcommand):
                          '    dispatch_key key = get_dispatch_key(instance);\n'
                          '    VkLayerInstanceDispatchTable *pInstanceTable = get_dispatch_table(threading_instance_table_map, %s);\n' % proto.params[0].name +
                          '    %spInstanceTable->%s;\n' % (ret_val, proto.c_call()) +
-                         '    destroy_instance_dispatch_table(key);\n'
+                         '    destroy_dispatch_table(threading_instance_table_map, key);\n'
                          '\n'
                          '    // Clean up logging callback, if any\n'
                          '    layer_data *my_data = get_my_data_ptr(key, layer_data_map);\n'