@@ -590,6 +590,9 @@ static_assertions::assert_impl_all!(Device: Send, Sync);
590
590
/// Identifier for a particular call to [`Queue::submit`]. Can be used
591
591
/// as part of an argument to [`Device::poll`] to block for a particular
592
592
/// submission to finish.
593
+ ///
594
+ /// This type is unique to the Rust API of `wgpu`.
595
+ /// There is no analogue in the WebGPU specification.
593
596
#[ derive( Debug , Copy , Clone ) ]
594
597
pub struct SubmissionIndex ( <C as Context >:: SubmissionIndex ) ;
595
598
static_assertions:: assert_impl_all!( SubmissionIndex : Send , Sync ) ;
@@ -671,9 +674,12 @@ static_assertions::assert_impl_all!(Buffer: Send, Sync);
671
674
672
675
/// Slice into a [`Buffer`].
673
676
///
674
- /// Created by calling [`Buffer::slice`]. To use the whole buffer, call with unbounded slice:
677
+ /// It can be created with [`Buffer::slice`]. To use the whole buffer, call with unbounded slice:
675
678
///
676
679
/// `buffer.slice(..)`
680
+ ///
681
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
682
+ /// an offset and size are specified as arguments to each call working with the [`Buffer`], instead.
677
683
#[ derive( Copy , Clone , Debug ) ]
678
684
pub struct BufferSlice < ' a > {
679
685
buffer : & ' a Buffer ,
@@ -736,6 +742,10 @@ impl Drop for Sampler {
736
742
///
737
743
/// A `Surface` represents a platform-specific surface (e.g. a window) onto which rendered images may
738
744
/// be presented. A `Surface` may be created with the unsafe function [`Instance::create_surface`].
745
+ ///
746
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
747
+ /// [`GPUCanvasContext`](https://gpuweb.github.io/gpuweb/#canvas-context)
748
+ /// serves a similar role.
739
749
#[ derive( Debug ) ]
740
750
pub struct Surface {
741
751
context : Arc < C > ,
@@ -829,6 +839,9 @@ impl Drop for ShaderModule {
829
839
///
830
840
/// Any necessary shader translation (e.g. from WGSL to SPIR-V or vice versa)
831
841
/// will be done internally by wgpu.
842
+ ///
843
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
844
+ /// only WGSL source code strings are accepted.
832
845
#[ cfg_attr( feature = "naga" , allow( clippy:: large_enum_variant) ) ]
833
846
#[ derive( Clone ) ]
834
847
#[ non_exhaustive]
@@ -876,7 +889,11 @@ pub struct ShaderModuleDescriptor<'a> {
876
889
}
877
890
static_assertions:: assert_impl_all!( ShaderModuleDescriptor : Send , Sync ) ;
878
891
879
- /// Descriptor for a shader module given by SPIR-V binary.
892
+ /// Descriptor for a shader module given by SPIR-V binary, for use with
893
+ /// [`Device::create_shader_module_spirv`].
894
+ ///
895
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
896
+ /// only WGSL source code strings are accepted.
880
897
pub struct ShaderModuleDescriptorSpirV < ' a > {
881
898
/// Debug label of the shader module. This will show up in graphics debuggers for easy identification.
882
899
pub label : Label < ' a > ,
@@ -1213,6 +1230,9 @@ impl<V: Default> Default for LoadOp<V> {
1213
1230
}
1214
1231
1215
1232
/// Pair of load and store operations for an attachment aspect.
1233
+ ///
1234
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
1235
+ /// separate `loadOp` and `storeOp` fields are used instead.
1216
1236
#[ derive( Copy , Clone , Debug , Hash , Eq , PartialEq ) ]
1217
1237
#[ cfg_attr( feature = "trace" , derive( serde:: Serialize ) ) ]
1218
1238
#[ cfg_attr( feature = "replay" , derive( serde:: Deserialize ) ) ]
@@ -1664,6 +1684,10 @@ static_assertions::assert_impl_all!(RenderBundleEncoderDescriptor: Send, Sync);
1664
1684
1665
1685
/// Surface texture that can be rendered to.
1666
1686
/// Result of a successful call to [`Surface::get_current_texture`].
1687
+ ///
1688
+ /// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
1689
+ /// the [`GPUCanvasContext`](https://gpuweb.github.io/gpuweb/#canvas-context) provides
1690
+ /// a texture without any additional information.
1667
1691
#[ derive( Debug ) ]
1668
1692
pub struct SurfaceTexture {
1669
1693
/// Accessible view of the frame.
0 commit comments