Skip to content

Commit 0773648

Browse files
authored
Fix typos and introduce a workflow (#2537)
* Fix typos and introduce a workflow * Revert vk.xml * Update .typos.toml * fix typos config
1 parent e949e35 commit 0773648

File tree

27 files changed

+75
-55
lines changed

27 files changed

+75
-55
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Please remove any items from the template below that are not applicable.
1515

1616
6. [ ] Describe in common words what is the purpose of this change, related
17-
Github Issues, and highlight important implementation aspects.
17+
GitHub Issues, and highlight important implementation aspects.
1818

1919
Changelog:
2020
```markdown

.github/workflows/rust.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
name: ${{ matrix.name }}
3030
runs-on: ${{ matrix.runs-on }}
3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
- run: rustup toolchain install stable
3434
- uses: Swatinem/rust-cache@v2
3535
if: ${{ ! matrix.self-hosted }}
@@ -44,7 +44,7 @@ jobs:
4444
clippy:
4545
runs-on: ubuntu-latest
4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
- run: rustup toolchain install stable --component clippy
4949
- uses: Swatinem/rust-cache@v2
5050
with:
@@ -55,7 +55,13 @@ jobs:
5555
fmt:
5656
runs-on: ubuntu-latest
5757
steps:
58-
- uses: actions/checkout@v3
58+
- uses: actions/checkout@v4
5959
- run: rustup toolchain install nightly --component rustfmt
6060
- name: Run fmt check
6161
run: cargo +nightly fmt --check
62+
typos:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- name: Run typos
67+
uses: crate-ci/typos@master

.typos.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[files]
2+
extend-exclude = [
3+
".git/",
4+
"vulkano/spirv.core.grammar.json",
5+
"vulkano/vk.xml",
6+
]
7+
ignore-hidden = false
8+
9+
[default.extend-words]
10+
lod = "lod"
11+
uscaled = "uscaled"
12+
13+
[default.extend-identifiers]
14+
ANDed = "ANDed"

CHANGELOG.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Changes to the physical device:
363363
- vulkano-shaders: Use a placeholder name instead of erroring out, when the shader doesn't contain a name for a struct.
364364
- [#2203](https://github.com/vulkano-rs/vulkano/issues/2203): Shader reflection fails to find descriptor set variables if multiple `OpAccessChain` instructions are themselves chained.
365365
- vulkano-shaders: Invalid emitted code for shader input/output interfaces if the shader is missing a name decoration.
366-
- Fixed potential UB when using `MemoryAlloc::try_unwrap`, where the allocation was mapped on contruction of the `MemoryAlloc` but not unmapped on unwrapping, allowing double-mapping.
366+
- Fixed potential UB when using `MemoryAlloc::try_unwrap`, where the allocation was mapped on construction of the `MemoryAlloc` but not unmapped on unwrapping, allowing double-mapping.
367367
- Fixed a bug in `GenericMemoryAllocator::allocate`, where the root allocations weren't created with the configured `AllocationType`.
368368
- Specialization constants are now applied to the reflected SPIR-V code before any other reflection is performed.
369369
- Fragment shaders cannot use `dual_src_blend` device feature due to interface errors.
@@ -939,7 +939,7 @@ Miscellaneous:
939939

940940
# Version 0.27.1 (2021-12-07)
941941

942-
- Reimplement generic impl's for `BufferAcces`, `TypedBufferAccess` & `ImageAccess`.
942+
- Reimplement generic impl's for `BufferAccess`, `TypedBufferAccess` & `ImageAccess`.
943943

944944
# Version 0.27.0 (2021-12-06)
945945

@@ -1164,7 +1164,7 @@ already needed khr_external_memory and khr_external_memory_fd.
11641164
- **Breaking** (but unlikely) Vulkano-shaders now compiles to SPIR-V 1.0 by default. If your shader needs features only available in a higher version, you can specify the target version on the `shader!` macro with the new `vulkan_version: "major.minor"` and `spirv_version: "major.minor"` arguments.
11651165
- **Breaking** Changes to how image sample counts are represented.
11661166
- Instead of an integer, functions with a parameter for number of image samples now take a value of `SampleCount`, an enum with variants named `SampleN`, where `N` is a power-of-two integer. It can be converted to a Vulkan `SampleCountFlags`, and from an integer with `try_from`.
1167-
- `sample_counts` field is originaly represented as u32 type, which is now represented by `SampleCounts` struct-type which is a boolean collection of supported `sample_counts`. It can be converted to and from a Vulkan `SampleCountFlags`.
1167+
- `sample_counts` field is originally represented as u32 type, which is now represented by `SampleCounts` struct-type which is a boolean collection of supported `sample_counts`. It can be converted to and from a Vulkan `SampleCountFlags`.
11681168
- **Breaking** Changes to shader interfaces and pipeline layouts.
11691169
- The module `descriptor::pipeline_layout` has been renamed to `pipeline::layout`.
11701170
- The trait `ShaderInterfaceDef` has been replaced by a simple struct `ShaderInterface`, and its `elements` method returns a slice instead of an iterator. This means you no longer need to define a new type for a shader interface. The accompanying type `ShaderInterfaceDefEntry` has been renamed to `ShaderInterfaceEntry` to match. The `ShaderInterfaceDefMatch` trait and `EmptyShaderInterfaceDef` struct have been removed.
@@ -1394,7 +1394,7 @@ already needed khr_external_memory and khr_external_memory_fd.
13941394
- **Breaking** Swapchain::new() now doesnt need to have the old_swapchain parameter anymore but requires the ColorSpace
13951395
- **Breaking** Decouple descriptor sets from pipeline
13961396
- **Breaking** Update Winit to 0.21.0
1397-
- **Breaking** Add `host_cached` field to all `CpuAccessibleBuffer` initializers to allow the user to perfer host cached memory.
1397+
- **Breaking** Add `host_cached` field to all `CpuAccessibleBuffer` initializers to allow the user to prefer host cached memory.
13981398
- **Breaking** Added `fullscreen_exclusive` field to `Swapchain` initializers to allow the user to specify how fullscreen exclusivity should be handled.
13991399
+ Swapchain methods added: `Swapchain::acquire_fullscreen_exclusive()`, `Swapchain::release_fullscreen_exclusive()`, and `Swapchain::is_fullscreen_exclusive()`
14001400
- Add function `execute_commands_from_vec` to handle submission of multiple secondary command buffers.
@@ -1403,9 +1403,9 @@ already needed khr_external_memory and khr_external_memory_fd.
14031403
- Update MacOS dependency cocoa to 0.20
14041404
- Fixed code generated by `shader!` macro so that SSBO's are supported again (broken in 0.16.0).
14051405
- Added Swapchain::surface() - which returns the saved surface
1406-
- Propogate new lines correctly in shader compile errors.
1406+
- Propagate new lines correctly in shader compile errors.
14071407
- `Queue` and `QueueFamily` now implement `PartialEq` and `Eq`
1408-
- `Swapchain::acquire_next_image()`` now returns ``(image_id, suboptimal, aquire_future)``
1408+
- `Swapchain::acquire_next_image()`` now returns ``(image_id, suboptimal, acquire_future)``
14091409
+ *suboptimal indicates that the swapchain is usable, but should be recreated*
14101410
- Fixed Join Future implementation to not submit joined command buffers twice.
14111411
- The traits `GraphicsPipelineAbstract` and `DescriptorSet` now require `DeviceOwned`.
@@ -1452,7 +1452,7 @@ This is an emergency breaking breaking change. It fixes Undefined Behaviour that
14521452
# Version 0.12.0 (2019-05-24)
14531453

14541454
- Update shaderc to 0.5. New shaderc has improved pre-built options for libshaderc that significantly reduce package build time and are appropriate for use in CI
1455-
- `QueueFamily::explicitly_supports_tranfers` only returns true if `vk::QUEUE_TRANSFER_BIT` is set instead of also always returning true. Removed `supports_transfers`.
1455+
- `QueueFamily::explicitly_supports_transfers` only returns true if `vk::QUEUE_TRANSFER_BIT` is set instead of also always returning true. Removed `supports_transfers`.
14561456
- Update to winit 0.19
14571457
- Add support for `#include "..."` and `#include <...>` directives within source
14581458
files.
@@ -1473,7 +1473,7 @@ This is an emergency breaking breaking change. It fixes Undefined Behaviour that
14731473
+ `instance::Features` -> `device::Features`
14741474
+ `instance::DeviceExtensions` -> `device::DeviceExtensions`
14751475
+ `instance::RawDeviceExtensions` -> `device::RawDeviceExtensions`
1476-
- Added `vulkano_shaders::shader!` proc macro, use this instead of `vulkano_shader_deriver::VulkanoShaders`.
1476+
- Added `vulkano_shaders::shader!` proc macro, use this instead of `vulkano_shader_derive::VulkanoShaders`.
14771477
- The entire `vulkano_shader_derive` crate is deprecated.
14781478
- `vulkano_shaders::{reflect, compile, Error}` are no longer public.
14791479
- Remove vulkano_shaders::build_glsl_shaders

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ To get started you are encouraged to use the following resources:
9191
examples (~50 lines of code) and then works up to rendering triangles and mandelbrots.
9292
The guide is currently outdated a little. We are planning to update it in the future, but it's
9393
a good place to start understanding the base building blocks of Vulkano API.
94-
- Github [Issues](https://github.com/vulkano-rs/vulkano/issues) - Raise a topic, ask a question
94+
- GitHub [Issues](https://github.com/vulkano-rs/vulkano/issues) - Raise a topic, ask a question
9595
or report a bug. The new topics there are watched regularly by maintainers and other
9696
community users.
9797
- Gitter [Chat](https://gitter.im/vulkano-rs/Lobby) - Another place to raise a question. However,
98-
the chat is not maintained regularly at this moment. Better use Github Issues for this purpose.
98+
the chat is not maintained regularly at this moment. Better use GitHub Issues for this purpose.
9999

100100
## Contributing
101101

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Examples
22

3-
**The examples shown here will not necessarily work for the latest stable release of Vulkano. By default, Github shows the most recent unstable revision, rather than the last stable release. You can switch Github to show the examples for stable releases as follows.**
3+
**The examples shown here will not necessarily work for the latest stable release of Vulkano. By default, GitHub shows the most recent unstable revision, rather than the last stable release. You can switch GitHub to show the examples for stable releases as follows.**
44

55
## Selecting the version tag:
66

examples/async-update/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,20 @@ fn main() -> Result<(), impl Error> {
149149
// during the transfers either and the two tasks are truly asynchronous.
150150
//
151151
// For this, we need to find the queue family with the fewest queue flags set, since if the
152-
// queue fmaily has more flags than `TRANSFER | SPARSE_BINDING`, that means it is not dedicated
152+
// queue family has more flags than `TRANSFER | SPARSE_BINDING`, that means it is not dedicated
153153
// to transfer operations.
154154
let transfer_family_index = physical_device
155155
.queue_family_properties()
156156
.iter()
157157
.enumerate()
158158
.filter(|(_, q)| {
159159
q.queue_flags.intersects(QueueFlags::TRANSFER)
160-
// Queue familes dedicated to transfers are not required to support partial
161-
// transfers of images, reported by a mininum granularity of [0, 0, 0]. If you need
160+
// Queue families dedicated to transfers are not required to support partial
161+
// transfers of images, reported by a minimum granularity of [0, 0, 0]. If you need
162162
// to do partial transfers of images like we do in this example, you therefore have
163163
// to make sure the queue family supports that.
164164
&& q.min_image_transfer_granularity != [0; 3]
165-
// Unlike queue familes for graphics and/or compute, queue familes dedicated to
165+
// Unlike queue families for graphics and/or compute, queue families dedicated to
166166
// transfers don't have to support image transfers of arbitrary granularity.
167167
// Therefore, if you are going to use one, you have to either make sure the
168168
// granularity is granular enough for your needs, or you have to align your
@@ -182,7 +182,7 @@ fn main() -> Result<(), impl Error> {
182182
..Default::default()
183183
}];
184184

185-
// It's possible that the physical device doesn't have any queue familes supporting
185+
// It's possible that the physical device doesn't have any queue families supporting
186186
// transfers other than the graphics and/or compute queue family. In that case we must make
187187
// sure we don't request the same queue family twice.
188188
if transfer_family_index != graphics_family_index {
@@ -623,7 +623,7 @@ fn main() -> Result<(), impl Error> {
623623
(
624624
// Bind the uniform buffer designated for this frame.
625625
uniform_buffer_sets[image_index as usize].clone(),
626-
// Bind the currenly most up-to-date texture.
626+
// Bind the currently most up-to-date texture.
627627
sampler_sets[current_texture_index.load(Ordering::Acquire) as usize]
628628
.clone(),
629629
),

examples/dynamic-local-size/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn main() {
9999
100100
// We set `local_size_x` and `local_size_y` to be variables configurable values
101101
// through specialization constants. Values `1` and `2` both define a constant ID
102-
// as well as a default value of 1 and 2 of the constants respecively. The
102+
// as well as a default value of 1 and 2 of the constants respectively. The
103103
// `local_size_z = 1` here is an ordinary constant of the local size on the Z axis.
104104
//
105105
// Unfortunately current GLSL language capabilities doesn't let us define exact

examples/indirect/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ fn main() -> Result<(), impl Error> {
454454

455455
// Pass the two buffers to the compute shader.
456456
let layout = &compute_pipeline.layout().set_layouts()[0];
457-
let cs_desciptor_set = DescriptorSet::new(
457+
let cs_descriptor_set = DescriptorSet::new(
458458
descriptor_set_allocator.clone(),
459459
layout.clone(),
460460
[
@@ -485,7 +485,7 @@ fn main() -> Result<(), impl Error> {
485485
PipelineBindPoint::Compute,
486486
compute_pipeline.layout().clone(),
487487
0,
488-
cs_desciptor_set,
488+
cs_descriptor_set,
489489
)
490490
.unwrap();
491491

examples/self-copy-buffer/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This example is a copy of `basic-compute-shaders.rs`, but initalizes half of the input buffer
1+
// This example is a copy of `basic-compute-shaders.rs`, but initializes half of the input buffer
22
// and then we use `copy_buffer_dimensions` to copy the first half of the input buffer to the
33
// second half.
44

@@ -147,7 +147,7 @@ fn main() {
147147
| MemoryTypeFilter::HOST_RANDOM_ACCESS,
148148
..Default::default()
149149
},
150-
// We intitialize half of the array and leave the other half at 0, we will use the copy
150+
// We initialize half of the array and leave the other half at 0, we will use the copy
151151
// command later to fill it.
152152
(0..65536u32).map(|n| if n < 65536 / 2 { n } else { 0 }),
153153
)
@@ -213,9 +213,9 @@ fn main() {
213213

214214
let data_buffer_content = data_buffer.read().unwrap();
215215

216-
// Here we have the same data in the two halfs of the buffer.
216+
// Here we have the same data in the two halves of the buffer.
217217
for n in 0..65536 / 2 {
218-
// The two halfs should have the same data.
218+
// The two halves should have the same data.
219219
assert_eq!(data_buffer_content[n as usize], n * 12);
220220
assert_eq!(data_buffer_content[n as usize + 65536 / 2], n * 12);
221221
}

examples/shader-types-derive/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn main() {
7575

7676
assert_eq!(
7777
Bar {
78-
// `Padded<T, N>` implementes `From<T>`, so you can construct it this way as well.
78+
// `Padded<T, N>` implements `From<T>`, so you can construct it this way as well.
7979
y: [5.1, 6.2].into(),
8080
..Default::default()
8181
},

examples/simple-particles/main.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// A minimal particle-sandbox to demonstrate a reasonable use-case for a device-local buffer. We
2-
// gain significant runtime performance by writing the inital vertex values to the GPU using a
2+
// gain significant runtime performance by writing the initial vertex values to the GPU using a
33
// staging buffer and then copying the data to a device-local buffer to be accessed solely by the
44
// GPU through the compute shader and as a vertex array.
55

@@ -210,7 +210,7 @@ fn main() -> Result<(), impl Error> {
210210
211211
// Storage buffer binding, which we optimize by using a DeviceLocalBuffer.
212212
layout (binding = 0) buffer VertexBuffer {
213-
VertexData verticies[];
213+
VertexData vertices[];
214214
};
215215
216216
// Allow push constants to define a parameters of compute.
@@ -229,10 +229,10 @@ fn main() -> Result<(), impl Error> {
229229
void main() {
230230
const uint index = gl_GlobalInvocationID.x;
231231
232-
vec2 vel = verticies[index].vel;
232+
vec2 vel = vertices[index].vel;
233233
234234
// Update particle position according to velocity.
235-
vec2 pos = verticies[index].pos + push.delta_time * vel;
235+
vec2 pos = vertices[index].pos + push.delta_time * vel;
236236
237237
// Bounce particle off screen-border.
238238
if (abs(pos.x) > 1.0) {
@@ -260,8 +260,8 @@ fn main() -> Result<(), impl Error> {
260260
}
261261
262262
// Set new values back into buffer.
263-
verticies[index].pos = pos;
264-
verticies[index].vel = vel * exp(friction * push.delta_time);
263+
vertices[index].pos = pos;
264+
vertices[index].vel = vel * exp(friction * push.delta_time);
265265
}
266266
",
267267
}
@@ -539,7 +539,7 @@ fn main() -> Result<(), impl Error> {
539539
let delta_time = now.duration_since(last_frame_time).unwrap().as_secs_f32();
540540
last_frame_time = now;
541541

542-
// Create push contants to be passed to compute shader.
542+
// Create push constants to be passed to compute shader.
543543
let push_constants = cs::PushConstants {
544544
attractor: [0.75 * (3. * time).cos(), 0.6 * (0.75 * time).sin()],
545545
attractor_strength: 1.2 * (2. * time).cos(),
@@ -574,7 +574,7 @@ fn main() -> Result<(), impl Error> {
574574
let previous_future = match fences[previous_fence_index as usize].take() {
575575
// Ensure current frame is synchronized with previous.
576576
Some(fence) => fence.boxed(),
577-
// Create new future to guarentee synchronization with (fake) previous frame.
577+
// Create new future to guarantee synchronization with (fake) previous frame.
578578
None => sync::now(device.clone()).boxed(),
579579
};
580580

examples/triangle-util/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Welcome to the triangle-util example!
22
//
3-
// This is almost exactly the same as the triange example, except that it uses utility functions
3+
// This is almost exactly the same as the triangle example, except that it uses utility functions
44
// to make life easier.
55
//
66
// This example assumes that you are already more or less familiar with graphics programming and

vulkano/src/buffer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! Vulkano does not perform any specific marshalling of buffer data. The representation of the
99
//! buffer in memory is identical between the CPU and GPU. Because the Rust compiler is allowed to
1010
//! reorder struct fields at will by default when using `#[repr(Rust)]`, it is advised to mark each
11-
//! struct requiring imput assembly as `#[repr(C)]`. This forces Rust to follow the standard C
11+
//! struct requiring input assembly as `#[repr(C)]`. This forces Rust to follow the standard C
1212
//! procedure. Each element is laid out in memory in the order of declaration and aligned to a
1313
//! multiple of their alignment.
1414
//!

0 commit comments

Comments
 (0)