Skip to content
Merged

30.0 #676

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,515 changes: 797 additions & 718 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exclude = [
]

[workspace.dependencies]
wgpu = "29.0"
wgpu = "30.0"
anyhow = "1"
glam = { version = "0.30.9", features = ["bytemuck"] }
bytemuck = { version = "1.13.1", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions code/beginner/tutorial1-window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ anyhow = "1.0"
winit = { version = "0.30" }
env_logger = "0.10"
log = "0.4"
wgpu = "29.0"
wgpu = "30.0"
pollster = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "29.0", features = ["webgl"]}
wgpu = { version= "30.0", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.30"
web-sys = { version = "0.3.69", features = [
Expand Down
4 changes: 2 additions & 2 deletions code/beginner/tutorial2-surface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ anyhow = "1.0"
winit = { version = "0.30", features = ["android-native-activity"] }
env_logger = "0.10"
log = "0.4"
wgpu = "29.0"
wgpu = "30.0"
pollster = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "29.0", features = ["webgl"]}
wgpu = { version= "30.0", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
Expand Down
5 changes: 3 additions & 2 deletions code/beginner/tutorial2-surface/src/challenge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await?;

Expand Down Expand Up @@ -86,6 +87,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
desired_maximum_frame_latency: 2,
view_formats: vec![],
color_space: wgpu::SurfaceColorSpace::Auto,
};

Ok(Self {
Expand Down Expand Up @@ -120,7 +122,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -169,7 +170,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
5 changes: 3 additions & 2 deletions code/beginner/tutorial2-surface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await?;

Expand Down Expand Up @@ -86,6 +87,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
desired_maximum_frame_latency: 2,
view_formats: vec![],
color_space: wgpu::SurfaceColorSpace::Auto,
};

Ok(Self {
Expand Down Expand Up @@ -120,7 +122,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -174,7 +175,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions code/beginner/tutorial3-pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ anyhow = "1.0"
winit = { version = "0.30", features = ["android-native-activity"] }
env_logger = "0.10"
log = "0.4"
wgpu = "29.0"
wgpu = "30.0"
pollster = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wgpu = { version = "29.0", features = ["webgl"]}
wgpu = { version= "30.0", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
Expand Down
5 changes: 3 additions & 2 deletions code/beginner/tutorial3-pipeline/src/challenge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await?;

Expand Down Expand Up @@ -88,6 +89,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
Expand Down Expand Up @@ -246,7 +248,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -307,7 +308,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
5 changes: 3 additions & 2 deletions code/beginner/tutorial3-pipeline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await
.unwrap();
Expand Down Expand Up @@ -89,6 +90,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
Expand Down Expand Up @@ -191,7 +193,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -248,7 +249,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions code/beginner/tutorial4-buffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
anyhow = "1.0"
winit = { version = "0.30", features = ["android-native-activity"] }
wgpu = "29.0"
wgpu = "30.0"
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
Expand All @@ -21,7 +21,7 @@ bytemuck = { version = "1.24", features = [ "derive" ] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "29.0", features = ["webgl"]}
wgpu = { version= "30.0", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
Expand Down
7 changes: 4 additions & 3 deletions code/beginner/tutorial4-buffer/src/challenge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await?;

Expand Down Expand Up @@ -155,6 +156,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
Expand All @@ -175,7 +177,7 @@ impl State {
vertex: wgpu::VertexState {
module: &shader,
entry_point: Some("vs_main"),
buffers: &[Vertex::desc()],
buffers: &[Some(Vertex::desc())],
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
Expand Down Expand Up @@ -310,7 +312,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -380,7 +381,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
7 changes: 4 additions & 3 deletions code/beginner/tutorial4-buffer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await?;

Expand Down Expand Up @@ -148,6 +149,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
Expand All @@ -168,7 +170,7 @@ impl State {
vertex: wgpu::VertexState {
module: &shader,
entry_point: Some("vs_main"),
buffers: &[Vertex::desc()],
buffers: &[Some(Vertex::desc())],
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
Expand Down Expand Up @@ -265,7 +267,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -324,7 +325,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions code/beginner/tutorial5-textures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bytemuck = { version = "1.24", features = [ "derive" ] }
env_logger = "0.10"
log = "0.4"
pollster = "0.3"
wgpu = "29.0"
wgpu = "30.0"
winit = { version = "0.30", features = ["android-native-activity"] }

[dependencies.image]
Expand All @@ -24,7 +24,7 @@ features = ["png", "jpeg"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1.0"
wgpu = { version = "29.0", features = ["webgl"]}
wgpu = { version= "30.0", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
Expand Down
7 changes: 4 additions & 3 deletions code/beginner/tutorial5-textures/src/challenge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await
.unwrap();
Expand Down Expand Up @@ -158,6 +159,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let texture_bind_group_layout =
Expand Down Expand Up @@ -240,7 +242,7 @@ impl State {
vertex: wgpu::VertexState {
module: &shader,
entry_point: Some("vs_main"),
buffers: &[Vertex::desc()],
buffers: &[Some(Vertex::desc())],
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
Expand Down Expand Up @@ -343,7 +345,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -409,7 +410,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
7 changes: 4 additions & 3 deletions code/beginner/tutorial5-textures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ impl State {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
apply_limit_buckets: true,
})
.await
.unwrap();
Expand Down Expand Up @@ -151,6 +152,7 @@ impl State {
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
color_space: wgpu::SurfaceColorSpace::Auto,
};

let diffuse_bytes = include_bytes!("happy-tree.png");
Expand Down Expand Up @@ -213,7 +215,7 @@ impl State {
vertex: wgpu::VertexState {
module: &shader,
entry_point: Some("vs_main"),
buffers: &[Vertex::desc()],
buffers: &[Some(Vertex::desc())],
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
Expand Down Expand Up @@ -312,7 +314,6 @@ impl State {
let output = match self.surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(surface_texture) => surface_texture,
wgpu::CurrentSurfaceTexture::Suboptimal(surface_texture) => {
self.surface.configure(&self.device, &self.config);
surface_texture
}
wgpu::CurrentSurfaceTexture::Timeout
Expand Down Expand Up @@ -372,7 +373,7 @@ impl State {
}

self.queue.submit(iter::once(encoder.finish()));
output.present();
self.queue.present(output);

Ok(())
}
Expand Down
Loading
Loading