MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Profiles / initDeviceTable

Function initDeviceTable

layer/vk_layer_table.cpp:131–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131VkuDeviceDispatchTable *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
149VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa) {
150 return initDeviceTable(device, gpa, tableMap);

Callers

nothing calls this directly

Calls 1

get_dispatch_keyFunction · 0.85

Tested by

no test coverage detected