Squashed commit of the following: commit 16e9c89dbccda3e37d05f7548dc8b9ddfb1d8613 Author: Niklas Korz <niklas@niklaskorz.de> Date: Mon Jan 11 19:15:43 2021 +0100 format commit 8c69a70ec22427b6a030915e06654bb0fc9b3c69 Author: Niklas Korz <niklas@niklaskorz.de> Date: Mon Jan 11 19:12:24 2021 +0100 Implement Global::adapter_get_swap_chain_preferred_format commit 63efae1cff508d060eaa6ccafe80c02af6af21f4 Author: Niklas Korz <niklas@niklaskorz.de> Date: Mon Jan 11 17:25:42 2021 +0100 Move get_swap_chain_preferred_format to adapter commit 1e72a876994820aec9b18f9dac7f1a9ae82d7cee Author: Niklas Korz <niklas@niklaskorz.de> Date: Mon Jan 11 15:49:10 2021 +0100 Add fallback to device_get_swap_chain_preferred_format
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 gpu-alloc and gpu-descriptor. See the upstream WebGPU specification (work in progress).
The implementation consists of the following parts:
- internal Rust API for WebGPU implementations to use
- Rust types shared between
wgpu-core,wgpu-native, andwgpu-rsplayer- standalone application for replaying the API traces, useswinit
This repository contains the core of wgpu, and is not usable directly 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