chore: fix some comments (#6033)

Signed-off-by: renshuncui <renshun@111.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
This commit is contained in:
renshuncui 2024-07-24 23:48:51 +09:00 committed by GitHub
parent fa93676991
commit 62333a573e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
This example is This example is
1. A small demonstration of the importance of synchronization. 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 ## To Run

View File

@ -447,7 +447,7 @@ impl<'a, W> Writer<'a, W> {
.. ..
} = self; } = 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 // to check for needed features
for (expressions, info) in module for (expressions, info) in module
.functions .functions

View File

@ -1875,7 +1875,7 @@ impl<'a, W: Write> Writer<'a, W> {
// with different precedences from applying earlier. // with different precedences from applying earlier.
write!(self.out, "(")?; write!(self.out, "(")?;
// Cycle trough all the components of the vector // Cycle through all the components of the vector
for index in 0..size { for index in 0..size {
let component = back::COMPONENTS[index]; let component = back::COMPONENTS[index];
// Write the addition to the previous product // Write the addition to the previous product

View File

@ -1235,7 +1235,7 @@ impl<W: Write> Writer<W> {
// with different precedences from applying earlier. // with different precedences from applying earlier.
write!(self.out, "(")?; write!(self.out, "(")?;
// Cycle trough all the components of the vector // Cycle through all the components of the vector
for index in 0..size { for index in 0..size {
let component = back::COMPONENTS[index]; let component = back::COMPONENTS[index];
// Write the addition to the previous product // Write the addition to the previous product

View File

@ -275,7 +275,7 @@ where
Name: std::borrow::Borrow<Q>, Name: std::borrow::Borrow<Q>,
Q: std::hash::Hash + Eq + ?Sized, 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() { for scope in self.scopes[..self.cursor].iter().rev() {
if let Some(var) = scope.get(name) { if let Some(var) = scope.get(name) {
return Some(var); return Some(var);

View File

@ -3460,7 +3460,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
.insert(target, (case_body_idx, vec![literal as i32])); .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 // 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 // others will be empty fallthrough so that they all execute the same body
// without duplicating code. // without duplicating code.

View File

@ -1337,7 +1337,7 @@ bitflags::bitflags! {
const STORAGE = 1 << 0; const STORAGE = 1 << 0;
/// Barrier affects all [`AddressSpace::WorkGroup`] accesses. /// Barrier affects all [`AddressSpace::WorkGroup`] accesses.
const WORK_GROUP = 1 << 1; 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; const SUB_GROUP = 1 << 2;
} }
} }

View File

@ -4848,7 +4848,7 @@ pub enum StencilOperation {
pub struct StencilFaceState { pub struct StencilFaceState {
/// Comparison function that determines if the fail_op or pass_op is used on the stencil buffer. /// Comparison function that determines if the fail_op or pass_op is used on the stencil buffer.
pub compare: CompareFunction, pub compare: CompareFunction,
/// Operation that is preformed when stencil test fails. /// Operation that is performed when stencil test fails.
pub fail_op: StencilOperation, pub fail_op: StencilOperation,
/// Operation that is performed when depth test fails but stencil test succeeds. /// Operation that is performed when depth test fails but stencil test succeeds.
pub depth_fail_op: StencilOperation, pub depth_fail_op: StencilOperation,