From a2e27afd825a320b43fadc5c3107fec8c4e4620d Mon Sep 17 00:00:00 2001 From: DHuan Date: Sat, 28 May 2022 14:27:37 +0800 Subject: [PATCH] Add links for SpirV documents. (#2697) --- wgpu/src/lib.rs | 2 ++ wgpu/src/macros.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 69cb5ecae..15408d8a7 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -788,6 +788,8 @@ impl Drop for ShaderModule { #[non_exhaustive] pub enum ShaderSource<'a> { /// SPIR-V module represented as a slice of words. + /// + /// See also: [`util::make_spirv`], [`include_spirv`] #[cfg(feature = "spirv")] #[cfg_attr(docsrs, doc(cfg(feature = "spirv")))] SpirV(Cow<'a, [u32]>), diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index e86ab69ce..fc3560e01 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -44,6 +44,8 @@ fn test_vertex_attr_array() { /// Macro to load a SPIR-V module statically. /// /// It ensures the word alignment as well as the magic number. +/// +/// Return type: [`crate::ShaderModuleDescriptor`] #[macro_export] #[cfg(feature = "spirv")] macro_rules! include_spirv {