From d1b8a7e745da6fd5c34fa89158266477dee3c303 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 17 Aug 2024 00:21:21 +0200
Subject: [PATCH 1/3] vkd3d: Fix a few typos in the comments.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
---
 include/vkd3d_shader.h      | 2 +-
 libs/vkd3d-shader/d3d_asm.c | 2 +-
 libs/vkd3d-shader/dxil.c    | 4 ++--
 libs/vkd3d-shader/hlsl.h    | 4 ++--
 libs/vkd3d-shader/ir.c      | 8 ++++----
 libs/vkd3d/resource.c       | 2 +-
 libs/vkd3d/vkd3d_private.h  | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h
index d475681006..d37d8ebad9 100644
--- a/include/vkd3d_shader.h
+++ b/include/vkd3d_shader.h
@@ -1876,7 +1876,7 @@ enum vkd3d_shader_sysval_semantic
     VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX      = 0x05,
     /** Vertex ID; SV_VertexID in Direct3D. */
     VKD3D_SHADER_SV_VERTEX_ID                 = 0x06,
-    /** Primtive ID; SV_PrimitiveID in Direct3D. */
+    /** Primitive ID; SV_PrimitiveID in Direct3D. */
     VKD3D_SHADER_SV_PRIMITIVE_ID              = 0x07,
     /** Instance ID; SV_InstanceID in Direct3D. */
     VKD3D_SHADER_SV_INSTANCE_ID               = 0x08,
diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c
index 2c2f0c43ec..77e9711300 100644
--- a/libs/vkd3d-shader/d3d_asm.c
+++ b/libs/vkd3d-shader/d3d_asm.c
@@ -2251,7 +2251,7 @@ static const char *get_semantic_register_name(enum vkd3d_shader_sysval_semantic
         case VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL: return "oDepthGE";
         case VKD3D_SHADER_SV_DEPTH_LESS_EQUAL:    return "oDepthLE";
             /* SV_Coverage has name vCoverage when used as an input,
-             * but it doens't appear in the signature in that case. */
+             * but it doesn't appear in the signature in that case. */
         case VKD3D_SHADER_SV_COVERAGE:            return "oMask";
         case VKD3D_SHADER_SV_STENCIL_REF:         return "oStencilRef";
         default:                                  return "??";
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c
index 2a0bbe1a62..4a17c62292 100644
--- a/libs/vkd3d-shader/dxil.c
+++ b/libs/vkd3d-shader/dxil.c
@@ -4298,7 +4298,7 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
             if (!(flags & FP_ALLOW_UNSAFE_ALGEBRA))
                 ins->flags |= VKD3DSI_PRECISE_X;
             flags &= ~FP_ALLOW_UNSAFE_ALGEBRA;
-            /* SPIR-V FPFastMathMode is only available in the Kernel executon model. */
+            /* SPIR-V FPFastMathMode is only available in the Kernel execution model. */
             silence_warning = !(flags & ~(FP_NO_NAN | FP_NO_INF | FP_NO_SIGNED_ZEROS | FP_ALLOW_RECIPROCAL));
             break;
         case VKD3DSIH_IADD:
@@ -5211,7 +5211,7 @@ static void sm6_parser_emit_dx_get_dimensions(struct sm6_parser *sm6, enum dx_in
             instruction_dst_param_init_temp_vector(ins++, sm6);
             state->temp_idx = 1;
 
-            /* DXIL does not have an instrinsic for sample info, and resinfo is expected to return
+            /* DXIL does not have an intrinsic for sample info, and resinfo is expected to return
              * the sample count in .w for MS textures. The result is always a struct of 4 x uint32. */
             vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_SAMPLE_INFO);
             ins->flags = VKD3DSI_SAMPLE_INFO_UINT;
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 37a46bb7fc..0e6469e48e 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -410,7 +410,7 @@ struct hlsl_attribute
 
 /* Reservation of a register and/or an offset for objects inside constant buffers, to be used as a
  *   starting point of their allocation. They are available through the register(·) and the
- *   packoffset(·) syntaxes, respectivelly.
+ *   packoffset(·) syntaxes, respectively.
  * The constant buffer offset is measured register components. */
 struct hlsl_reg_reservation
 {
@@ -456,7 +456,7 @@ struct hlsl_ir_var
      * This pointer is NULL for others. */
     struct hlsl_default_value
     {
-        /* Default value, in case the component is a string, othewise it is NULL. */
+        /* Default value, in case the component is a string, otherwise it is NULL. */
         const char *string;
         /* Default value, in case the component is a numeric value. */
         union hlsl_constant_value_component number;
diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c
index 5c33c40e31..6dbe30b155 100644
--- a/libs/vkd3d-shader/ir.c
+++ b/libs/vkd3d-shader/ir.c
@@ -4226,7 +4226,7 @@ static enum vkd3d_result vsir_cfg_generate_synthetic_loop_intervals(struct vsir_
                 ACTION_EXTEND,
             } action = ACTION_CREATE_NEW;
 
-            /* We've already contructed loop intervals for the back
+            /* We've already constructed loop intervals for the back
              * edges, there's nothing more to do. */
             if (vsir_block_dominates(successor, block))
                 continue;
@@ -4484,7 +4484,7 @@ static enum vkd3d_result vsir_cfg_build_structured_program(struct vsir_cfg *cfg)
                         VKD3D_ASSERT(inner_loop->type == STRUCTURE_TYPE_LOOP);
 
                         /* Otherwise, if one of the branches is
-                         * continueing the inner loop we're inside,
+                         * continue-ing the inner loop we're inside,
                          * make sure it's the false branch (because it
                          * will be optimized out later). */
                         if (action_true.jump_type == JUMP_CONTINUE && action_true.target == inner_loop->u.loop.idx)
@@ -5126,14 +5126,14 @@ static enum vkd3d_result vsir_cfg_structure_list_emit_jump(struct vsir_cfg *cfg,
     struct vsir_cfg_emit_target *target = cfg->target;
     const struct vkd3d_shader_location no_loc = {0};
     /* Encode the jump target as the loop index plus a bit to remember whether
-     * we're breaking or continueing. */
+     * we're breaking or continue-ing. */
     unsigned int jump_target = jump->target << 1;
     enum vkd3d_shader_opcode opcode;
 
     switch (jump->type)
     {
         case JUMP_CONTINUE:
-            /* If we're continueing the loop we're directly inside, then we can emit a
+            /* If we're continue-ing the loop we're directly inside, then we can emit a
              * `continue'. Otherwise we first have to break all the loops between here
              * and the loop to continue, recording our intention to continue
              * in the lowest bit of jump_target. */
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index ac29088b9c..6d6820d375 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -2184,7 +2184,7 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device,
         goto allocate_memory;
     }
 
-    /* Syncronisation is not required for binding, but vkMapMemory() may be called
+    /* Synchronisation is not required for binding, but vkMapMemory() may be called
      * from another thread and it requires exclusive access. */
     vkd3d_mutex_lock(&heap->mutex);
 
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index d159ebbf93..f5e68d0b54 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -678,7 +678,7 @@ static inline void *d3d12_desc_get_object_ref(const volatile struct d3d12_desc *
     void *view;
 
     /* Some games, e.g. Shadow of the Tomb Raider, GRID 2019, and Horizon Zero Dawn, write descriptors
-     * from multiple threads without syncronisation. This is apparently valid in Windows. */
+     * from multiple threads without synchronisation. This is apparently valid in Windows. */
     for (;;)
     {
         do
-- 
GitLab


From f0a2e4bc25b6119db1ad75dbcb934d1e3ea8e74c Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 17 Aug 2024 00:23:51 +0200
Subject: [PATCH 2/3] vkd3d-shader/glsl: Fix a typo in a few messages.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
---
 libs/vkd3d-shader/glsl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c
index 10e12ea56f..d1f02ab568 100644
--- a/libs/vkd3d-shader/glsl.c
+++ b/libs/vkd3d-shader/glsl.c
@@ -115,7 +115,7 @@ static void glsl_src_init(struct glsl_src *glsl_src, struct vkd3d_glsl_generator
 
     if (reg->non_uniform)
         vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
-                "Internal compiler error: Unhandled 'non-uniform' modifer.");
+                "Internal compiler error: Unhandled 'non-uniform' modifier.");
     if (vsir_src->modifiers)
         vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
                 "Internal compiler error: Unhandled source modifier(s) %#x.", vsir_src->modifiers);
@@ -138,10 +138,10 @@ static uint32_t glsl_dst_init(struct glsl_dst *glsl_dst, struct vkd3d_glsl_gener
 
     if (ins->flags & VKD3DSI_PRECISE_XYZW)
         vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
-                "Internal compiler error: Unhandled 'precise' modifer.");
+                "Internal compiler error: Unhandled 'precise' modifier.");
     if (vsir_dst->reg.non_uniform)
         vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
-                "Internal compiler error: Unhandled 'non-uniform' modifer.");
+                "Internal compiler error: Unhandled 'non-uniform' modifier.");
 
     glsl_dst->vsir = vsir_dst;
     glsl_dst->register_name = vkd3d_string_buffer_get(&gen->string_buffers);
-- 
GitLab


From b9e894f23220786532d6bc2658b62364203f0532 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 17 Aug 2024 00:26:03 +0200
Subject: [PATCH 3/3] include: Fix a few typos in the IDL files.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
---
 include/vkd3d_d3d12.idl | 2 +-
 include/vkd3d_dxgi.idl  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index a72732e461..c8a5341c06 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -3260,7 +3260,7 @@ interface ID3D12Device : ID3D12Object
             D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
 
     D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(UINT visible_mask,
-            UINT reource_desc_count, const D3D12_RESOURCE_DESC *resource_descs);
+            UINT resource_desc_count, const D3D12_RESOURCE_DESC *resource_descs);
 
     D3D12_HEAP_PROPERTIES GetCustomHeapProperties(UINT node_mask,
             D3D12_HEAP_TYPE heap_type);
diff --git a/include/vkd3d_dxgi.idl b/include/vkd3d_dxgi.idl
index 7e07a78dd3..0682935b8a 100644
--- a/include/vkd3d_dxgi.idl
+++ b/include/vkd3d_dxgi.idl
@@ -146,7 +146,7 @@ interface IDXGIFactory : IDXGIObject
 ]
 interface IDXGIFactory1 : IDXGIFactory
 {
-    HRESULT EnumAdapters1(UINT adapter_idx, IDXGIAdapter1 **adpter);
+    HRESULT EnumAdapters1(UINT adapter_idx, IDXGIAdapter1 **adapter);
     BOOL IsCurrent();
 }
 
-- 
GitLab