Skip to content

Commit

Permalink
Upgrade to wgpu 0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed May 6, 2024
1 parent 0e83bf9 commit a52e9c5
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 29 deletions.
64 changes: 36 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fj-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ default-features = false
features = ["png", "jpeg"]

[dependencies.wgpu]
version = "0.19.4"
version = "0.20.0"
features = ["webgl"]

# We don't depend on `getrandom` directly, but we need this to enable the `js`
Expand Down
4 changes: 4 additions & 0 deletions crates/fj-viewer/src/graphics/navigation_cube.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@ impl NavigationCubeRenderer {
vertex: wgpu::VertexState {
module: &shader,
entry_point: "vertex",
compilation_options:
wgpu::PipelineCompilationOptions::default(),
buffers: &[model::ModelVertex::desc()],
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "fragment",
compilation_options:
wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: config.format,
blend: Some(wgpu::BlendState {
Expand Down
4 changes: 4 additions & 0 deletions crates/fj-viewer/src/graphics/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ impl Pipeline {
vertex: wgpu::VertexState {
module: shader.module,
entry_point: "vertex",
compilation_options:
wgpu::PipelineCompilationOptions::default(),
buffers: &[wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as u64,
step_mode: wgpu::VertexStepMode::Vertex,
Expand Down Expand Up @@ -115,6 +117,8 @@ impl Pipeline {
fragment: Some(wgpu::FragmentState {
module: shader.module,
entry_point: shader.frag_entry,
compilation_options:
wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: color_format,
blend: Some(
Expand Down

0 comments on commit a52e9c5

Please sign in to comment.