What is wgpu?
wgpu is our implementation of WebGPU for native platforms. That is, running natively on desktop and mobile. It's meant to be safe, portable, and fast. Our implementation runs on a variety of platforms today.
Currently the toolchain looks like:
wgpu-rs -> wgpu-native -> gfx-backend-xxx -> native API
In the near future, we are hoping to get the Web deployment path open via WebGL:
wgpu-rs -> wgpu-native -> gfx-backend-gl -> glow -> WebGL -> Browser
Later down the road, we should be able to target WebGPU on the Web:
wgpu-rs -> WebGPU -> Browser
Which on Firefox would likely resolve to this on the client side:
Firefox -> wgpu-remote -> wgpu-native -> gfx-backend-xxx -> native API
Who is this for?
Anyone who wants to write graphics & compute code that runs everywhere. It's a concise API that is good for quick prototyping as well as learning the modern GPU concepts.
Main changes since 0.2:
- update to the latest WebGPU API spec, minus debug labels, error handling, and GPU bundles
- first bits of validation, covering: bind group creation and binding, draw call ranges
- basing on gfx-hal-0.3 and
- integration with raw-window-handle
- solid protection against deadlock in internal structures, with a good deal of type level assistance as well as a run-time test
- tracking individual sub-resources in textures (allows to generate mipmaps!), more correct pipeline barrier injection
- indirect draws and dispatches
- stencil masks and reference values
We got new examples:
- mipmap generation
- reading data
- shadow sampling artifacts on macOS/Intel
- swapchain suface leaking on macOS/Nvidia
- GL backend is not available in wgpu-rs