@@ -661,7 +661,7 @@ bitflags::bitflags! {
661
661
///
662
662
/// This is a native-only feature.
663
663
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
665
665
/// on Apple GPUs.
666
666
///
667
667
/// Implies [`Features::TIMESTAMP_QUERIES`] is supported.
@@ -698,9 +698,9 @@ impl Features {
698
698
/// - [`Limits::downlevel_webgl2_defaults()`] This is a set of limits that is lower even than the
699
699
/// [`downlevel_defaults()`], configured to be low enough to support running in the browser using
700
700
/// 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
704
704
/// modern mobile devices.
705
705
///
706
706
/// We recommend starting with the most restrictive limits you can and manually increasing the
@@ -813,7 +813,7 @@ pub struct Limits {
813
813
pub max_compute_workgroups_per_dimension : u32 ,
814
814
/// A limit above which buffer allocations are guaranteed to fail.
815
815
///
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,
817
817
/// fragmentation and other factors.
818
818
pub max_buffer_size : u64 ,
819
819
}
@@ -855,7 +855,7 @@ impl Default for Limits {
855
855
}
856
856
857
857
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
859
859
pub fn downlevel_defaults ( ) -> Self {
860
860
Self {
861
861
max_texture_dimension_1d : 2048 ,
@@ -890,7 +890,7 @@ impl Limits {
890
890
}
891
891
}
892
892
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
894
894
pub fn downlevel_webgl2_defaults ( ) -> Self {
895
895
Self {
896
896
max_uniform_buffers_per_shader_stage : 11 ,
@@ -1218,7 +1218,7 @@ pub struct DeviceDescriptor<L> {
1218
1218
}
1219
1219
1220
1220
impl < L > DeviceDescriptor < L > {
1221
- ///
1221
+ /// Takes a closure and maps the label of the device descriptor into another.
1222
1222
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> DeviceDescriptor < K > {
1223
1223
DeviceDescriptor {
1224
1224
label : fun ( & self . label ) ,
@@ -2086,7 +2086,7 @@ pub enum TextureFormat {
2086
2086
Astc {
2087
2087
/// compressed block dimensions
2088
2088
block : AstcBlock ,
2089
- ///
2089
+ /// ASTC RGBA channel
2090
2090
channel : AstcChannel ,
2091
2091
} ,
2092
2092
}
@@ -3707,7 +3707,7 @@ pub struct BufferDescriptor<L> {
3707
3707
}
3708
3708
3709
3709
impl < L > BufferDescriptor < L > {
3710
- ///
3710
+ /// Takes a closure and maps the label of the buffer descriptor into another.
3711
3711
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> BufferDescriptor < K > {
3712
3712
BufferDescriptor {
3713
3713
label : fun ( & self . label ) ,
@@ -3732,7 +3732,7 @@ pub struct CommandEncoderDescriptor<L> {
3732
3732
}
3733
3733
3734
3734
impl < L > CommandEncoderDescriptor < L > {
3735
- ///
3735
+ /// Takes a closure and maps the label of the command encoder descriptor into another.
3736
3736
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> CommandEncoderDescriptor < K > {
3737
3737
CommandEncoderDescriptor {
3738
3738
label : fun ( & self . label ) ,
@@ -3876,7 +3876,7 @@ bitflags::bitflags! {
3876
3876
const TEXTURE_BINDING = 1 << 2 ;
3877
3877
/// Allows a texture to be a [`BindingType::StorageTexture`] in a bind group.
3878
3878
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 .
3880
3880
const RENDER_ATTACHMENT = 1 << 4 ;
3881
3881
}
3882
3882
}
@@ -3961,13 +3961,13 @@ pub enum SurfaceStatus {
3961
3961
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3962
3962
#[ cfg_attr( feature = "serde" , serde( rename_all = "camelCase" ) ) ]
3963
3963
pub struct Color {
3964
- ///
3964
+ /// Red component of the color
3965
3965
pub r : f64 ,
3966
- ///
3966
+ /// Green component of the color
3967
3967
pub g : f64 ,
3968
- ///
3968
+ /// Blue component of the color
3969
3969
pub b : f64 ,
3970
- ///
3970
+ /// Alpha component of the color
3971
3971
pub a : f64 ,
3972
3972
}
3973
3973
@@ -4041,11 +4041,11 @@ pub enum TextureDimension {
4041
4041
#[ cfg_attr( feature = "replay" , derive( Deserialize ) ) ]
4042
4042
#[ cfg_attr( feature = "serde" , serde( rename_all = "camelCase" ) ) ]
4043
4043
pub struct Origin3d {
4044
- ///
4044
+ /// X position of the origin
4045
4045
pub x : u32 ,
4046
- ///
4046
+ /// Y position of the origin
4047
4047
pub y : u32 ,
4048
- ///
4048
+ /// Z position of the origin
4049
4049
pub z : u32 ,
4050
4050
}
4051
4051
@@ -4070,11 +4070,11 @@ impl Default for Origin3d {
4070
4070
#[ cfg_attr( feature = "replay" , derive( Deserialize ) ) ]
4071
4071
#[ cfg_attr( feature = "serde" , serde( rename_all = "camelCase" ) ) ]
4072
4072
pub struct Extent3d {
4073
- ///
4073
+ /// Width of the extent
4074
4074
pub width : u32 ,
4075
- ///
4075
+ /// Height of the extent
4076
4076
pub height : u32 ,
4077
- ///
4077
+ /// The depth of the extent or the number of array layers
4078
4078
#[ cfg_attr( feature = "serde" , serde( default = "default_depth" ) ) ]
4079
4079
pub depth_or_array_layers : u32 ,
4080
4080
}
@@ -4279,7 +4279,7 @@ pub struct TextureDescriptor<L> {
4279
4279
}
4280
4280
4281
4281
impl < L > TextureDescriptor < L > {
4282
- ///
4282
+ /// Takes a closure and maps the label of the texture descriptor into another.
4283
4283
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> TextureDescriptor < K > {
4284
4284
TextureDescriptor {
4285
4285
label : fun ( & self . label ) ,
@@ -4441,7 +4441,7 @@ pub struct CommandBufferDescriptor<L> {
4441
4441
}
4442
4442
4443
4443
impl < L > CommandBufferDescriptor < L > {
4444
- ///
4444
+ /// Takes a closure and maps the label of the command buffer descriptor into another.
4445
4445
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> CommandBufferDescriptor < K > {
4446
4446
CommandBufferDescriptor {
4447
4447
label : fun ( & self . label ) ,
@@ -4480,7 +4480,7 @@ pub struct RenderBundleDescriptor<L> {
4480
4480
}
4481
4481
4482
4482
impl < L > RenderBundleDescriptor < L > {
4483
- ///
4483
+ /// Takes a closure and maps the label of the render bundle descriptor into another.
4484
4484
pub fn map_label < K > ( & self , fun : impl FnOnce ( & L ) -> K ) -> RenderBundleDescriptor < K > {
4485
4485
RenderBundleDescriptor {
4486
4486
label : fun ( & self . label ) ,
@@ -5032,7 +5032,7 @@ pub struct QuerySetDescriptor<L> {
5032
5032
}
5033
5033
5034
5034
impl < L > QuerySetDescriptor < L > {
5035
- ///
5035
+ /// Takes a closure and maps the label of the query set descriptor into another.
5036
5036
pub fn map_label < ' a , K > ( & ' a self , fun : impl FnOnce ( & ' a L ) -> K ) -> QuerySetDescriptor < K > {
5037
5037
QuerySetDescriptor {
5038
5038
label : fun ( & self . label ) ,
0 commit comments