/* Invoke print_string_ptr (which is useful) on an item. */
static char *print_string(cJSON *item, printbuffer *p) { return print_string_ptr(item->pAllocator, item->valuestring, p); }
-/* Declare these prototypes. */
+/* Predeclare these prototypes. */
static const char *parse_value(cJSON *item, const char *value, bool *out_of_memory);
static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p);
static const char *parse_array(cJSON *item, const char *value, bool *out_of_memory);
bool out_of_memory = false;
*json = cJSON_Parse(inst ? &inst->alloc_callbacks : NULL, json_buf, &out_of_memory);
if (out_of_memory) {
- loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Out of Memory error occurred while parsing JSON file %s.",
+ loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Out of Memory error occured while parsing JSON file %s.",
filename);
res = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
fp_create_inst = loader_platform_get_proc_address(handle, "vkCreateInstance");
if (NULL == fp_create_inst) {
loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
- "loader_scanned_icd_add: Failed querying \'vkCreateInstance\' via dlsym/LoadLibrary for ICD %s", filename);
+ "loader_scanned_icd_add: Failed querying \'vkCreateInstance\' via dlsym/loadlibrary for ICD %s", filename);
goto out;
}
fp_get_inst_ext_props = loader_platform_get_proc_address(handle, "vkEnumerateInstanceExtensionProperties");
if (NULL == fp_get_inst_ext_props) {
loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
- "loader_scanned_icd_add: Could not get \'vkEnumerateInstanceExtensionProperties\' via dlsym/LoadLibrary "
+ "loader_scanned_icd_add: Could not get \'vkEnumerateInstanceExtensionProperties\' via dlsym/loadlibrary "
"for ICD %s",
filename);
goto out;
}
/* Processes a json manifest's library_path and the location of the json manifest to create the path of the library
- * The output is stored in out_fullpath by allocating a string - so its the caller's responsibility to free it
+ * The output is stored in out_fullpath by allocating a string - so its the caller's repsonsibility to free it
* The output is the combination of the base path of manifest_file_path concatenated with library path
* If library_path is an absolute path, we do not prepend the base path of manifest_file_path
*
goto out;
}
size_t cur_loc_in_out_fullpath = 0;
- // look for the last occurrence of DIRECTORY_SYMBOL in manifest_file_path
+ // look for the last occurance of DIRECTORY_SYMBOL in manifest_file_path
size_t last_directory_symbol = 0;
bool found_directory_symbol = false;
for (size_t i = 0; i < manifest_file_path_str_len; i++) {
if (manifest_file_path[i] == DIRECTORY_SYMBOL) {
last_directory_symbol = i + 1; // we want to include the symbol
found_directory_symbol = true;
- // dont break because we want to find the last occurrence
+ // dont break because we want to find the last occurance
}
}
// Add manifest_file_path up to the last directory symbol
return res;
}
-// Verify that all meta-layers in a layer list are valid.
+// Verify that all meta-layers in a layer verify_meta_layer_component_layerslist are valid.
VkResult verify_all_meta_layers(struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
struct loader_layer_list *instance_layers, bool *override_layer_present) {
VkResult res = VK_SUCCESS;
if (loader_cJSON_GetObjectItem(layer_node, "app_keys")) {
if (!props.is_override) {
loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
- "Layer %s contains app_keys, but any app_keys can only be provided by the override meta layer. "
+ "Layer %s contains app_keys, but any app_keys can only be provided by the override metalayer. "
"These will be ignored.",
props.info.layerName);
}
goto out;
}
- // If we should not look for layers using other mechanisms, assign settings_layers to instance_layers and jump to the
+ // If we should not look for layers using other mechanisms, assing settings_layers to instance_layers and jump to the
// output
if (!should_search_for_other_layers) {
*instance_layers = settings_layers;
goto out;
}
- // If we should not look for layers using other mechanisms, assign settings_layers to instance_layers and jump to the
+ // If we should not look for layers using other mechanisms, assing settings_layers to instance_layers and jump to the
// output
if (!should_search_for_other_layers) {
*instance_layers = settings_layers;
return (PFN_vkVoidFunction)terminator_CreateInstance;
}
- // While the spec is very clear that querying vkCreateDevice requires a valid VkInstance, because the loader allowed querying
+ // While the spec is very clear that quering vkCreateDevice requires a valid VkInstance, because the loader allowed querying
// with a NULL VkInstance handle for a long enough time, it is impractical to fix this bug in the loader
// As such, this is a bug to maintain compatibility for the RTSS layer (Riva Tuner Statistics Server) but may
- // be depended upon by other layers out in the wild.
+ // be dependend upon by other layers out in the wild.
if (!strcmp(pName, "vkCreateDevice")) {
return (PFN_vkVoidFunction)terminator_CreateDevice;
}
goto out;
}
} else {
- // Build the lists of active layers (including meta layers) and expanded layers (with meta layers resolved to their
+ // Build the lists of active layers (including metalayers) and expanded layers (with metalayers resolved to their
// components)
res = loader_add_implicit_layers(inst, layer_filters, &active_layers, &expanded_layers, instance_layers);
if (res != VK_SUCCESS) {
}
/**
* Iterates through all drivers and unloads any which do not contain physical devices.
- * This saves address space, which for 32 bit applications is scarce.
+ * This saves address space, which for 32 bit applications is scarse.
* This must only be called after a call to vkEnumeratePhysicalDevices that isn't just querying the count
*/
void unload_drivers_without_physical_devices(struct loader_instance *inst) {