Skip to content

Commit 529aaf4

Browse files
Reduce typo count. (#18)
1 parent 83c7e8d commit 529aaf4

31 files changed

+48
-48
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
280280
- [PR#612](https://github.com/EmbarkStudios/rust-gpu/pull/612) added `is_helper_invocation` to `spirv-std`
281281
- [PR#624](https://github.com/EmbarkStudios/rust-gpu/pull/624) added `OpTypeSampler` and `OpTypeAccelerationStructureKHR` support to inline `asm!`
282282
- [PR#622](https://github.com/EmbarkStudios/rust-gpu/pull/622) added the ability to query entry-point names from `spirv-builder`
283-
- [PR#630](https://github.com/EmbarkStudios/rust-gpu/pull/630) added a more convenient API to `spirv-builder`, for requesting extensions and/or capabilties
283+
- [PR#630](https://github.com/EmbarkStudios/rust-gpu/pull/630) added a more convenient API to `spirv-builder`, for requesting extensions and/or capabilities
284284
- [PR#629](https://github.com/EmbarkStudios/rust-gpu/pull/629) added an optimization to convert N identical scalar (e.g. arithmetic) ops, into one N-wide vector op (as e.g. `glam` only emits the former)
285285
- [PR#596](https://github.com/EmbarkStudios/rust-gpu/pull/596) added a `RuntimeArray` type to `spirv-val`, to represent SPIR-V `OpRuntimeArray`s
286286
- [PR#635](https://github.com/EmbarkStudios/rust-gpu/pull/635) added several `spirv-builder` options for controlling `spirv-val` flags

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
578578
})
579579
.collect();
580580

581-
// Special-case field accesses through a `pointercast`, to accesss the
581+
// Special-case field accesses through a `pointercast`, to access the
582582
// right field in the original type, for the `Logical` addressing model.
583583
let ptr = ptr.strip_ptrcasts();
584584
let ptr_id = ptr.def(self);
@@ -1378,8 +1378,8 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
13781378
);
13791379
self.icmp(IntPredicate::IntEQ, rhs_lt_zero, result_gt_lhs)
13801380
} else {
1381-
// for unsigned addition, overflow occured if the result is less than any of the operands.
1382-
// for subtraction, overflow occured if the result is greater.
1381+
// for unsigned addition, overflow occurred if the result is less than any of the operands.
1382+
// for subtraction, overflow occurred if the result is greater.
13831383
self.icmp(
13841384
if is_add {
13851385
IntPredicate::IntULT

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ impl<'tcx> CodegenCx<'tcx> {
503503
),
504504
};
505505
// alloc_id is not needed by read_scalar, so we just use 0. If the context
506-
// refers to a pointer, read_scalar will find the the actual alloc_id. It
507-
// only uses the input alloc_id in the case that the scalar is uninitilized
506+
// refers to a pointer, read_scalar will find the actual alloc_id. It
507+
// only uses the input alloc_id in the case that the scalar is uninitialized
508508
// as part of the error output
509509
// tldr, the pointer here is only needed for the offset
510510
let value = match alloc.inner().read_scalar(

crates/rustc_codegen_spirv/src/codegen_cx/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ impl<'tcx> CodegenCx<'tcx> {
663663
// (e.g. Vulkan has specific rules for builtin storage classes).
664664

665665
// Emit `OpName` in the simple case of a pattern that's just a variable
666-
// name (e.g. "foo" for `foo: Vec3`). While `OpName` is *not* suppposed
666+
// name (e.g. "foo" for `foo: Vec3`). While `OpName` is *not* supposed
667667
// to be semantic, OpenGL and some tooling rely on it for reflection.
668668
if let hir::PatKind::Binding(_, _, ident, _) = &hir_param.pat.kind {
669669
self.emit_global()

crates/rustc_codegen_spirv/src/linker/duplicates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn remove_duplicate_extensions(module: &mut Module) {
2020
});
2121
}
2222

23-
pub fn remove_duplicate_capablities(module: &mut Module) {
23+
pub fn remove_duplicate_capabilities(module: &mut Module) {
2424
let mut set = FxHashSet::default();
2525
module.capabilities.retain(|inst| {
2626
inst.class.opcode != Op::Capability || set.insert(inst.operands[0].unwrap_capability())

crates/rustc_codegen_spirv/src/linker/inline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub fn inline(sess: &Session, module: &mut Module) -> super::Result<()> {
125125
}
126126

127127
let header = module.header.as_mut().unwrap();
128-
// FIXME(eddyb) clippy false positive (seperate `map` required for borrowck).
128+
// FIXME(eddyb) clippy false positive (separate `map` required for borrowck).
129129
#[allow(clippy::map_unwrap_or)]
130130
let mut inliner = Inliner {
131131
op_type_void_id: module
@@ -807,7 +807,7 @@ impl Inliner<'_, '_> {
807807
..
808808
} = *self;
809809

810-
// HACK(eddyb) this is terrible, but we have to deal with it becasue of
810+
// HACK(eddyb) this is terrible, but we have to deal with it because of
811811
// how this inliner is outside-in, instead of inside-out, meaning that
812812
// context builds up "outside" of the callee blocks, inside the caller.
813813
let mut enclosing_inlined_frames = SmallVec::<[_; 8]>::new();

crates/rustc_codegen_spirv/src/linker/mem2reg.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ fn collect_access_chains(
229229
Some(VarInfo {
230230
ty: *pointer_to_pointee.get(&inst.result_type.unwrap()).unwrap(),
231231
indices: {
232-
let mut base_indicies = base.indices.clone();
232+
let mut base_indices = base.indices.clone();
233233
for op in inst.operands.iter().skip(1) {
234-
base_indicies.push(*constants.get(&op.id_ref_any().unwrap())?);
234+
base_indices.push(*constants.get(&op.id_ref_any().unwrap())?);
235235
}
236-
base_indicies
236+
base_indices
237237
},
238238
})
239239
}

crates/rustc_codegen_spirv/src/linker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ pub fn link(
204204
{
205205
let _timer = sess.timer("link_remove_duplicates");
206206
duplicates::remove_duplicate_extensions(&mut output);
207-
duplicates::remove_duplicate_capablities(&mut output);
207+
duplicates::remove_duplicate_capabilities(&mut output);
208208
duplicates::remove_duplicate_ext_inst_imports(&mut output);
209209
duplicates::remove_duplicate_types(&mut output);
210210
// jb-todo: strip identical OpDecoration / OpDecorationGroups

crates/rustc_codegen_spirv/src/linker/peephole_opts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn composite_construct(types: &FxHashMap<Word, Instruction>, function: &mut
7070
let index = cur_inst.operands[2].unwrap_literal_int32() as usize;
7171
if index >= components.len() {
7272
// Theoretically shouldn't happen, as it's invalid SPIR-V if the index is out
73-
// of bounds, but just stop optimizing instead of panicing here.
73+
// of bounds, but just stop optimizing instead of panicking here.
7474
break;
7575
}
7676
if components[index].is_none() {

crates/rustc_codegen_spirv/src/linker/specializer.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result> fmt::Display for FmtBy<F> {
7777
}
7878

7979
pub trait Specialization {
80-
/// Return `true` if the specializer should replace every occurence of
80+
/// Return `true` if the specializer should replace every occurrence of
8181
/// `operand` with some other inferred `Operand`.
8282
fn specialize_operand(&self, operand: &Operand) -> bool;
8383

@@ -1903,7 +1903,7 @@ impl<'a, S: Specialization> InferCx<'a, S> {
19031903
);
19041904
}
19051905

1906-
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK commment.
1906+
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK comment.
19071907
if let Some(ret_ty) = record_fn_ret_ty {
19081908
let (ret_ty, _) = InferOperand::from_operand_and_generic_args(
19091909
&Operand::IdRef(ret_ty),
@@ -1929,7 +1929,7 @@ impl<'a, S: Specialization> InferCx<'a, S> {
19291929
);
19301930
(
19311931
Some(type_of_result),
1932-
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK commment.
1932+
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK comment.
19331933
match inst.class.opcode {
19341934
Op::Function => all_generic_args,
19351935
_ => rest,
@@ -1942,7 +1942,7 @@ impl<'a, S: Specialization> InferCx<'a, S> {
19421942
let debug_dump_if_enabled = |cx: &Self, prefix| {
19431943
if cx.specializer.debug {
19441944
let result_type = match inst.class.opcode {
1945-
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK commment.
1945+
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK comment.
19461946
Op::Function => Some(
19471947
InferOperand::from_operand_and_generic_args(
19481948
&Operand::IdRef(inst.result_type.unwrap()),
@@ -1976,7 +1976,7 @@ impl<'a, S: Specialization> InferCx<'a, S> {
19761976

19771977
// If we have some instruction signatures for `inst`, enforce them.
19781978
if let Some(sigs) = spirv_type_constraints::instruction_signatures(inst.class.opcode) {
1979-
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK commment.
1979+
// HACK(eddyb) workaround for `OpFunction`, see earlier HACK comment.
19801980
// (specifically, `type_of_result` isn't *Result Type* for `OpFunction`)
19811981
assert_ne!(inst.class.opcode, Op::Function);
19821982

0 commit comments

Comments
 (0)