void destroy_dispatch_table(instance_table_map &map, dispatch_key key) { #if DISPATCH_MAP_DEBUG instance_table_map::const_iterator it = map.find((void *)key); if (it != map.end()) { fprintf(stderr, "destroy instance dispatch_table: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, it->second); } else { fprintf(stderr, "destroy instance dispatch table: map: 0x%p, key: 0x%p, table: UNKNOWN\n", &map, key); assert(it != map.end()); } #endif map.erase(key); }
VkLayerInstanceDispatchTable *instance_dispatch_table(void *object) { dispatch_key key = get_dispatch_key(object); instance_table_map::const_iterator it = tableInstanceMap.find((void *)key); #if DISPATCH_MAP_DEBUG if (it != tableInstanceMap.end()) { fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: 0x%p\n", &tableInstanceMap, object, key, it->second); } else { fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: UNKNOWN\n", &tableInstanceMap, object, key); } #endif assert(it != tableInstanceMap.end() && "Not able to find instance dispatch entry"); return it->second; }
void destroy_dispatch_table(instance_table_map &map, dispatch_key key) { instance_table_map::const_iterator it = map.find((void *)key); if (it != map.end()) { delete it->second; map.erase(it); } }
VkLayerInstanceDispatchTable *instance_dispatch_table(void *object) { dispatch_key key = get_dispatch_key(object); instance_table_map::const_iterator it = tableInstanceMap.find((void *)key); assert(it != tableInstanceMap.end() && "Not able to find instance dispatch entry"); return it->second; }