653: Implement Queue::write_buffer r=nobody a=kvark Implements https://github.com/gpuweb/gpuweb/pull/749 TODO: - [x] handle a case where the buffer is dropped while there is a pending write. Edit: we bump the submission index on the buffer, so it will be kept alive. - [x] properly free the temporary buffer and memory - [x] properly destroy the pending command buffer on device drop - [x] tweak the linear allocator settings - bumped to 16 megs - [x] provide a patch to wgpu-rs and verify it works on the examples - https://github.com/gfx-rs/wgpu-rs/pull/307 - [x] provide a patch to wgpu-native - https://github.com/gfx-rs/wgpu-native/pull/25 - [x] check/fix the trace/replay support Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This is an active GitHub mirror of the WebGPU implementation in Rust, which now lives in "gfx/wgpu" of Mozilla-central. Issues and pull requests are accepted, but some bidirectional synchronization may be involved.
WebGPU
This is the core logic of an experimental WebGPU implementation. It's written in Rust and is based on gfx-hal with help of gfx-extras. See the upstream WebGPU specification (work in progress).
The implementation consists of the following parts:
wgpu-core- internal Rust API for WebGPU implementations to usewgpu-types- Rust types shared betweenwgpu-core,wgpu-native, andwgpu-rsplayer- application for replaying the API traces, useswinit
This repository is not meant for direct use by applications. If you are looking for the user-facing Rust API, you need wgpu-rs. If you are looking for the native implementation or bindings to the API in other languages, you need wgpu-native.
Supported Platforms
| API | Windows 7/10 | Linux & Android | macOS & iOS |
|---|---|---|---|
| DX11 | ✅ | ||
| DX12 | ✔️ | ||
| Vulkan | ✔️ | ✔️ | |
| Metal | ✔️ | ||
| OpenGL | 🚧 | 🚧 | 🚧 |
✔️ = Primary support — ✅ = Secondary support — 🚧 = Unsupported, but support in progress