These creep in over time, and make the codebase harder to understand due to spelling
errors causing confusion when reading comments.
/* 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); }
-/* Predeclare these prototypes. */
+/* Declare 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 occured while parsing JSON file %s.",
+ loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Out of Memory error occurred while parsing JSON file %s.",
filename);
res = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
// It is the callers responsibility to free out_string.
VkResult loader_parse_json_string(cJSON *object, const char *key, char **out_string);
-// Given a cJSON object, find the array of strings assocated with they key and writes the count into out_count and data into
+// Given a cJSON object, find the array of strings associated with they key and writes the count into out_count and data into
// out_array_of_strings. It is the callers responsibility to free out_array_of_strings.
VkResult loader_parse_json_array_of_strings(const struct loader_instance *inst, cJSON *object, const char *key,
struct loader_string_list *string_list);
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 repsonsibility to free it
+ * The output is stored in out_fullpath by allocating a string - so its the caller's responsibility 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 occurance of DIRECTORY_SYMBOL in manifest_file_path
+ // look for the last occurrence 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 occurance
+ // dont break because we want to find the last occurrence
}
}
// Add manifest_file_path up to the last directory symbol
return res;
}
-// Verify that all meta-layers in a layer verify_meta_layer_component_layerslist are valid.
+// Verify that all meta-layers in a layer list 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 metalayer. "
+ "Layer %s contains app_keys, but any app_keys can only be provided by the override meta layer. "
"These will be ignored.",
props.info.layerName);
}
goto out;
}
- // If we should not look for layers using other mechanisms, assing settings_layers to instance_layers and jump to the
+ // If we should not look for layers using other mechanisms, assign 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, assing settings_layers to instance_layers and jump to the
+ // If we should not look for layers using other mechanisms, assign 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 quering vkCreateDevice requires a valid VkInstance, because the loader allowed querying
+ // While the spec is very clear that querying 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 dependend upon by other layers out in the wild.
+ // be depended 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 metalayers) and expanded layers (with metalayers resolved to their
+ // Build the lists of active layers (including meta layers) and expanded layers (with meta layers resolved to their
// components)
res = loader_add_implicit_layers(inst, layer_filters, &active_layers, &expanded_layers, instance_layers);
if (res != VK_SUCCESS) {
};
#if defined(LOADER_ENABLE_LINUX_SORT)
-// Structure for storing the relevent device information for selecting a device.
-// NOTE: Needs to be defined here so we can store this content in the term structrue
+// Structure for storing the relevant device information for selecting a device.
+// NOTE: Needs to be defined here so we can store this content in the term structure
// for quicker sorting.
struct LinuxSortedDeviceInfo {
// Associated Vulkan Physical Device
#include <winternl.h>
#include <strsafe.h>
#if defined(__MINGW32__)
-#undef strcpy // fix error with redfined strcpy when building with MinGW-w64
+#undef strcpy // fix error with redefined strcpy when building with MinGW-w64
#endif
#include <dxgi1_6.h>
#include "adapters.h"
goto out;
}
- // If this is a string and not a multi-string, we don't want to go throught the loop more than once
+ // If this is a string and not a multi-string, we don't want to go through the loop more than once
if (full_info->value_type == REG_SZ) {
break;
}
return VK_SUCCESS;
}
-// Whenever there are multiple drivers for the same hardware and one of the drivers is an implementation layered ontop of another
+// Whenever there are multiple drivers for the same hardware and one of the drivers is an implementation layered on top of another
// API (such as the Dozen driver which converts vulkan to Dx12), we want to make sure the layered driver appears after the 'native'
// driver. This function iterates over all physical devices and make sure any with matching LUID's are sorted such that drivers with
// a underlyingAPI of VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT are ordered after drivers without it.
// Corresponds to the settings object that has no app keys
int global_settings_index = -1;
- // Corresponds to the settings object which has a matchign app key
+ // Corresponds to the settings object which has a matching app key
int index_to_use = -1;
char current_process_path[1024];
}
// The special layer location that indicates where unordered layers should go only should have the
- // settings_control_value set - everythign else should be NULL
+ // settings_control_value set - everything else should be NULL
if (layer_config->control == LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
struct loader_layer_properties props = {0};
props.settings_control_value = LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION;
} loader_settings_layer_control;
// If a loader_settings_layer_configuration has a name of loader_settings_unknown_layers_location, then it specifies that the
-// layer configuation it was found in shall be the location all layers not listed in the settings file that are enabled.
+// layer configuration it was found in shall be the location all layers not listed in the settings file that are enabled.
#define LOADER_SETTINGS_UNKNOWN_LAYERS_LOCATION "loader_settings_unknown_layers_location"
#define LOADER_SETTINGS_MAX_NAME_SIZE 256U;
} loader_settings;
// Call this function to get the current settings that the loader should use.
-// It will open up the current loader settings file and return a loader_settigns in out_loader_settings if it.
+// It will open up the current loader settings file and return a loader_settings in out_loader_settings if it.
// It should be called on every call to the global functions excluding vkGetInstanceProcAddr
// Caller is responsible for cleaning up by calling free_loader_settings()
VkResult get_loader_settings(const struct loader_instance* inst, loader_settings* out_loader_settings);
}
#endif // defined (__QNX__)
-// Compatability with compilers that don't support __has_feature
+// Compatibility with compilers that don't support __has_feature
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif