Module: vkd3d
Branch: master
Commit: 4110f1e54781c1f87c37f2ec6682138210d7de63
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/4110f1e54781c1f87c37f2ec66821…
Author: Nikolay Sivov <nsivov(a)codeweavers.com>
Date: Wed Mar 8 02:04:37 2023 +0100
vkd3d-shader: Fix a few typos in the comments.
---
libs/vkd3d-shader/hlsl.c | 2 +-
libs/vkd3d-shader/hlsl.h | 8 ++++----
libs/vkd3d-shader/hlsl_codegen.c | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 286c6e60..64d6e870 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -947,7 +947,7 @@ void hlsl_cleanup_deref(struct hlsl_deref *deref)
hlsl_src_remove(&deref->offset);
}
-/* Initializes a simple variable derefence, so that it can be passed to load/store functions. */
+/* Initializes a simple variable dereference, so that it can be passed to load/store functions. */
void hlsl_init_simple_deref_from_var(struct hlsl_deref *deref, struct hlsl_ir_var *var)
{
memset(deref, 0, sizeof(*deref));
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 7b516622..ec0101e1 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -181,7 +181,7 @@ struct hlsl_type
struct
{
struct hlsl_type *type;
- /* Array lenght, or HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT if it is unknown yet while parsing. */
+ /* Array length, or HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT if it is not known yet at parse time. */
unsigned int elements_count;
} array;
/* Format of the data contained within the type if the base_type is HLSL_TYPE_TEXTURE or
@@ -224,7 +224,7 @@ struct hlsl_struct_field
/* Offset of the field within the type it belongs to, in register components, for each regset. */
unsigned int reg_offset[HLSL_REGSET_LAST + 1];
- /* Offset where the fields's name starts in the output bytecode, in bytes. */
+ /* Offset where the field name starts in the output bytecode, in bytes. */
size_t name_bytecode_offset;
};
@@ -415,7 +415,7 @@ struct hlsl_ir_function_decl
struct hlsl_ir_var *return_var;
struct vkd3d_shader_location loc;
- /* Item entry in hlsl_ir_function.overloads. The paremeters' types are used as key. */
+ /* Item entry in hlsl_ir_function.overloads. The parameters' types are used as key. */
struct rb_entry entry;
/* Function to which this declaration corresponds. */
@@ -763,7 +763,7 @@ struct hlsl_ctx
* compute shader profiles. It is set using the numthreads() attribute in the entry point. */
uint32_t thread_count[3];
- /* Whether the parser is inside an state block (effects' metadata) inside a variable declarition. */
+ /* Whether the parser is inside a state block (effects' metadata) inside a variable declaration. */
uint32_t in_state_block : 1;
/* Whether the numthreads() attribute has been provided in the entry-point function. */
uint32_t found_numthreads : 1;
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
index 65bd9d4c..ab598757 100644
--- a/libs/vkd3d-shader/hlsl_codegen.c
+++ b/libs/vkd3d-shader/hlsl_codegen.c
@@ -319,7 +319,7 @@ static void prepend_input_struct_copy(struct hlsl_ctx *ctx, struct list *instrs,
return;
list_add_after(&lhs->node.entry, &c->node.entry);
- /* This redudant load is expected to be deleted later by DCE */
+ /* This redundant load is expected to be deleted later by DCE. */
if (!(field_load = hlsl_new_load_index(ctx, &lhs->src, &c->node, &var->loc)))
return;
list_add_after(&c->node.entry, &field_load->node.entry);
@@ -340,7 +340,7 @@ static void prepend_input_var_copy(struct hlsl_ctx *ctx, struct list *instrs, st
{
struct hlsl_ir_load *load;
- /* This redudant load is expected to be deleted later by DCE */
+ /* This redundant load is expected to be deleted later by DCE. */
if (!(load = hlsl_new_var_load(ctx, var, var->loc)))
return;
list_add_head(instrs, &load->node.entry);
@@ -414,7 +414,7 @@ static void append_output_struct_copy(struct hlsl_ctx *ctx, struct list *instrs,
return;
list_add_tail(instrs, &c->node.entry);
- /* This redudant load is expected to be deleted later by DCE */
+ /* This redundant load is expected to be deleted later by DCE. */
if (!(field_load = hlsl_new_load_index(ctx, &rhs->src, &c->node, &var->loc)))
return;
list_add_tail(instrs, &field_load->node.entry);
@@ -436,7 +436,7 @@ static void append_output_var_copy(struct hlsl_ctx *ctx, struct list *instrs, st
{
struct hlsl_ir_load *load;
- /* This redudant load is expected to be deleted later by DCE */
+ /* This redundant load is expected to be deleted later by DCE. */
if (!(load = hlsl_new_var_load(ctx, var, var->loc)))
return;
list_add_tail(instrs, &load->node.entry);