gecko-dev/third_party/rust/wgpu-hal
Nicolas Silva 5a050d7c41 Bug 1854615 - Update `wgpu` to revision 7e0d6c971f900f6a8f01a9de9c41f7894164a82c. r=webgpu-reviewers,supply-chain-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D188978
2023-09-25 08:39:44 +00:00
..
examples Bug 1851721: build(webgpu): bump `wgpu` to 332cd0325da52675432830870584ec9766679c34 r=taskgraph-reviewers,supply-chain-reviewers,jmaher 2023-09-11 14:28:56 +00:00
src Bug 1854615 - Update `wgpu` to revision 7e0d6c971f900f6a8f01a9de9c41f7894164a82c. r=webgpu-reviewers,supply-chain-reviewers,teoxoy 2023-09-25 08:39:44 +00:00
.cargo-checksum.json Bug 1854615 - Update `wgpu` to revision 7e0d6c971f900f6a8f01a9de9c41f7894164a82c. r=webgpu-reviewers,supply-chain-reviewers,teoxoy 2023-09-25 08:39:44 +00:00
Cargo.toml Bug 1854615 - Update `wgpu` to revision 7e0d6c971f900f6a8f01a9de9c41f7894164a82c. r=webgpu-reviewers,supply-chain-reviewers,teoxoy 2023-09-25 08:39:44 +00:00
LICENSE.APACHE
LICENSE.MIT
README.md

README.md

wgpu-hal is an explicit low-level GPU abstraction powering wgpu-core. It's a spiritual successor to gfx-hal, but with reduced scope, and oriented towards WebGPU implementation goals.

It has no overhead for validation or tracking, and the API translation overhead is kept to the bare minimum by the design of WebGPU. This API can be used for resource-demanding applications and engines.

Usage notes

All of the API is unsafe. Documenting the exact safety requirements for the state and function arguments is desired, but will likely be incomplete while the library is in early development.

The returned errors are only for cases that the user can't anticipate, such as running out-of-memory, or losing the device. For the counter-example, there is no error for mapping a buffer that's not mappable. As the buffer creator, the user should already know if they can map it.

The API accept iterators in order to avoid forcing the user to store data in particular containers. The implementation doesn't guarantee that any of the iterators are drained, unless stated otherwise by the function documentation. For this reason, we recommend that iterators don't do any mutating work.

Debugging

Most of the information in https://github.com/gfx-rs/wgpu/wiki/Debugging-wgpu-Applications still applies to this API, with an exception of API tracing/replay functionality, which is only available in wgpu-core.