mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
b71fc33c72611dcb859bf13d859dbc60eca9d3c8
359: Make examples work again r=kvark a=GabrielMajeri This PR fixes the C example code to not crash and actually run. I've also added a few assertions to ensure a warning is emitted next time somebody forgots to increase `max_bind_groups` to something non-zero on device creation. To help with debugging the examples, I've configured CMake to include debug info in the builds. Some new Makefile targets for the examples have been added to automate running them. Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
This is an active GitHub mirror of the WebGPU native implementation in Rust, which now lives in Mozilla-central. Issues and pull requests are accepted, but we merge them in m-c manually and then sync to GitHub instead of landing directly here.
WebGPU
This is an experimental WebGPU implementation as a native static library. It's written in Rust and is based on gfx-hal and Rendy libraries. The corresponding WebIDL specification can be found at gpuweb project.
The implementation consists of the following parts:
wgpu-native- the native implementation of WebGPU as a C API librarywgpu-remote- remoting layer to work with WebGPU across the process boundaryffi- the C headers generated by cbindgen for both of the libraries
Supported Platforms
| API | Windows | Linux | macOS & iOS |
|---|---|---|---|
| DX11 | ✔️ | ||
| DX12 | ✔️ | ||
| Vulkan | ✔️ | ✔️ | |
| Metal | ✔️ | ||
| OpenGL |
Usage
This repository contains C-language examples that link to the native library targets and perform basic rendering and computation. Please refer to our Getting Started page at the wiki for more information.
Bindings:
- https://github.com/gfx-rs/wgpu-rs - idiomatic Rust wrapper with a few more examples to get a feel of the API
- https://nest.pijul.com/porky11/wgpu - experimental Scopes wrapper
Description
A cross-platform, safe, pure-Rust graphics API.
92 MiB
0 Stars
1 Watchers
0 Forks
Languages
Rust
78.5%
WGSL
13%
GLSL
3.1%
Metal
2.8%
HLSL
2.3%
Other
0.2%