diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 9ee5c370a08..8c56ff221aa 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -836,6 +836,7 @@ impl Drop for ShaderModule { /// Any necessary shader translation (e.g. from WGSL to SPIR-V or vice versa) /// will be done internally by wgpu. #[cfg_attr(feature = "naga", allow(clippy::large_enum_variant))] +#[derive(Clone)] #[non_exhaustive] pub enum ShaderSource<'a> { /// SPIR-V module represented as a slice of words. @@ -876,6 +877,7 @@ static_assertions::assert_impl_all!(ShaderSource: Send, Sync); /// /// Corresponds to [WebGPU `GPUShaderModuleDescriptor`]( /// https://gpuweb.github.io/gpuweb/#dictdef-gpushadermoduledescriptor). +#[derive(Clone)] pub struct ShaderModuleDescriptor<'a> { /// Debug label of the shader module. This will show up in graphics debuggers for easy identification. pub label: Label<'a>,