diff --git a/example/src/shader_bindings.rs b/example/src/shader_bindings.rs index 9bf1f5a..5e2288a 100644 --- a/example/src/shader_bindings.rs +++ b/example/src/shader_bindings.rs @@ -1,8 +1,8 @@ // File automatically generated by wgsl_bindgen^ // -// ^ wgsl_bindgen version 0.22.1 +// ^ wgsl_bindgen version 0.22.2 // Changes made to this file will not be saved. -// SourceHash: f296d146d091ee1a37e551883f6442973d1ac679f763f0c9bc90ae8c73abbcbc +// SourceHash: c1fb1254e5a4248bc7e3010f63027ed73f076bae8991ad3b3cbca7fae6f64310 #![allow(unused, non_snake_case, non_camel_case_types, non_upper_case_globals)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -454,8 +454,8 @@ pub mod global_bindings { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup0(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -651,8 +651,8 @@ pub mod fullscreen_effects { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup1(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -719,8 +719,8 @@ pub mod fullscreen_effects { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup2(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup2(pub wgpu::BindGroup); impl WgpuBindGroup2 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -1022,8 +1022,8 @@ pub mod simple_array_demo { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup1(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -1101,8 +1101,8 @@ pub mod simple_array_demo { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup2(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup2(pub wgpu::BindGroup); impl WgpuBindGroup2 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -1432,8 +1432,8 @@ pub mod overlay { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup0(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -1890,8 +1890,8 @@ pub mod multisampled_texture_demo { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup1(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -2242,8 +2242,8 @@ pub mod compute_demo { self.into_array().into_iter().collect() } } - #[derive(Debug)] - pub struct WgpuBindGroup1(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -2759,7 +2759,7 @@ fn main(@builtin(global_invocation_id) global_id: vec3) { return; } "#; - pub const SHADER_ENTRY_PATH: &str = "compute_demo/particle_physics.wgsl"; + pub const SHADER_ENTRY_PATH: &str = "compute_demo\\particle_physics.wgsl"; pub fn create_shader_module_relative_path( device: &wgpu::Device, base_dir: &str, @@ -3045,7 +3045,7 @@ fn fs_main(input_1: VertexOutput) -> @location(0) vec4 { return vec4(_e63, alpha); } "#; - pub const SHADER_ENTRY_PATH: &str = "compute_demo/particle_renderer.wgsl"; + pub const SHADER_ENTRY_PATH: &str = "compute_demo\\particle_renderer.wgsl"; pub fn create_shader_module_relative_path( device: &wgpu::Device, base_dir: &str, diff --git a/wgsl_bindgen/src/generate/bind_group/single_bind_group.rs b/wgsl_bindgen/src/generate/bind_group/single_bind_group.rs index 74971c6..3e1b153 100644 --- a/wgsl_bindgen/src/generate/bind_group/single_bind_group.rs +++ b/wgsl_bindgen/src/generate/bind_group/single_bind_group.rs @@ -276,8 +276,8 @@ impl<'a> BindGroupStructBuilder<'a> { let bind_group_name = self.struct_name(); let group_struct = quote! { - #[derive(Debug)] - pub struct #bind_group_name(wgpu::BindGroup); + #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] + pub struct #bind_group_name(pub wgpu::BindGroup); }; let group_impl = self.bind_group_struct_impl(); diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_acceleration_structure.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_acceleration_structure.snap index a4dbd79..79aa2c8 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_acceleration_structure.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_acceleration_structure.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 570 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -31,8 +32,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_array_bindings.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_array_bindings.snap index afd42b8..965c44e 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_array_bindings.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_array_bindings.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 607 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -37,8 +38,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_compute.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_compute.snap index 83640b5..5610790 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_compute.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_compute.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 403 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -37,8 +38,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -124,8 +125,8 @@ impl<'a> WgpuBindGroup1Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup1(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_fragment.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_fragment.snap index 754d045..4ecb867 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_fragment.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_fragment.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 532 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -25,8 +26,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex.snap index 8487b12..f467e02 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 499 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -25,8 +26,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { diff --git a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex_fragment.snap b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex_fragment.snap index b8ddc1e..b9a2346 100644 --- a/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex_fragment.snap +++ b/wgsl_bindgen/src/generate/bind_group/snapshots/bind_groups_module_vertex_fragment.snap @@ -1,5 +1,6 @@ --- source: wgsl_bindgen/src/generate/bind_group/mod.rs +assertion_line: 466 --- #[derive(Debug)] pub struct WgpuBindGroup0EntriesParams<'a> { @@ -97,8 +98,8 @@ impl<'a> WgpuBindGroup0Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup0(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup0(pub wgpu::BindGroup); impl WgpuBindGroup0 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor { @@ -266,8 +267,8 @@ impl<'a> WgpuBindGroup1Entries<'a> { self.into_array().into_iter().collect() } } -#[derive(Debug)] -pub struct WgpuBindGroup1(wgpu::BindGroup); +#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] +pub struct WgpuBindGroup1(pub wgpu::BindGroup); impl WgpuBindGroup1 { pub const LAYOUT_DESCRIPTOR: wgpu::BindGroupLayoutDescriptor<'static> = wgpu::BindGroupLayoutDescriptor {