From a68acbdff3cd247ca2994a85fdb5a557c5dbf522 Mon Sep 17 00:00:00 2001 From: Maximilian Ammann Date: Sat, 8 Oct 2022 20:56:58 +0200 Subject: [PATCH] Upgrade wgpu --- maplibre-build-tools/Cargo.toml | 2 +- maplibre/Cargo.toml | 2 +- maplibre/src/render/resource/surface.rs | 2 ++ web/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/maplibre-build-tools/Cargo.toml b/maplibre-build-tools/Cargo.toml index 89be35c0..3c5bb87d 100644 --- a/maplibre-build-tools/Cargo.toml +++ b/maplibre-build-tools/Cargo.toml @@ -12,7 +12,7 @@ readme = "../README.md" sqlite = ["rusqlite"] [dependencies] -naga = { git = "https://github.com/gfx-rs/naga", branch = "master", features = ["wgsl-in"] } +naga = { version = "*", features = ["wgsl-in"] } walkdir = "2.3.2" log = "0.4.17" rusqlite = { version = "0.27.0", optional = true } diff --git a/maplibre/Cargo.toml b/maplibre/Cargo.toml index 0367c17d..cfa95cc7 100644 --- a/maplibre/Cargo.toml +++ b/maplibre/Cargo.toml @@ -51,7 +51,7 @@ geozero = { version = "0.9.5", default-features = false, features = ["with-mvt", tile-grid = "0.3.0" # Rendering -wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "94ce763" } +wgpu = "0.14.0" lyon = { version = "1.0.0", features = [] } raw-window-handle = "0.5.0" diff --git a/maplibre/src/render/resource/surface.rs b/maplibre/src/render/resource/surface.rs index 10fbb92e..537fc0c2 100644 --- a/maplibre/src/render/resource/surface.rs +++ b/maplibre/src/render/resource/surface.rs @@ -2,6 +2,7 @@ //! a handle to a window. A headless surface renders to a texture. use std::{mem::size_of, sync::Arc}; +use wgpu::CompositeAlphaMode; use crate::{ render::{eventually::HasChanged, resource::texture::TextureView, settings::RendererSettings}, @@ -133,6 +134,7 @@ impl Surface { { let size = window.size(); let surface_config = wgpu::SurfaceConfiguration { + alpha_mode: CompositeAlphaMode::Auto, usage: wgpu::TextureUsages::RENDER_ATTACHMENT, format: settings.texture_format, width: size.width(), diff --git a/web/Cargo.toml b/web/Cargo.toml index 8c07c754..9c24035f 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -27,7 +27,7 @@ rand = { version = "0.7", features = ["wasm-bindgen"] } console_error_panic_hook = "0.1.7" # Exact version requirement can be removed as soon as https://github.com/gfx-rs/wgpu/pull/2954 is merged -web-sys = { version = "=0.3.58", features = [ +web-sys = { version = "0.3.58", features = [ "Window", "Worker", "WorkerGlobalScope", "DedicatedWorkerGlobalScope", "MessageEvent", "Request", "RequestInit", "RequestMode", "Response", "Headers",