Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR (CMAKE_C_COMPILER_ID STREQUAL "Clang" A
# Prevent <windows.h> 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()
Expand All @@ -241,7 +241,7 @@ endif()
target_compile_definitions(loader_common_options INTERFACE $<$<CONFIG:DEBUG>: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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion loader/cJSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion loader/generated/vk_object_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions loader/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions loader/loader_environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions loader/loader_environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion loader/loader_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion loader/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions loader/trampoline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion scripts/generators/helper_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion tests/loader_regression_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading