File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ static_assertions::assert_impl_all!(SurfaceConfiguration: Send, Sync);
358
358
/// Handle to a presentable surface.
359
359
///
360
360
/// A `Surface` represents a platform-specific surface (e.g. a window) onto which rendered images may
361
- /// be presented. A `Surface` may be created with the unsafe function [`Instance::create_surface`].
361
+ /// be presented. A `Surface` may be created with the function [`Instance::create_surface`].
362
362
///
363
363
/// This type is unique to the Rust API of `wgpu`. In the WebGPU specification,
364
364
/// [`GPUCanvasContext`](https://gpuweb.github.io/gpuweb/#canvas-context)
Original file line number Diff line number Diff line change @@ -78,7 +78,16 @@ macro_rules! include_spirv_raw {
78
78
} ;
79
79
}
80
80
81
- /// Macro to load a WGSL module statically.
81
+ /// Load WGSL source code from a file at compile time.
82
+ ///
83
+ /// The loaded path is relative to the path of the file containing the macro call, in the same way
84
+ /// as [`include_str!`] operates.
85
+ ///
86
+ /// ```ignore
87
+ /// fn main() {
88
+ /// let module: ShaderModuleDescriptor = include_wgsl!("shader.wgsl");
89
+ /// }
90
+ /// ```
82
91
#[ macro_export]
83
92
macro_rules! include_wgsl {
84
93
( $( $token: tt) * ) => {
You can’t perform that action at this time.
0 commit comments