1 /* 2 * 3 * Copyright (c) 2021-2022 The Khronos Group Inc. 4 * Copyright (c) 2021-2022 Valve Corporation 5 * Copyright (c) 2021-2022 LunarG, Inc. 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 * Author: Mark Young <marky@lunarg.com> 20 * 21 */ 22 23 #pragma once 24 25 #ifdef LOADER_ENABLE_LINUX_SORT 26 27 #include "loader_common.h" 28 29 // This function allocates an array in sorted_devices which must be freed by the caller if not null 30 VkResult linux_read_sorted_physical_devices(struct loader_instance *inst, uint32_t icd_count, 31 struct loader_phys_dev_per_icd *icd_devices, uint32_t phys_dev_count, 32 struct loader_physical_device_term **sorted_device_term); 33 34 // This function sorts an array in physical device groups 35 VkResult linux_sort_physical_device_groups(struct loader_instance *inst, uint32_t group_count, 36 struct loader_physical_device_group_term *sorted_group_term); 37 38 #endif // LOADER_ENABLE_LINUX_SORT