Skip to content

Commit 88acaf7

Browse files
authored
wgpu spell checking (#3228)
1 parent 2209463 commit 88acaf7

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

wgpu-types/src/lib.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ bitflags::bitflags! {
661661
///
662662
/// This is a native-only feature.
663663
const TEXTURE_COMPRESSION_ASTC_HDR = 1 << 40;
664-
/// Allows for timestamp queries inside renderpasses. Metal does not allow this
664+
/// Allows for timestamp queries inside render passes. Metal does not allow this
665665
/// on Apple GPUs.
666666
///
667667
/// Implies [`Features::TIMESTAMP_QUERIES`] is supported.
@@ -698,9 +698,9 @@ impl Features {
698698
/// - [`Limits::downlevel_webgl2_defaults()`] This is a set of limits that is lower even than the
699699
/// [`downlevel_defaults()`], configured to be low enough to support running in the browser using
700700
/// WebGL2.
701-
/// - [`Limits::default()`]. This is the set of limits that is guarenteed to work on all modern
702-
/// backends and is guarenteed to be supported by WebGPU. Applications needing more modern
703-
/// features can use this as a reasonable set of limits if they are targetting only desktop and
701+
/// - [`Limits::default()`]. This is the set of limits that is guaranteed to work on all modern
702+
/// backends and is guaranteed to be supported by WebGPU. Applications needing more modern
703+
/// features can use this as a reasonable set of limits if they are targeting only desktop and
704704
/// modern mobile devices.
705705
///
706706
/// We recommend starting with the most restrictive limits you can and manually increasing the
@@ -813,7 +813,7 @@ pub struct Limits {
813813
pub max_compute_workgroups_per_dimension: u32,
814814
/// A limit above which buffer allocations are guaranteed to fail.
815815
///
816-
/// Buffer allocations below the maximum buffer size may not succed depending on available memory,
816+
/// Buffer allocations below the maximum buffer size may not succeed depending on available memory,
817817
/// fragmentation and other factors.
818818
pub max_buffer_size: u64,
819819
}
@@ -855,7 +855,7 @@ impl Default for Limits {
855855
}
856856

857857
impl Limits {
858-
/// These default limits are guarenteed to be compatible with GLES-3.1, and D3D11
858+
/// These default limits are guaranteed to be compatible with GLES-3.1, and D3D11
859859
pub fn downlevel_defaults() -> Self {
860860
Self {
861861
max_texture_dimension_1d: 2048,
@@ -890,7 +890,7 @@ impl Limits {
890890
}
891891
}
892892

893-
/// These default limits are guarenteed to be compatible with GLES-3.0, and D3D11, and WebGL2
893+
/// These default limits are guaranteed to be compatible with GLES-3.0, and D3D11, and WebGL2
894894
pub fn downlevel_webgl2_defaults() -> Self {
895895
Self {
896896
max_uniform_buffers_per_shader_stage: 11,
@@ -1218,7 +1218,7 @@ pub struct DeviceDescriptor<L> {
12181218
}
12191219

12201220
impl<L> DeviceDescriptor<L> {
1221-
///
1221+
/// Takes a closure and maps the label of the device descriptor into another.
12221222
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> DeviceDescriptor<K> {
12231223
DeviceDescriptor {
12241224
label: fun(&self.label),
@@ -2086,7 +2086,7 @@ pub enum TextureFormat {
20862086
Astc {
20872087
/// compressed block dimensions
20882088
block: AstcBlock,
2089-
///
2089+
/// ASTC RGBA channel
20902090
channel: AstcChannel,
20912091
},
20922092
}
@@ -3707,7 +3707,7 @@ pub struct BufferDescriptor<L> {
37073707
}
37083708

37093709
impl<L> BufferDescriptor<L> {
3710-
///
3710+
/// Takes a closure and maps the label of the buffer descriptor into another.
37113711
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> BufferDescriptor<K> {
37123712
BufferDescriptor {
37133713
label: fun(&self.label),
@@ -3732,7 +3732,7 @@ pub struct CommandEncoderDescriptor<L> {
37323732
}
37333733

37343734
impl<L> CommandEncoderDescriptor<L> {
3735-
///
3735+
/// Takes a closure and maps the label of the command encoder descriptor into another.
37363736
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> CommandEncoderDescriptor<K> {
37373737
CommandEncoderDescriptor {
37383738
label: fun(&self.label),
@@ -3876,7 +3876,7 @@ bitflags::bitflags! {
38763876
const TEXTURE_BINDING = 1 << 2;
38773877
/// Allows a texture to be a [`BindingType::StorageTexture`] in a bind group.
38783878
const STORAGE_BINDING = 1 << 3;
3879-
/// Allows a texture to be an output attachment of a renderpass.
3879+
/// Allows a texture to be an output attachment of a render pass.
38803880
const RENDER_ATTACHMENT = 1 << 4;
38813881
}
38823882
}
@@ -3961,13 +3961,13 @@ pub enum SurfaceStatus {
39613961
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39623962
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
39633963
pub struct Color {
3964-
///
3964+
/// Red component of the color
39653965
pub r: f64,
3966-
///
3966+
/// Green component of the color
39673967
pub g: f64,
3968-
///
3968+
/// Blue component of the color
39693969
pub b: f64,
3970-
///
3970+
/// Alpha component of the color
39713971
pub a: f64,
39723972
}
39733973

@@ -4041,11 +4041,11 @@ pub enum TextureDimension {
40414041
#[cfg_attr(feature = "replay", derive(Deserialize))]
40424042
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
40434043
pub struct Origin3d {
4044-
///
4044+
/// X position of the origin
40454045
pub x: u32,
4046-
///
4046+
/// Y position of the origin
40474047
pub y: u32,
4048-
///
4048+
/// Z position of the origin
40494049
pub z: u32,
40504050
}
40514051

@@ -4070,11 +4070,11 @@ impl Default for Origin3d {
40704070
#[cfg_attr(feature = "replay", derive(Deserialize))]
40714071
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
40724072
pub struct Extent3d {
4073-
///
4073+
/// Width of the extent
40744074
pub width: u32,
4075-
///
4075+
/// Height of the extent
40764076
pub height: u32,
4077-
///
4077+
/// The depth of the extent or the number of array layers
40784078
#[cfg_attr(feature = "serde", serde(default = "default_depth"))]
40794079
pub depth_or_array_layers: u32,
40804080
}
@@ -4279,7 +4279,7 @@ pub struct TextureDescriptor<L> {
42794279
}
42804280

42814281
impl<L> TextureDescriptor<L> {
4282-
///
4282+
/// Takes a closure and maps the label of the texture descriptor into another.
42834283
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> TextureDescriptor<K> {
42844284
TextureDescriptor {
42854285
label: fun(&self.label),
@@ -4441,7 +4441,7 @@ pub struct CommandBufferDescriptor<L> {
44414441
}
44424442

44434443
impl<L> CommandBufferDescriptor<L> {
4444-
///
4444+
/// Takes a closure and maps the label of the command buffer descriptor into another.
44454445
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> CommandBufferDescriptor<K> {
44464446
CommandBufferDescriptor {
44474447
label: fun(&self.label),
@@ -4480,7 +4480,7 @@ pub struct RenderBundleDescriptor<L> {
44804480
}
44814481

44824482
impl<L> RenderBundleDescriptor<L> {
4483-
///
4483+
/// Takes a closure and maps the label of the render bundle descriptor into another.
44844484
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> RenderBundleDescriptor<K> {
44854485
RenderBundleDescriptor {
44864486
label: fun(&self.label),
@@ -5032,7 +5032,7 @@ pub struct QuerySetDescriptor<L> {
50325032
}
50335033

50345034
impl<L> QuerySetDescriptor<L> {
5035-
///
5035+
/// Takes a closure and maps the label of the query set descriptor into another.
50365036
pub fn map_label<'a, K>(&'a self, fun: impl FnOnce(&'a L) -> K) -> QuerySetDescriptor<K> {
50375037
QuerySetDescriptor {
50385038
label: fun(&self.label),

wgpu/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ pub struct BufferBinding<'a> {
12081208
}
12091209
static_assertions::assert_impl_all!(BufferBinding: Send, Sync);
12101210

1211-
/// Operation to perform to the output attachment at the start of a renderpass.
1211+
/// Operation to perform to the output attachment at the start of a render pass.
12121212
///
12131213
/// The render target must be cleared at least once before its content is loaded.
12141214
///
@@ -1669,13 +1669,13 @@ pub struct RenderBundleEncoderDescriptor<'a> {
16691669
/// Debug label of the render bundle encoder. This will show up in graphics debuggers for easy identification.
16701670
pub label: Label<'a>,
16711671
/// The formats of the color attachments that this render bundle is capable to rendering to. This
1672-
/// must match the formats of the color attachments in the renderpass this render bundle is executed in.
1672+
/// must match the formats of the color attachments in the render pass this render bundle is executed in.
16731673
pub color_formats: &'a [Option<TextureFormat>],
16741674
/// Information about the depth attachment that this render bundle is capable to rendering to. This
1675-
/// must match the format of the depth attachments in the renderpass this render bundle is executed in.
1675+
/// must match the format of the depth attachments in the render pass this render bundle is executed in.
16761676
pub depth_stencil: Option<RenderBundleDepthStencil>,
16771677
/// Sample count this render bundle is capable of rendering to. This must match the pipelines and
1678-
/// the renderpasses it is used in.
1678+
/// the render passes it is used in.
16791679
pub sample_count: u32,
16801680
/// If this render bundle will rendering to multiple array layers in the attachments at the same time.
16811681
pub multiview: Option<NonZeroU32>,
@@ -3172,7 +3172,7 @@ impl<'a> RenderPass<'a> {
31723172

31733173
/// [`Features::MULTI_DRAW_INDIRECT_COUNT`] must be enabled on the device in order to call these functions.
31743174
impl<'a> RenderPass<'a> {
3175-
/// Disptaches multiple draw calls from the active vertex buffer(s) based on the contents of the `indirect_buffer`.
3175+
/// Dispatches multiple draw calls from the active vertex buffer(s) based on the contents of the `indirect_buffer`.
31763176
/// The count buffer is read to determine how many draws to issue.
31773177
///
31783178
/// The indirect buffer must be long enough to account for `max_count` draws, however only `count` will
@@ -4065,14 +4065,14 @@ impl<T> UncapturedErrorHandler for T where T: Fn(Error) + Send + 'static {}
40654065
pub enum Error {
40664066
/// Out of memory error
40674067
OutOfMemory {
4068-
///
4068+
/// Lower level source of the error.
40694069
source: Box<dyn error::Error + Send + 'static>,
40704070
},
40714071
/// Validation error, signifying a bug in code or data
40724072
Validation {
4073-
///
4073+
/// Lower level source of the error.
40744074
source: Box<dyn error::Error + Send + 'static>,
4075-
///
4075+
/// Description of the validation error.
40764076
description: String,
40774077
},
40784078
}

0 commit comments

Comments
 (0)