From b7883e485c37bb5265356b1077cbd80ff75b65c1 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 27 Apr 2020 00:11:22 -0400 Subject: [PATCH] Small comment on WebGPU backend bit, readme update --- README.md | 2 +- src/backend/web.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 640610b112..d27ad0cff2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ wgpu-rs is an idiomatic Rust wrapper over [wgpu-core](https://github.com/gfx-rs/wgpu). It's designed to be suitable for general purpose graphics and computation needs of Rust community. -Currently wgpu-rs works on native platforms, but [WASM support is currently being added](https://github.com/gfx-rs/wgpu-rs/issues/101) as well. +wgpu-rs can target both the natively supported backends and WASM directly. ## Gallery diff --git a/src/backend/web.rs b/src/backend/web.rs index 2434089020..f8a815c086 100644 --- a/src/backend/web.rs +++ b/src/backend/web.rs @@ -634,6 +634,9 @@ impl crate::Context for Context { options: &crate::RequestAdapterOptions<'_>, _backends: wgt::BackendBit, ) -> Self::RequestAdapterFuture { + //TODO: support this check, return `None` if the flag is not set. + // It's not trivial, since we need the Future logic to have this check, + // and currently the Future her has no room for extra parameter `backends`. //assert!(backends.contains(wgt::BackendBit::BROWSER_WEBGPU)); let mut mapped_options = web_sys::GpuRequestAdapterOptions::new(); let mapped_power_preference = match options.power_preference {