Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wgpu spell checking #3228

Merged
merged 4 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ bitflags::bitflags! {
///
/// This is a native-only feature.
const TEXTURE_COMPRESSION_ASTC_HDR = 1 << 40;
/// Allows for timestamp queries inside renderpasses. Metal does not allow this
/// Allows for timestamp queries inside render passes. Metal does not allow this
/// on Apple GPUs.
///
/// Implies [`Features::TIMESTAMP_QUERIES`] is supported.
Expand Down Expand Up @@ -658,9 +658,9 @@ impl Features {
/// - [`Limits::downlevel_webgl2_defaults()`] This is a set of limits that is lower even than the
/// [`downlevel_defaults()`], configured to be low enough to support running in the browser using
/// WebGL2.
/// - [`Limits::default()`]. This is the set of limits that is guarenteed to work on all modern
/// backends and is guarenteed to be supported by WebGPU. Applications needing more modern
/// features can use this as a reasonable set of limits if they are targetting only desktop and
/// - [`Limits::default()`]. This is the set of limits that is guaranteed to work on all modern
/// backends and is guaranteed to be supported by WebGPU. Applications needing more modern
/// features can use this as a reasonable set of limits if they are targeting only desktop and
/// modern mobile devices.
///
/// We recommend starting with the most restrictive limits you can and manually increasing the
Expand Down Expand Up @@ -773,7 +773,7 @@ pub struct Limits {
pub max_compute_workgroups_per_dimension: u32,
/// A limit above which buffer allocations are guaranteed to fail.
///
/// Buffer allocations below the maximum buffer size may not succed depending on available memory,
/// Buffer allocations below the maximum buffer size may not succeed depending on available memory,
/// fragmentation and other factors.
pub max_buffer_size: u64,
}
Expand Down Expand Up @@ -815,7 +815,7 @@ impl Default for Limits {
}

impl Limits {
/// These default limits are guarenteed to be compatible with GLES-3.1, and D3D11
/// These default limits are guaranteed to be compatible with GLES-3.1, and D3D11
pub fn downlevel_defaults() -> Self {
Self {
max_texture_dimension_1d: 2048,
Expand Down Expand Up @@ -850,7 +850,7 @@ impl Limits {
}
}

/// These default limits are guarenteed to be compatible with GLES-3.0, and D3D11, and WebGL2
/// These default limits are guaranteed to be compatible with GLES-3.0, and D3D11, and WebGL2
pub fn downlevel_webgl2_defaults() -> Self {
Self {
max_uniform_buffers_per_shader_stage: 11,
Expand Down Expand Up @@ -1179,7 +1179,7 @@ pub struct DeviceDescriptor<L> {
}

impl<L> DeviceDescriptor<L> {
///
/// Takes a closure and maps the label of the device descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> DeviceDescriptor<K> {
DeviceDescriptor {
label: fun(&self.label),
Expand Down Expand Up @@ -2049,7 +2049,7 @@ pub enum TextureFormat {
Astc {
/// compressed block dimensions
block: AstcBlock,
///
/// ASTC RGBA channel
channel: AstcChannel,
},
}
Expand Down Expand Up @@ -3672,7 +3672,7 @@ pub struct BufferDescriptor<L> {
}

impl<L> BufferDescriptor<L> {
///
/// Takes a closure and maps the label of the buffer descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> BufferDescriptor<K> {
BufferDescriptor {
label: fun(&self.label),
Expand All @@ -3697,7 +3697,7 @@ pub struct CommandEncoderDescriptor<L> {
}

impl<L> CommandEncoderDescriptor<L> {
///
/// Takes a closure and maps the label of the command encoder descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> CommandEncoderDescriptor<K> {
CommandEncoderDescriptor {
label: fun(&self.label),
Expand Down Expand Up @@ -3841,7 +3841,7 @@ bitflags::bitflags! {
const TEXTURE_BINDING = 1 << 2;
/// Allows a texture to be a [`BindingType::StorageTexture`] in a bind group.
const STORAGE_BINDING = 1 << 3;
/// Allows a texture to be an output attachment of a renderpass.
/// Allows a texture to be an output attachment of a render pass.
const RENDER_ATTACHMENT = 1 << 4;
}
}
Expand Down Expand Up @@ -3900,13 +3900,13 @@ pub enum SurfaceStatus {
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct Color {
///
/// Red component of the color
pub r: f64,
///
/// Green component of the color
pub g: f64,
///
/// Blue component of the color
pub b: f64,
///
/// Alpha component of the color
pub a: f64,
}

Expand Down Expand Up @@ -3980,11 +3980,11 @@ pub enum TextureDimension {
#[cfg_attr(feature = "replay", derive(Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct Origin3d {
///
/// X position of the origin
pub x: u32,
///
/// Y position of the origin
pub y: u32,
///
/// Z position of the origin
pub z: u32,
}

Expand All @@ -4009,11 +4009,11 @@ impl Default for Origin3d {
#[cfg_attr(feature = "replay", derive(Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct Extent3d {
///
/// Width of the extent
pub width: u32,
///
/// Height of the extent
pub height: u32,
///
/// The depth of the extent or the number of array layers
#[cfg_attr(feature = "serde", serde(default = "default_depth"))]
pub depth_or_array_layers: u32,
}
Expand Down Expand Up @@ -4218,7 +4218,7 @@ pub struct TextureDescriptor<L> {
}

impl<L> TextureDescriptor<L> {
///
/// Takes a closure and maps the label of the texture descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> TextureDescriptor<K> {
TextureDescriptor {
label: fun(&self.label),
Expand Down Expand Up @@ -4380,7 +4380,7 @@ pub struct CommandBufferDescriptor<L> {
}

impl<L> CommandBufferDescriptor<L> {
///
/// Takes a closure and maps the label of the command buffer descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> CommandBufferDescriptor<K> {
CommandBufferDescriptor {
label: fun(&self.label),
Expand Down Expand Up @@ -4419,7 +4419,7 @@ pub struct RenderBundleDescriptor<L> {
}

impl<L> RenderBundleDescriptor<L> {
///
/// Takes a closure and maps the label of the render bundle descriptor into another.
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> RenderBundleDescriptor<K> {
RenderBundleDescriptor {
label: fun(&self.label),
Expand Down Expand Up @@ -4971,7 +4971,7 @@ pub struct QuerySetDescriptor<L> {
}

impl<L> QuerySetDescriptor<L> {
///
/// Takes a closure and maps the label of the query set descriptor into another.
pub fn map_label<'a, K>(&'a self, fun: impl FnOnce(&'a L) -> K) -> QuerySetDescriptor<K> {
QuerySetDescriptor {
label: fun(&self.label),
Expand Down
16 changes: 8 additions & 8 deletions wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ pub struct BufferBinding<'a> {
}
static_assertions::assert_impl_all!(BufferBinding: Send, Sync);

/// Operation to perform to the output attachment at the start of a renderpass.
/// Operation to perform to the output attachment at the start of a render pass.
///
/// The render target must be cleared at least once before its content is loaded.
///
Expand Down Expand Up @@ -1659,13 +1659,13 @@ pub struct RenderBundleEncoderDescriptor<'a> {
/// Debug label of the render bundle encoder. This will show up in graphics debuggers for easy identification.
pub label: Label<'a>,
/// The formats of the color attachments that this render bundle is capable to rendering to. This
/// must match the formats of the color attachments in the renderpass this render bundle is executed in.
/// must match the formats of the color attachments in the render pass this render bundle is executed in.
pub color_formats: &'a [Option<TextureFormat>],
/// Information about the depth attachment that this render bundle is capable to rendering to. This
/// must match the format of the depth attachments in the renderpass this render bundle is executed in.
/// must match the format of the depth attachments in the render pass this render bundle is executed in.
pub depth_stencil: Option<RenderBundleDepthStencil>,
/// Sample count this render bundle is capable of rendering to. This must match the pipelines and
/// the renderpasses it is used in.
/// the render passes it is used in.
pub sample_count: u32,
/// If this render bundle will rendering to multiple array layers in the attachments at the same time.
pub multiview: Option<NonZeroU32>,
Expand Down Expand Up @@ -3118,7 +3118,7 @@ impl<'a> RenderPass<'a> {

/// [`Features::MULTI_DRAW_INDIRECT_COUNT`] must be enabled on the device in order to call these functions.
impl<'a> RenderPass<'a> {
/// Disptaches multiple draw calls from the active vertex buffer(s) based on the contents of the `indirect_buffer`.
/// Dispatches multiple draw calls from the active vertex buffer(s) based on the contents of the `indirect_buffer`.
/// The count buffer is read to determine how many draws to issue.
///
/// The indirect buffer must be long enough to account for `max_count` draws, however only `count` will
Expand Down Expand Up @@ -4023,14 +4023,14 @@ impl<T> UncapturedErrorHandler for T where T: Fn(Error) + Send + 'static {}
pub enum Error {
/// Out of memory error
OutOfMemory {
///
/// Lower level source of the error.
source: Box<dyn error::Error + Send + 'static>,
},
/// Validation error, signifying a bug in code or data
Validation {
///
/// Lower level source of the error.
source: Box<dyn error::Error + Send + 'static>,
///
/// Description of the validation error.
description: String,
},
}
Expand Down