From eff8f1ce6e39dae1af2c406f4a48e2ca06e101d8 Mon Sep 17 00:00:00 2001 From: renshuncui Date: Wed, 24 Jul 2024 21:27:13 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: renshuncui --- examples/src/hello_synchronization/README.md | 2 +- naga/src/back/glsl/features.rs | 2 +- naga/src/back/glsl/mod.rs | 2 +- naga/src/back/msl/writer.rs | 2 +- naga/src/front/mod.rs | 2 +- naga/src/front/spv/mod.rs | 2 +- naga/src/lib.rs | 2 +- wgpu-types/src/lib.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/src/hello_synchronization/README.md b/examples/src/hello_synchronization/README.md index 5750801f14..5367213eec 100644 --- a/examples/src/hello_synchronization/README.md +++ b/examples/src/hello_synchronization/README.md @@ -2,7 +2,7 @@ This example is 1. A small demonstration of the importance of synchronization. -2. How basic synchronization you can understand from the CPU is preformed on the GPU. +2. How basic synchronization you can understand from the CPU is performed on the GPU. ## To Run diff --git a/naga/src/back/glsl/features.rs b/naga/src/back/glsl/features.rs index 0478e01351..b6ad1738fe 100644 --- a/naga/src/back/glsl/features.rs +++ b/naga/src/back/glsl/features.rs @@ -447,7 +447,7 @@ impl<'a, W> Writer<'a, W> { .. } = self; - // Loop trough all expressions in both functions and the entry point + // Loop through all expressions in both functions and the entry point // to check for needed features for (expressions, info) in module .functions diff --git a/naga/src/back/glsl/mod.rs b/naga/src/back/glsl/mod.rs index 7ad1f3c597..6f75a6d039 100644 --- a/naga/src/back/glsl/mod.rs +++ b/naga/src/back/glsl/mod.rs @@ -1875,7 +1875,7 @@ impl<'a, W: Write> Writer<'a, W> { // with different precedences from applying earlier. write!(self.out, "(")?; - // Cycle trough all the components of the vector + // Cycle through all the components of the vector for index in 0..size { let component = back::COMPONENTS[index]; // Write the addition to the previous product diff --git a/naga/src/back/msl/writer.rs b/naga/src/back/msl/writer.rs index 7ec22009bd..6f76e84b19 100644 --- a/naga/src/back/msl/writer.rs +++ b/naga/src/back/msl/writer.rs @@ -1235,7 +1235,7 @@ impl Writer { // with different precedences from applying earlier. write!(self.out, "(")?; - // Cycle trough all the components of the vector + // Cycle through all the components of the vector for index in 0..size { let component = back::COMPONENTS[index]; // Write the addition to the previous product diff --git a/naga/src/front/mod.rs b/naga/src/front/mod.rs index 3f602f3dd0..11c8aa047e 100644 --- a/naga/src/front/mod.rs +++ b/naga/src/front/mod.rs @@ -275,7 +275,7 @@ where Name: std::borrow::Borrow, Q: std::hash::Hash + Eq + ?Sized, { - // Iterate backwards trough the scopes and try to find the variable + // Iterate backwards through the scopes and try to find the variable for scope in self.scopes[..self.cursor].iter().rev() { if let Some(var) = scope.get(name) { return Some(var); diff --git a/naga/src/front/spv/mod.rs b/naga/src/front/spv/mod.rs index d154712b20..5f2d7c9158 100644 --- a/naga/src/front/spv/mod.rs +++ b/naga/src/front/spv/mod.rs @@ -3460,7 +3460,7 @@ impl> Frontend { .insert(target, (case_body_idx, vec![literal as i32])); } - // Loop trough the collected target blocks creating a new case for each + // Loop through the collected target blocks creating a new case for each // literal pointing to it, only one case will have the true body and all the // others will be empty fallthrough so that they all execute the same body // without duplicating code. diff --git a/naga/src/lib.rs b/naga/src/lib.rs index 8ed7527922..f84eef3896 100644 --- a/naga/src/lib.rs +++ b/naga/src/lib.rs @@ -1337,7 +1337,7 @@ bitflags::bitflags! { const STORAGE = 1 << 0; /// Barrier affects all [`AddressSpace::WorkGroup`] accesses. const WORK_GROUP = 1 << 1; - /// Barrier synchronizes execution across all invocations within a subgroup that exectue this instruction. + /// Barrier synchronizes execution across all invocations within a subgroup that execute this instruction. const SUB_GROUP = 1 << 2; } } diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index dbe3a010b1..c6b91f1e12 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -4848,7 +4848,7 @@ pub enum StencilOperation { pub struct StencilFaceState { /// Comparison function that determines if the fail_op or pass_op is used on the stencil buffer. pub compare: CompareFunction, - /// Operation that is preformed when stencil test fails. + /// Operation that is performed when stencil test fails. pub fail_op: StencilOperation, /// Operation that is performed when depth test fails but stencil test succeeds. pub depth_fail_op: StencilOperation,