Lines Matching defs:list

94 // A list of ICDs that gets initialized when the loader does its global initialization. This list should never be used by anything
95 // other than EnumerateInstanceExtensionProperties(), vkDestroyInstance, and loader_release(). This list does not change
228 if (layer_properties->device_extension_list.capacity > 0 && NULL != layer_properties->device_extension_list.list) {
230 free_string_list(inst, &layer_properties->device_extension_list.list[i].entrypoints);
272 string_list->list = loader_instance_heap_calloc(inst, sizeof(char *) * allocated_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
273 if (NULL == string_list->list) {
285 string_list->list =
287 if (NULL == string_list->list) {
292 string_list->list = loader_instance_heap_realloc(inst, string_list->list, sizeof(char *) * string_list->allocated_count,
294 if (NULL == string_list->list) {
298 memset(string_list->list + string_list->allocated_count, 0, string_list->allocated_count);
301 string_list->list[string_list->count++] = str;
324 if (string_list->list) {
326 loader_instance_heap_free(inst, string_list->list[i]);
327 string_list->list[i] = NULL;
329 loader_instance_heap_free(inst, string_list->list);
385 if (compare_vk_extension_properties(&ext_list->list[i], vk_ext_prop)) return true;
393 if (compare_vk_extension_properties(&ext_list->list[i].props, ext_prop)) return true;
410 void *new_ptr = loader_instance_heap_realloc(inst, layer_list->list, layer_list->capacity, layer_list->capacity * 2,
413 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_append_layer_property: realloc failed for layer list");
417 layer_list->list = new_ptr;
418 memset((uint8_t *)layer_list->list + layer_list->capacity, 0, layer_list->capacity);
421 memcpy(&layer_list->list[layer_list->count], layer_property, sizeof(struct loader_layer_properties));
431 // Search the given layer list for a layer property matching the given layer name
434 const VkLayerProperties *item = &layer_list->list[i].info;
435 if (strcmp(name, item->layerName) == 0) return &layer_list->list[i];
443 const VkLayerProperties *item = &layer_list->list[i]->info;
444 if (strcmp(name, item->layerName) == 0) return layer_list->list[i];
449 // Search the given layer list for a layer matching the given layer name
460 // Search the given meta-layer's component list for a layer matching the given layer name
464 if (!strcmp(meta_layer_props->component_layer_names.list[comp_layer], layer_name)) {
468 loader_find_layer_property(meta_layer_props->component_layer_names.list[comp_layer], layer_list);
479 if (!strcmp(meta_layer_props->blacklist_layer_names.list[black_layer], layer_name)) {
486 // Remove all layer properties entries from the list
492 if (layer_list->list[i].lib_handle) {
493 loader_platform_close_library(layer_list->list[i].lib_handle);
495 layer_list->list[i].lib_name);
496 layer_list->list[i].lib_handle = NULL;
498 loader_free_layer_properties(inst, &(layer_list->list[i]));
504 loader_instance_heap_free(inst, layer_list->list);
514 loader_free_layer_properties(inst, &(layer_list->list[layer_to_remove]));
516 // Remove the current invalid meta-layer from the layer list. Use memmove since we are
518 memmove(&layer_list->list[layer_to_remove], &layer_list->list[layer_to_remove + 1],
526 // Remove all layers in the layer list that are blacklisted by the override layer.
535 struct loader_layer_properties cur_layer_prop = layer_list->list[j];
547 "Removing that layer from current layer list.",
558 // Remove all layers in the layer list that are not found inside any implicit meta-layers.
565 layer_list->list[i].keep = false;
569 struct loader_layer_properties *cur_layer_prop = &layer_list->list[i];
576 struct loader_layer_properties *layer_to_check = &layer_list->list[j];
592 // dynamically updated if we delete a layer property in the list).
594 struct loader_layer_properties *cur_layer_prop = &layer_list->list[i];
598 "loader_remove_layers_not_in_implicit_meta_layers : Implicit meta-layers are active, and layer %s is not list "
599 "inside of any. So removing layer from current layer list.",
708 list_info->list = loader_instance_heap_calloc(inst, capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
709 if (list_info->list == NULL) {
710 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_init_generic_list: Failed to allocate space for generic list");
717 void loader_destroy_generic_list(const struct loader_instance *inst, struct loader_generic_list *list) {
718 loader_instance_heap_free(inst, list->list);
719 memset(list, 0, sizeof(struct loader_generic_list));
726 if (ext_list->list == NULL || ext_list->capacity == 0) {
741 // add to list at end
744 void *new_ptr = loader_instance_heap_realloc(inst, ext_list->list, ext_list->capacity, ext_list->capacity * 2,
748 "loader_add_to_ext_list: Failed to reallocate space for extension list");
751 ext_list->list = new_ptr;
757 memcpy(&ext_list->list[ext_list->count], cur_ext, sizeof(VkExtensionProperties));
765 // If this is a duplicate, this function free's the passed in entries - as in it takes ownership over that list (if it is not
771 if (ext_list->list == NULL || ext_list->capacity == 0) {
784 // add to list at end
787 void *new_ptr = loader_instance_heap_realloc(inst, ext_list->list, ext_list->capacity, ext_list->capacity * 2,
792 "loader_add_to_dev_ext_list: Failed to reallocate space for device extension list");
796 ext_list->list = new_ptr;
802 memcpy(&ext_list->list[idx].props, props, sizeof(*props));
804 ext_list->list[idx].entrypoints = *entrys;
816 bool loader_init_pointer_layer_list(const struct loader_instance *inst, struct loader_pointer_layer_list *list) {
817 list->capacity = 32 * sizeof(void *);
818 list->list = loader_instance_heap_calloc(inst, list->capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
819 if (list->list == NULL) {
822 list->count = 0;
838 loader_instance_heap_free(inst, layer_list->list);
842 // Append layer properties defined in prop_list to the given layer_info list
843 VkResult loader_add_layer_properties_to_list(const struct loader_instance *inst, struct loader_pointer_layer_list *list,
845 if (list->list == NULL || list->capacity == 0) {
846 if (!loader_init_pointer_layer_list(inst, list)) {
852 if (((list->count + 1) * sizeof(struct loader_layer_properties)) >= list->capacity) {
853 size_t new_capacity = list->capacity * 2;
855 loader_instance_heap_realloc(inst, list->list, list->capacity, new_capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
861 list->list = new_ptr;
862 list->capacity = new_capacity;
864 list->list[list->count++] = props;
892 // Search the given search_list for any layers in the props list. Add these to the
1000 if (strcmp(inst->instance_layer_list.list[i].info.layerName, VK_OVERRIDE_LAYER_NAME) == 0) {
1001 override = &inst->instance_layer_list.list[i];
1007 if (strcmp(override->component_layer_names.list[i], prop->info.layerName) == 0) {
1045 // Add the component layers of a meta-layer to the active list of layers
1057 loader_find_layer_property(prop->component_layer_names.list[comp_layer], source_list);
1099 prop->component_layer_names.list[comp_layer], prop->component_layer_names.list[comp_layer]);
1104 // Add this layer to the overall target list (not the expanded one)
1115 VkExtensionProperties *get_extension_property(const char *name, const struct loader_extension_list *list) {
1116 for (uint32_t i = 0; i < list->count; i++) {
1117 if (strcmp(name, list->list[i].extensionName) == 0) return &list->list[i];
1122 VkExtensionProperties *get_dev_extension_property(const char *name, const struct loader_device_extension_list *list) {
1123 for (uint32_t i = 0; i < list->count; i++) {
1124 if (strcmp(name, list->list[i].props.extensionName) == 0) return &list->list[i].props;
1142 // loader_coalesce_extensions(void) - add extension records to the list of global
1162 // traverse scanned icd list adding non-duplicate extensions to the list
1174 // See if the extension is in the list of supported extensions
1177 if (strcmp(icd_exts.list[j].extensionName, LOADER_INSTANCE_EXTENSIONS[k]) == 0) {
1183 // If it isn't in the list, remove it
1186 icd_exts.list[k - 1] = icd_exts.list[k];
1194 res = loader_add_to_ext_list(inst, inst_exts, icd_exts.count, icd_exts.list);
1202 // Traverse loader's extensions, adding non-duplicate extensions to the list
1335 // Prepend to the list
1398 "loader_scanned_icd_init: Realloc failed for layer list when attempting to add new layer");
1494 "loader_add_direct_driver: Realloc failed on icd library list for ICD index %u", index);
1549 // Look through the enabled extension list, make sure VK_LUNARG_direct_driver_loading is present
1782 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_scanned_icd_add: Realloc failed on icd library list for ICD %s",
1899 // Get next file or dirname given a string list or registry key path
1903 // The next path (or NULL) in the list is returned in next_path.
1987 // Given a filename (file) and a list of paths (in_dirs), try to find an existing
1997 // find if file exists after prepending paths in given list
2024 loader_find_layer_property(prop->component_layer_names.list[comp_layer], instance_layers);
2029 prop->info.layerName, prop->component_layer_names.list[comp_layer], comp_layer);
2047 if (!strcmp(prop->info.layerName, prop->component_layer_names.list[comp_layer])) {
2050 "list at index %d. Skipping this layer.",
2060 // Make sure if the layer is using a meta-layer in its component list that we also verify that.
2065 prop->info.layerName, prop->component_layer_names.list[comp_layer]);
2075 // If layer logging is on, list the internals included in the meta-layer
2077 loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " [%d] %s", comp_layer, prop->component_layer_names.list[comp_layer]);
2083 // list, so that anyone querying extensions will only need to look at the meta-layer
2089 loader_find_layer_property(prop->component_layer_names.list[comp_layer], instance_layers);
2091 if (NULL != comp_prop->instance_extension_list.list) {
2094 prop->info.layerName, prop->component_layer_names.list[comp_layer],
2095 comp_prop->instance_extension_list.list[ext].extensionName);
2097 if (!has_vk_extension_property(&comp_prop->instance_extension_list.list[ext], &prop->instance_extension_list)) {
2099 &comp_prop->instance_extension_list.list[ext]);
2106 if (NULL != comp_prop->device_extension_list.list) {
2109 prop->info.layerName, prop->component_layer_names.list[comp_layer],
2110 comp_prop->device_extension_list.list[ext].props.extensionName);
2112 if (!has_vk_dev_ext_property(&comp_prop->device_extension_list.list[ext].props, &prop->device_extension_list)) {
2114 &comp_prop->device_extension_list.list[ext].props, NULL);
2125 // Verify that all meta-layers in a layer list are valid.
2131 struct loader_layer_properties *prop = &instance_layers->list[i];
2136 // If any meta layer is valid, update its extension list to include the extensions from its component layers.
2146 "Removing meta-layer %s from instance layer list since it appears invalid.", prop->info.layerName);
2174 struct loader_layer_properties *props = &instance_layers->list[i];
2178 if (strcmp(props->app_key_paths.list[j], cur_path) == 0) {
2195 "--Override layer found but not used because app \'%s\' is not in \'app_keys\' list!", cur_path);
2219 // Should be at most 1 override layer in the list now.
2279 // Add list entry
2416 if (NULL != props.override_paths.list && !loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
2445 // Now get all optional items and objects and put in list:
2652 // file, add entry to the layer_list. Fill out the layer_properties in this list
2659 // is added to the list.
2815 // If the file found is a manifest file name, add it to the out_files manifest list.
3162 // Add the remaining paths to the list
3302 loader_log(inst, log_flags, 0, " %s", out_files->list[cur_file]);
3346 // This function scans the appropriate locations for a list of JSON manifest files based on the
3355 // A string list of manifest files to be opened in out_files param.
3357 // When done using the list in out_files, pointers should be freed.
3594 // (on result == VK_SUCCESS) a list of icds that were discovered
3603 // Set up the ICD Trampoline list so elements can be written into it.
3630 // Get a list of manifest files for ICDs
3646 icd_res = loader_parse_icd_manifest(inst, manifest_files.list[i], &icd_details[i], skipped_portability_drivers);
3656 char *just_filename_str = strrchr(manifest_files.list[i], DIRECTORY_SYMBOL);
3660 just_filename_str = manifest_files.list[i];
3741 char *file_str = manifest_files.list[i];
3780 override_path_size += determine_data_file_path_size(prop->override_paths.list[j], 0);
3788 copy_data_file_info(prop->override_paths.list[j], NULL, 0, &cur_write_ptr);
3832 struct loader_layer_properties *prop = &regular_instance_layers.list[i];
3842 // Get a list of manifest files for explicit layers
3848 // Verify any meta-layers in the list are valid and all the component layers are
3849 // actually present in the available layer list
3864 if (!loader_layer_is_available(inst, filters, &regular_instance_layers.list[i])) {
3914 struct loader_layer_properties *prop = &regular_instance_layers.list[i];
3937 // Verify any meta-layers in the list are valid and all the component layers are
3938 // actually present in the available layer list
3953 if (!loader_implicit_layer_is_enabled(inst, layer_filters, &regular_instance_layers.list[i])) {
3991 // Check if any drivers support the function, and if so, add it to the unknown function list
4133 // look up the loader_instance in our list by comparing dispatch tables, as
4226 struct loader_layer_properties *prop = &source_list->list[src_layer];
4239 struct loader_layer_properties *prop = inst->expanded_activated_layer_list.list[i];
4260 "loader_enable_instance_layers: Failed to initialize application version of the layer list");
4267 "loader_enable_instance_layers: Failed to initialize expanded version of the layer list");
4344 if (!strcmp(icd_exts->list[j].extensionName, VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
4350 struct loader_layer_properties *layer = inst->app_activated_layer_list.list[j];
4352 if (!strcmp(layer->device_extension_list.list[k].props.extensionName, VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
4381 icd_exts.list = NULL;
4384 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "vkCreateDevice: Failed to create ICD extension list");
4397 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "vkCreateDevice: Failed to add extensions to list");
4404 loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "vkCreateDevice: Failed to validate extensions in list");
4424 // Initialize any device extension dispatch entry's from the instance list
4467 if (NULL != icd_exts.list) {
4491 // Given the list of layers to activate in the loader_instance
4547 struct loader_layer_properties *layer_prop = inst->expanded_activated_layer_list.list[i];
4667 struct loader_layer_properties *exp_layer_prop = inst->expanded_activated_layer_list.list[exp];
4712 "list of activated layers%c",
4841 } else if (inst->enabled_layer_names.list != NULL) {
4845 if (strcmp(device_layer_names, inst->enabled_layer_names.list[i]) != 0) {
4860 // Before we continue, we need to find out if the KHR_device_group extension is in the enabled list. If it is, we then
4861 // need to look for the corresponding VkDeviceGroupDeviceCreateInfo struct in the device list. This is because we
4926 struct loader_layer_properties *layer_prop = inst->expanded_activated_layer_list.list[i];
4935 // the list.
5076 const char *const *ppEnabledLayerNames, const struct loader_layer_list *list) {
5093 prop = loader_find_layer_property(ppEnabledLayerNames[i], list);
5096 "loader_validate_layers: Layer %d does not exist in the list of available layers", i);
5180 // See if the extension is in the list of supported extensions
5189 // If it isn't in the list, return an error
5192 "loader_validate_instance_extensions: Extension %s not found in list of known instance extensions.",
5207 // Not in global list, search layer extension lists
5210 get_extension_property(pCreateInfo->ppEnabledExtensionNames[i], &expanded_layers.list[j]->instance_extension_list);
5217 loader_find_layer_property(expanded_layers.list[j]->info.layerName, instance_layers);
5260 // Not in global list, search activated layer extension lists
5262 struct loader_layer_properties *layer_prop = activated_device_layers->list[j];
5354 "terminator_CreateInstance: Failed to add ICD %d to ICD trampoline list.", i);
5359 // If any error happens after here, we need to remove the ICD from the list,
5367 // traverse scanned icd list adding non-duplicate extensions to the list
5574 // If no ICDs were added to instance list and res is unchanged from it's initial value, the loader was unable to
5623 // Remove this instance from the list of instances:
5629 // Remove this instance from the list:
5707 icd_exts.list = NULL;
5764 // Before we continue, If KHX_device_group is the list of enabled and viable extensions, then we then need to look for the
5765 // corresponding VkDeviceGroupDeviceCreateInfo struct in the device list and replace all the physical device values (which
5949 if (NULL != icd_exts.list) {
6050 // Something wasn't found, so it's new so add it to the new list
6156 // Look for physical_device in the provided phys_devs list, return true if found and put the index into out_idx, otherwise
6217 * Once all physical devices are acquired, they need to be pulled into a single list of `loader_physical_device_term`'s.
6236 // Get the physical devices supported by platform sorting mechanism into a separate list
6343 // Get the physical devices supported by platform sorting mechanism into a separate list
6364 // now set the count to the capacity, as now the list is filled in
6433 // Swap out old and new devices list
6461 // Generate a list of all the devices and convert them to the loader ID
6553 struct loader_layer_properties *props = &inst->instance_layer_list.list[i];
6568 memcpy(&pProperties[i], &dev_ext_list->list[i].props, sizeof(VkExtensionProperties));
6599 struct loader_layer_properties *layer_props = icd_term->this_instance->expanded_activated_layer_list.list[i];
6603 struct loader_dev_ext_props *cur_ext_props = &layer_ext_list->list[j];
6634 // Then allocate memory to store the physical device extension list + the extensions layers provide
6637 all_exts.list = loader_instance_heap_alloc(icd_term->this_instance, all_exts.capacity, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
6638 if (NULL == all_exts.list) {
6643 // Get the available device extensions and put them in all_exts.list
6644 res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &all_exts.count, all_exts.list);
6649 // Iterate over active layers, if they are an implicit layer, add their device extensions to all_exts.list
6651 struct loader_layer_properties *layer_props = icd_term->this_instance->expanded_activated_layer_list.list[i];
6655 res = loader_add_to_ext_list(icd_term->this_instance, &all_exts, 1, &layer_ext_list->list[j].props);
6757 struct loader_layer_properties *props = &instance_layers.list[i];
6786 struct loader_extension_list *ext_list = &instance_layers.list[i].instance_extension_list;
6787 loader_add_to_ext_list(NULL, &local_ext_list, ext_list->count, ext_list->list);
6805 memcpy(&pProperties[i], &global_ext_list->list[i], sizeof(VkExtensionProperties));
6847 if (instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_ON ||
6848 instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_DEFAULT) {
6861 if (instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_ON ||
6862 instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_DEFAULT) {
6863 memcpy(&pProperties[output_properties_index], &instance_layer_list.list[i].info, sizeof(VkLayerProperties));
6934 // If GPUs not sorted yet, look through them and generate list of all available GPUs
6962 // Get the physical devices supported by platform sorting mechanism into a separate list
7086 // Get the physical devices supported by platform sorting mechanism into a separate list
7118 "\'EnumeratePhysicalDeviceGroups\' in list returned by \'EnumeratePhysicalDevices\'",
7234 // Swap in the new physical device group list