Skip to content

Commit

Permalink
Upgrade wgpu to 0.15.1 (#250)
Browse files Browse the repository at this point in the history
* Apply changes for wgpu 0.15

* Add msaa detection

* Enable msaa by default

* Add simplified diagram

* Resolve some unwraps
  • Loading branch information
maxammann committed Apr 9, 2023
1 parent 28573ce commit bca19c8
Show file tree
Hide file tree
Showing 14 changed files with 125 additions and 41 deletions.
4 changes: 4 additions & 0 deletions docs/src/development-documents/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ A simplified version is shown below:

![](./figures/render-stack.drawio.svg)

A further simplified version:

![](./figures/simplified-render-stack.drawio.svg)

Notes:
* wgpu is able to create an interface through which we can reach any device with a GPU.

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions maplibre-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ winit = { version = "0.27.2", default-features = false, features = ["x11", "wayl

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { version = "0.3.58", features = ["Window"] }
wasm-bindgen = "0.2.81"
wasm-bindgen-futures = "0.4.31"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"

[dependencies]
maplibre = { path = "../maplibre", version = "0.1.0" }
Expand Down
3 changes: 2 additions & 1 deletion maplibre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ geozero = { version = "0.9.7", default-features = false, features = ["with-mvt",
tile-grid = "0.3.0"

# Rendering
wgpu = "0.14.0"
wgpu = "0.15.0"
# wgpu = { git = "https://github.com/gfx-rs/wgpu" }
lyon = { version = "1.0.0", features = [] }
raw-window-handle = "0.5.0"

Expand Down
2 changes: 1 addition & 1 deletion maplibre/src/raster/resource_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn resource_system(
false,
false,
false,
true,
surface.is_multisampling_supported(settings.msaa),
true,
)
.describe_render_pipeline()
Expand Down
2 changes: 2 additions & 0 deletions maplibre/src/render/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use crate::render::graph::RenderGraphError;
pub enum RenderError {
#[error("error in surface")]
Surface(#[from] wgpu::SurfaceError),
#[error("error during surface creation")]
CreateSurfaceError(#[from] wgpu::CreateSurfaceError),
#[error("error in render graph")]
Graph(#[from] RenderGraphError),
#[error("error while requesting device")]
Expand Down

0 comments on commit bca19c8

Please sign in to comment.