[rs] Small comment on WebGPU backend bit, readme update

This commit is contained in:
Dzmitry Malyshau
2020-04-27 00:11:22 -04:00
parent 7633f48617
commit 196e0dba7e
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View File

@@ -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 {