From 538f10aaf127d70f93b44d136d12e1de89d7d1af Mon Sep 17 00:00:00 2001 From: ScanMountGoat Date: Wed, 30 Oct 2024 12:37:38 -0500 Subject: [PATCH] update wgpu --- example/Cargo.toml | 2 +- example/src/compute_shader.rs | 2 +- example/src/shader.rs | 4 ++-- wgsl_to_wgpu/Cargo.toml | 4 ++-- wgsl_to_wgpu/src/data/fragment_simple.rs | 2 +- wgsl_to_wgpu/src/data/fragment_simple_rustfmt.rs | 2 +- wgsl_to_wgpu/src/entry.rs | 8 ++++---- wgsl_to_wgpu/src/lib.rs | 8 ++++---- wgsl_to_wgpu/tests/output/vertex_entries.rs | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/example/Cargo.toml b/example/Cargo.toml index 4efee8e..7b92a00 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] winit = "0.30" -wgpu = "22.0.0" +wgpu = "23.0.0" futures = "0.3" bytemuck = { version = "1.16", features = ["derive"] } encase = { version = "0.9.0", features = ["glam"] } diff --git a/example/src/compute_shader.rs b/example/src/compute_shader.rs index 1e28fc8..f7d3753 100644 --- a/example/src/compute_shader.rs +++ b/example/src/compute_shader.rs @@ -98,7 +98,7 @@ pub mod compute { label: Some("Compute Pipeline main"), layout: Some(&layout), module: &module, - entry_point: "main", + entry_point: Some("main"), compilation_options: Default::default(), cache: Default::default(), }) diff --git a/example/src/shader.rs b/example/src/shader.rs index 8ee245c..3738d19 100644 --- a/example/src/shader.rs +++ b/example/src/shader.rs @@ -203,7 +203,7 @@ pub fn vertex_state<'a, const N: usize>( ) -> wgpu::VertexState<'a> { wgpu::VertexState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), buffers: &entry.buffers, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, @@ -233,7 +233,7 @@ pub fn fragment_state<'a, const N: usize>( ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, diff --git a/wgsl_to_wgpu/Cargo.toml b/wgsl_to_wgpu/Cargo.toml index 836fe65..6bd93db 100644 --- a/wgsl_to_wgpu/Cargo.toml +++ b/wgsl_to_wgpu/Cargo.toml @@ -10,8 +10,8 @@ readme = "../README.md" edition = "2021" [dependencies] -naga = { version = "22.0.0", features = ["wgsl-in"] } -wgpu-types = "22.0.0" +naga = { version = "23.0.0", features = ["wgsl-in"] } +wgpu-types = "23.0.0" syn = "2.0" quote = "1.0" proc-macro2 = "1.0" diff --git a/wgsl_to_wgpu/src/data/fragment_simple.rs b/wgsl_to_wgpu/src/data/fragment_simple.rs index 88a8d59..58929b5 100644 --- a/wgsl_to_wgpu/src/data/fragment_simple.rs +++ b/wgsl_to_wgpu/src/data/fragment_simple.rs @@ -11,7 +11,7 @@ pub fn fragment_state<'a, const N: usize>( ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, diff --git a/wgsl_to_wgpu/src/data/fragment_simple_rustfmt.rs b/wgsl_to_wgpu/src/data/fragment_simple_rustfmt.rs index 1c57c4a..0023536 100644 --- a/wgsl_to_wgpu/src/data/fragment_simple_rustfmt.rs +++ b/wgsl_to_wgpu/src/data/fragment_simple_rustfmt.rs @@ -11,7 +11,7 @@ pub fn fragment_state<'a, const N: usize>( ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, diff --git a/wgsl_to_wgpu/src/entry.rs b/wgsl_to_wgpu/src/entry.rs index de4d0bb..fa001a1 100644 --- a/wgsl_to_wgpu/src/entry.rs +++ b/wgsl_to_wgpu/src/entry.rs @@ -133,7 +133,7 @@ pub fn vertex_states(module: &naga::Module) -> TokenStream { ) -> wgpu::VertexState<'a> { wgpu::VertexState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), buffers: &entry.buffers, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, @@ -268,7 +268,7 @@ pub fn fragment_states(module: &naga::Module) -> TokenStream { ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, @@ -345,7 +345,7 @@ mod test { ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, @@ -421,7 +421,7 @@ mod test { ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, diff --git a/wgsl_to_wgpu/src/lib.rs b/wgsl_to_wgpu/src/lib.rs index e329144..9eb354d 100644 --- a/wgsl_to_wgpu/src/lib.rs +++ b/wgsl_to_wgpu/src/lib.rs @@ -393,7 +393,7 @@ fn create_compute_pipeline(e: &naga::EntryPoint) -> TokenStream { label: Some(#label), layout: Some(&layout), module: &module, - entry_point: #entry_point, + entry_point: Some(#entry_point), compilation_options: Default::default(), cache: Default::default(), }) @@ -486,7 +486,7 @@ mod test { ) -> wgpu::FragmentState<'a> { wgpu::FragmentState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), targets: &entry.targets, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants, @@ -893,7 +893,7 @@ mod test { label: Some("Compute Pipeline main1"), layout: Some(&layout), module: &module, - entry_point: "main1", + entry_point: Some("main1"), compilation_options: Default::default(), cache: Default::default(), }, @@ -909,7 +909,7 @@ mod test { label: Some("Compute Pipeline main2"), layout: Some(&layout), module: &module, - entry_point: "main2", + entry_point: Some("main2"), compilation_options: Default::default(), cache: Default::default(), }, diff --git a/wgsl_to_wgpu/tests/output/vertex_entries.rs b/wgsl_to_wgpu/tests/output/vertex_entries.rs index a469477..d9862fa 100644 --- a/wgsl_to_wgpu/tests/output/vertex_entries.rs +++ b/wgsl_to_wgpu/tests/output/vertex_entries.rs @@ -89,7 +89,7 @@ pub fn vertex_state<'a, const N: usize>( ) -> wgpu::VertexState<'a> { wgpu::VertexState { module, - entry_point: entry.entry_point, + entry_point: Some(entry.entry_point), buffers: &entry.buffers, compilation_options: wgpu::PipelineCompilationOptions { constants: &entry.constants,