| 129 | } |
| 130 | |
| 131 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa, device_table_map &map) { |
| 132 | VkuDeviceDispatchTable *pTable; |
| 133 | dispatch_key key = get_dispatch_key(device); |
| 134 | device_table_map::const_iterator it = map.find((void *)key); |
| 135 | |
| 136 | if (it == map.end()) { |
| 137 | auto table = std::make_unique<VkuDeviceDispatchTable>(); |
| 138 | pTable = table.get(); |
| 139 | map[(void *)key] = std::move(table); |
| 140 | } else { |
| 141 | return it->second.get(); |
| 142 | } |
| 143 | |
| 144 | vkuInitDeviceDispatchTable(device, pTable, gpa); |
| 145 | |
| 146 | return pTable; |
| 147 | } |
| 148 | |
| 149 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa) { |
| 150 | return initDeviceTable(device, gpa, tableMap); |
nothing calls this directly
no test coverage detected