From 836a0fe6d2ba38e7371f1b7d2a8533983c4fbea3 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 25 Aug 2025 16:54:08 -0500 Subject: [PATCH] Fix spelling mistakes --- BUILD.md | 2 +- CMakeLists.txt | 8 ++++---- CONTRIBUTING.md | 2 +- loader/CMakeLists.txt | 2 +- loader/cJSON.h | 2 +- loader/generated/vk_object_types.h | 2 +- loader/loader.c | 10 +++++----- loader/loader_environment.c | 4 ++-- loader/loader_environment.h | 4 ++-- loader/loader_windows.c | 2 +- loader/settings.c | 2 +- loader/trampoline.c | 12 ++++++------ scripts/generate_source.py | 2 +- scripts/generators/helper_file_generator.py | 2 +- tests/loader_regression_tests.cpp | 2 +- 15 files changed, 29 insertions(+), 29 deletions(-) diff --git a/BUILD.md b/BUILD.md index 8c37b70ba..d5623ddfa 100644 --- a/BUILD.md +++ b/BUILD.md @@ -233,7 +233,7 @@ cmake --build . --target loader_codegen `clang-format` is run on generated code files so that the generator scripts do not need format their output manually. If `clang-format` is not available when running code generation, a warning will -be issued but does not stop code generation from occuring. +be issued but does not stop code generation from occurring. ### Build Options diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e370dbc3..75dca4ad6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR (CMAKE_C_COMPILER_ID STREQUAL "Clang" A # Prevent from polluting the code. guards against things like MIN and MAX target_compile_definitions(loader_common_options INTERFACE WIN32_LEAN_AND_MEAN) - # For some reason Advapi32.lib needs to be explicitely linked to when building for Arm (32 bit) on Windows, but isn't required on any other architecture + # For some reason Advapi32.lib needs to be explicitly linked to when building for Arm (32 bit) on Windows, but isn't required on any other architecture if (SYSTEM_PROCESSOR MATCHES "arm" AND CMAKE_SIZEOF_VOID_P EQUAL 4) target_link_libraries(loader_common_options INTERFACE Advapi32) endif() @@ -241,7 +241,7 @@ endif() target_compile_definitions(loader_common_options INTERFACE $<$:DEBUG;GIT_BRANCH_NAME="${GIT_BRANCH_NAME}";GIT_TAG_INFO="${GIT_TAG_INFO}">) if (NOT (WIN32 OR APPLE)) - # Check for the existance of the secure_getenv or __secure_getenv commands + # Check for the existence of the secure_getenv or __secure_getenv commands include(CheckFunctionExists) check_function_exists(secure_getenv HAVE_SECURE_GETENV) @@ -254,12 +254,12 @@ if (NOT (WIN32 OR APPLE)) target_compile_definitions(loader_common_options INTERFACE HAVE___SECURE_GETENV) endif() if (NOT (HAVE_SECURE_GETENV OR HAVE___SECURE_GETENV)) - message(WARNING "Using non-secure environmental lookups. This loader will not properly disable environent variables when run with elevated permissions.") + message(WARNING "Using non-secure environmental lookups. This loader will not properly disable environment variables when run with elevated permissions.") endif() endif() if (NOT (WIN32)) - # Check for the existance of the realpath() command + # Check for the existence of the realpath() command include(CheckFunctionExists) check_function_exists(realpath HAVE_REALPATH) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b826a02a..e3c717b09 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ current assignee. * Run **clang-format** on your changes to maintain consistent formatting * There are `.clang-format` files present in the repository to define clang-format settings which are found and used automatically by clang-format. - * **clang-format** binaries are available from the LLVM orginization, here: + * **clang-format** binaries are available from the LLVM organization, here: [LLVM](https://clang.llvm.org/). Our CI system currently uses clang-format version 16 to check that the lines of code you have changed are formatted properly. diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 4d5488ef6..008b71da4 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -312,7 +312,7 @@ elseif(UNIX OR MINGW OR (WIN32 AND USE_GAS)) # i.e.: Linux & Apple & MinGW & Win if(ASSEMBLER_WORKS) add_executable(asm_offset asm_offset.c) target_link_libraries(asm_offset loader_specific_options) - # If not cross compiling, run asm_offset to generage gen_defines.asm + # If not cross compiling, run asm_offset to generate gen_defines.asm if (NOT CMAKE_CROSSCOMPILING) add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset GAS) else() diff --git a/loader/cJSON.h b/loader/cJSON.h index 457d669a5..0bba4995f 100644 --- a/loader/cJSON.h +++ b/loader/cJSON.h @@ -146,7 +146,7 @@ typedef int cJSON_bool; #define CJSON_CIRCULAR_LIMIT 10000 #endif -/* Memory Management: the caller is always responsible to free instthe results from all variants of loader_cJSON_Parse (with +/* Memory Management: the caller is always responsible to free the results from all variants of loader_cJSON_Parse (with * loader_cJSON_Delete) and loader_loader_cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The * exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */ /* Supply a block of JSON, and this returns a cJSON object you can interrogate. */ diff --git a/loader/generated/vk_object_types.h b/loader/generated/vk_object_types.h index 6d30aef0a..30a5bb10c 100644 --- a/loader/generated/vk_object_types.h +++ b/loader/generated/vk_object_types.h @@ -97,7 +97,7 @@ typedef enum VulkanObjectType { kVulkanObjectTypeIndirectExecutionSetEXT = 56, kVulkanObjectTypeIndirectCommandsLayoutEXT = 57, kVulkanObjectTypeMax = 58, - // Aliases for backwards compatibilty of "promoted" types + // Aliases for backwards compatibility of "promoted" types kVulkanObjectTypeSamplerYcbcrConversionKHR = kVulkanObjectTypeSamplerYcbcrConversion, kVulkanObjectTypeDescriptorUpdateTemplateKHR = kVulkanObjectTypeDescriptorUpdateTemplate, kVulkanObjectTypePrivateDataSlotEXT = kVulkanObjectTypePrivateDataSlot, diff --git a/loader/loader.c b/loader/loader.c index 8e8c3f2ba..3d11c3322 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -306,7 +306,7 @@ VkResult create_string_list(const struct loader_instance *inst, uint32_t allocat return VK_SUCCESS; } -VkResult incrase_str_capacity_by_at_least_one(const struct loader_instance *inst, struct loader_string_list *string_list) { +VkResult increase_str_capacity_by_at_least_one(const struct loader_instance *inst, struct loader_string_list *string_list) { assert(string_list); if (string_list->allocated_count == 0) { string_list->allocated_count = 32; @@ -329,7 +329,7 @@ VkResult incrase_str_capacity_by_at_least_one(const struct loader_instance *inst VkResult append_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, char *str) { assert(string_list && str); - VkResult res = incrase_str_capacity_by_at_least_one(inst, string_list); + VkResult res = increase_str_capacity_by_at_least_one(inst, string_list); if (res == VK_ERROR_OUT_OF_HOST_MEMORY) { loader_instance_heap_free(inst, str); // Must clean up in case of failure return res; @@ -340,7 +340,7 @@ VkResult append_str_to_string_list(const struct loader_instance *inst, struct lo VkResult prepend_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, char *str) { assert(string_list && str); - VkResult res = incrase_str_capacity_by_at_least_one(inst, string_list); + VkResult res = increase_str_capacity_by_at_least_one(inst, string_list); if (res == VK_ERROR_OUT_OF_HOST_MEMORY) { loader_instance_heap_free(inst, str); // Must clean up in case of failure return res; @@ -546,7 +546,7 @@ VkResult normalize_path(const struct loader_instance *inst, char **passed_in_pat #endif } -// Queries the path to the library that lib_handle & gipa are assoicated with, allocating a string to hold it and returning it in +// Queries the path to the library that lib_handle & gipa are associated with, allocating a string to hold it and returning it in // out_path VkResult get_library_path_of_dl_handle(const struct loader_instance *inst, loader_platform_dl_handle lib_handle, PFN_vkGetInstanceProcAddr gipa, char **out_path) { @@ -2539,7 +2539,7 @@ bool verify_meta_layer_component_layers(const struct loader_instance *inst, size } if (comp_prop_index != INT32_MAX && already_checked_meta_layers[comp_prop_index]) { loader_log(inst, VULKAN_LOADER_WARN_BIT, 0, - "verify_meta_layer_component_layers: Recursive depedency between Meta-layer %s and Meta-layer %s. " + "verify_meta_layer_component_layers: Recursive dependency between Meta-layer %s and Meta-layer %s. " "Skipping this layer.", instance_layers->list[prop_index].info.layerName, comp_prop->info.layerName); return false; diff --git a/loader/loader_environment.c b/loader/loader_environment.c index 330c3598f..8dd8493bb 100644 --- a/loader/loader_environment.c +++ b/loader/loader_environment.c @@ -563,8 +563,8 @@ VkResult loader_add_environment_layers(struct loader_instance *inst, const char return res; } -void parse_id_filter_enviroment_var(const struct loader_instance *inst, const char *env_var_name, - struct loader_envvar_id_filter *filter_struct) { +void parse_id_filter_environment_var(const struct loader_instance *inst, const char *env_var_name, + struct loader_envvar_id_filter *filter_struct) { memset(filter_struct, 0, sizeof(struct loader_envvar_id_filter)); char *parsing_string = NULL; char *env_var_value = loader_secure_getenv(env_var_name, inst); diff --git a/loader/loader_environment.h b/loader/loader_environment.h index ec9367dd3..ddbc29f10 100644 --- a/loader/loader_environment.h +++ b/loader/loader_environment.h @@ -55,6 +55,6 @@ VkResult loader_add_environment_layers(struct loader_instance *inst, const char struct loader_pointer_layer_list *expanded_target_list, const struct loader_layer_list *source_list); -void parse_id_filter_enviroment_var(const struct loader_instance *inst, const char *env_var_name, - struct loader_envvar_id_filter *filter_struct); +void parse_id_filter_environment_var(const struct loader_instance *inst, const char *env_var_name, + struct loader_envvar_id_filter *filter_struct); bool check_id_matches_filter_environment_var(const uint32_t id, const struct loader_envvar_id_filter *filter_struct); diff --git a/loader/loader_windows.c b/loader/loader_windows.c index f73659c09..a3d5d5d3d 100644 --- a/loader/loader_windows.c +++ b/loader/loader_windows.c @@ -1112,7 +1112,7 @@ char *windows_get_app_package_manifest_path(const struct loader_instance *inst) UINT32 numPackages = 0, bufferLength = 0; // This literal string identifies the Microsoft-published OpenCL, OpenGL, and Vulkan Compatibility Pack, which contains - // OpenGLOn12, OpenCLOn12, and VulkanOn12 (aka Dozen) mappinglayers + // OpenGLOn12, OpenCLOn12, and VulkanOn12 (aka Dozen) mapping layers PCWSTR familyName = L"Microsoft.D3DMappingLayers_8wekyb3d8bbwe"; if (ERROR_INSUFFICIENT_BUFFER != fpGetPackagesByPackageFamily(familyName, &numPackages, NULL, &bufferLength, NULL) || numPackages == 0 || bufferLength == 0) { diff --git a/loader/settings.c b/loader/settings.c index 5d15e4964..0e5c8681a 100644 --- a/loader/settings.c +++ b/loader/settings.c @@ -397,7 +397,7 @@ VkResult parse_device_configurations(const struct loader_instance* inst, cJSON* #if COMMON_UNIX_PLATFORMS // Given a base and suffix path, determine if a file at that location exists, and if it is return success. -// Since base may contain multiple paths seperated by PATH_SEPARATOR, we must extract each segment and check segment + suffix +// Since base may contain multiple paths separated by PATH_SEPARATOR, we must extract each segment and check segment + suffix // individually VkResult check_if_settings_path_exists(const struct loader_instance* inst, const char* base, const char* suffix, char** settings_file_path) { diff --git a/loader/trampoline.c b/loader/trampoline.c index 73e55ef64..a1e72147d 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -857,9 +857,9 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstan struct loader_envvar_id_filter vendor_id_filter; struct loader_envvar_id_filter driver_id_filter; - parse_id_filter_enviroment_var(inst, VK_DEVICE_ID_FILTER_ENV_VAR, &device_id_filter); - parse_id_filter_enviroment_var(inst, VK_VENDOR_ID_FILTER_ENV_VAR, &vendor_id_filter); - parse_id_filter_enviroment_var(inst, VK_DRIVER_ID_FILTER_ENV_VAR, &driver_id_filter); + parse_id_filter_environment_var(inst, VK_DEVICE_ID_FILTER_ENV_VAR, &device_id_filter); + parse_id_filter_environment_var(inst, VK_VENDOR_ID_FILTER_ENV_VAR, &vendor_id_filter); + parse_id_filter_environment_var(inst, VK_DRIVER_ID_FILTER_ENV_VAR, &driver_id_filter); // Call down the chain to get the physical device info if ((0 == device_id_filter.count) && (0 == vendor_id_filter.count) && (0 == driver_id_filter.count)) { @@ -2617,9 +2617,9 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups( struct loader_envvar_id_filter vendor_id_filter; struct loader_envvar_id_filter driver_id_filter; - parse_id_filter_enviroment_var(inst, VK_DEVICE_ID_FILTER_ENV_VAR, &device_id_filter); - parse_id_filter_enviroment_var(inst, VK_VENDOR_ID_FILTER_ENV_VAR, &vendor_id_filter); - parse_id_filter_enviroment_var(inst, VK_DRIVER_ID_FILTER_ENV_VAR, &driver_id_filter); + parse_id_filter_environment_var(inst, VK_DEVICE_ID_FILTER_ENV_VAR, &device_id_filter); + parse_id_filter_environment_var(inst, VK_VENDOR_ID_FILTER_ENV_VAR, &vendor_id_filter); + parse_id_filter_environment_var(inst, VK_DRIVER_ID_FILTER_ENV_VAR, &driver_id_filter); // Call down the chain to get the physical device group info. if ((0 == device_id_filter.count) && (0 == vendor_id_filter.count) && (0 == driver_id_filter.count)) { diff --git a/scripts/generate_source.py b/scripts/generate_source.py index 65661152b..7af0479bf 100755 --- a/scripts/generate_source.py +++ b/scripts/generate_source.py @@ -122,7 +122,7 @@ def RunGenerators(api: str, registry: str, directory: str, styleFile: str, targe for index, target in enumerate(targets, start=1): print(f'[{index}|{len(targets)}] Generating {target}') - # First grab a class contructor object and create an instance + # First grab a class constructor object and create an instance generator = generators[target]['generator'] gen = generator() diff --git a/scripts/generators/helper_file_generator.py b/scripts/generators/helper_file_generator.py index e3c756a06..7cea3dff6 100644 --- a/scripts/generators/helper_file_generator.py +++ b/scripts/generators/helper_file_generator.py @@ -137,7 +137,7 @@ def generate(self): out.append(f' kVulkanObjectType{name} = {number},\n') out.append(f' kVulkanObjectTypeMax = {enum_num},\n') - out.append(' // Aliases for backwards compatibilty of "promoted" types\n') + out.append(' // Aliases for backwards compatibility of "promoted" types\n') for name, aliases in object_type_aliases.items(): for alias in aliases: out.append(f' kVulkanObjectType{alias[2:]} = kVulkanObjectType{name[2:]},\n') diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp index cae8c211b..4d0292efa 100644 --- a/tests/loader_regression_tests.cpp +++ b/tests/loader_regression_tests.cpp @@ -5280,7 +5280,7 @@ TEST(DriverUnloadingFromZeroPhysDevs, HandleRecreation) { surfaces.emplace_back(surface, inst.inst, env.vulkan_functions.vkDestroySurfaceKHR); } // Remove some elements arbitrarily - remove 15 of each - // Do it backwards so the indexes are 'corect' + // Do it backwards so the indexes are 'correct' for (uint32_t i = 31; i > 2; i -= 2) { messengers.erase(messengers.begin() + i); surfaces.erase(surfaces.begin() + i);