diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 663702a4d6..0440bb82b2 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -585,7 +585,8 @@ impl MapContext { /// Handle to a GPU-accessible buffer. /// -/// Created with [`Device::create_buffer`] or [DeviceExt::create_buffer_init](util::DeviceExt::create_buffer_init) +/// Created with [`Device::create_buffer`] or +/// [`DeviceExt::create_buffer_init`](util::DeviceExt::create_buffer_init). #[derive(Debug)] pub struct Buffer { context: Arc, @@ -1584,7 +1585,7 @@ impl Device { /// This function passes binary data to the backend as-is and can potentially result in a /// driver crash or bogus behaviour. No attempt is made to ensure that data is valid SPIR-V. /// - /// See also [`crate::include_spirv_raw!`] and [`crate::make_spirv_raw`]. + /// See also [`include_spirv_raw!`] and [`util::make_spirv_raw`]. pub unsafe fn create_shader_module_spirv( &self, desc: &ShaderModuleDescriptorSpirV, @@ -2263,7 +2264,7 @@ impl CommandEncoder { impl CommandEncoder { /// Resolve a query set, writing the results into the supplied destination buffer. /// - /// Queries may be between 8 and 40 bytes each. See [`PipelineStatisticsType`] for more information. + /// Queries may be between 8 and 40 bytes each. See [`PipelineStatisticsTypes`] for more information. pub fn resolve_query_set( &mut self, query_set: &QuerySet, diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index 09c1b56633..7f9f69dd89 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -1,13 +1,13 @@ //! Convenience macros -/// Macro to produce an array of [VertexAttribute](crate::VertexAttribute). +/// Macro to produce an array of [`VertexAttribute`](crate::VertexAttribute). /// /// Output has type: `[VertexAttribute; _]`. Usage is as follows: /// ``` /// # use wgpu::vertex_attr_array; /// let attrs = vertex_attr_array![0 => Float32x2, 1 => Float32, 2 => Uint16x4]; /// ``` -/// This example specifies a list of three [VertexAttribute](crate::VertexAttribute), +/// This example specifies a list of three [`VertexAttribute`](crate::VertexAttribute), /// each with the given `shader_location` and `format`. /// Offsets are calculated automatically. #[macro_export] @@ -57,9 +57,11 @@ macro_rules! include_spirv { }; } -/// Macro to load raw SPIR-V data statically, for use with [`wgpu::Features::SPIRV_SHADER_PASSTHROUGH`]. +/// Macro to load raw SPIR-V data statically, for use with [`Features::SPIRV_SHADER_PASSTHROUGH`]. /// /// It ensures the word alignment as well as the magic number. +/// +/// [`Features::SPIRV_SHADER_PASSTHROUGH`]: crate::Features::SPIRV_SHADER_PASSTHROUGH #[macro_export] macro_rules! include_spirv_raw { ($($token:tt)*) => { diff --git a/wgpu/src/util/mod.rs b/wgpu/src/util/mod.rs index 3a5d671735..2b0903a49b 100644 --- a/wgpu/src/util/mod.rs +++ b/wgpu/src/util/mod.rs @@ -36,6 +36,8 @@ pub fn make_spirv(data: &[u8]) -> super::ShaderSource { /// Version of [`make_spirv`] intended for use with [`Device::create_shader_module_spirv`]. /// Returns raw slice instead of ShaderSource. +/// +/// [`Device::create_shader_module_spirv`]: crate::Device::create_shader_module_spirv pub fn make_spirv_raw(data: &[u8]) -> Cow<[u32]> { const MAGIC_NUMBER: u32 = 0x0723_0203; assert_eq!(