From 21c7f4035fa0fd641478218be33a42b43950bd9b Mon Sep 17 00:00:00 2001 From: dAxpeDDa Date: Thu, 21 Jul 2022 12:28:37 +0200 Subject: [PATCH] Implement `Clone` for `ShaderModuleDescriptor` --- wgpu/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 090d67c1f15..000af727fb0 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -814,6 +814,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. +#[derive(Clone)] #[non_exhaustive] pub enum ShaderSource<'a> { /// SPIR-V module represented as a slice of words. @@ -847,6 +848,7 @@ pub enum ShaderSource<'a> { /// /// 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>,