| 230 | } |
| 231 | |
| 232 | VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { |
| 233 | layer_data* instance_data = GetLayerDataPtr(instance, device_profile_api_dev_data_map); |
| 234 | if (!instance_data) { |
| 235 | return; |
| 236 | } |
| 237 | |
| 238 | uint32_t physical_device_count = 0; |
| 239 | instance_data->dispatch_table.EnumeratePhysicalDevices(instance, &physical_device_count, NULL); |
| 240 | std::vector<VkPhysicalDevice> physical_devices(physical_device_count); |
| 241 | VkResult result = |
| 242 | instance_data->dispatch_table.EnumeratePhysicalDevices(instance, &physical_device_count, physical_devices.data()); |
| 243 | if (result == VK_SUCCESS) { |
| 244 | for (VkPhysicalDevice physical_device : physical_devices) { |
| 245 | FreeLayerDataPtr(physical_device, device_profile_api_dev_data_map); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | instance_data->dispatch_table.DestroyInstance(instance, pAllocator); |
| 250 | FreeLayerDataPtr(instance, device_profile_api_dev_data_map); |
| 251 | } |
| 252 | |
| 253 | VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { |
| 254 | std::lock_guard<std::mutex> lock(global_lock); |
nothing calls this directly
no test coverage detected