You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 18, 2021. It is now read-only.
281: The Context trait r=grovesNL a=kvark
The main motivation here is to avoid blocking the wgpu-core updates by `wgpu-native`. Instead, `wgpu-native` becomes a branch, and the dependency of `wgpu-rs` -> `wgpu-native` starts adhering to the contract/API of the standard webgpu-native headers.
The biggest change is the introduction of the Context trait. I recall us discussing 2 downsides to having this trait:
1. inconvenient for the users to include. This is a non-issue here, since it's private.
2. more code to maintain. This is less of an issue if we aim to have 3 backends.
What this gives in return is a well established contract with the backends. Unlike gfx-rs, the backend code is right here, a part of the crate, so the contract is only for internal use.
Fixes#156 : the "direct" implementation of it goes straight to wgpu-core. What this gives us is less overhead for command recording, since there is no longer an extra indirection on every command, and no heap allocation at the end of a render pass.
The downside of this PR is one extra `Arc` (with addref) per object.
This commit also has small improvements:
- consuming command buffers on submit (Fixes#267)
- Instance type
- proper call to destructors
- fallible `request_device`
Co-authored-by: Dzmitry Malyshau <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
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.
10
10
11
-
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.
11
+
wgpu-rs can target both the natively supported backends and WASM directly.
0 commit comments