Erich Gubler
6f0c2434a7
chore(hal,core): use core::{error::Error,format} instead of std
...
This allows `wgpu-hal` to be used in `no_std` environments, except that
currently, only the `noop` backend supports `no_std`.
In the future, `cfg(all(gles, webgl))` should also be `no_std`, but that
requires further work.
Co-Authored_by: Kevin Reid <kpreid@switchb.org >
2025-02-26 22:58:50 -05:00
Kevin Reid
7bcbfe0712
wgpu-core: Adjust imports to allow no_std.
...
Dependencies on `std` that still exist:
* Locks
* `std::error::Error` (waiting for Rust 1.81)
* `std::os::raw::c_char` for FFI
* `thread_local` and `Backtrace` in `snatch`
2025-02-21 08:47:16 +01:00
Kornel
222f1ea733
Reduce code size of error handling
2024-08-19 14:38:20 +01:00
teoxoy
3547138716
remove PrettyError
2024-07-02 18:06:19 +02:00
teoxoy
08b8e96c40
move ContextError's fmt logic in its Display impl
2024-07-02 18:06:19 +02:00
teoxoy
ed1e8ecf4b
remove label getters from Global
...
Also removes label from `Element::Error` and slightly refactors ContextError.
2024-07-02 18:06:19 +02:00
teoxoy
4a19ac279c
introduce MultiError and use it for BGL incompatibility errors
2024-07-02 18:06:19 +02:00
teoxoy
ef2da1a6d7
rename UsageConflict to ResourceUsageCompatibilityError
2024-06-20 16:34:17 +02:00
John-John Tedro
950d765a4d
Remove G parameter in Global<G> and generic IdentityHandlerFactory ( #5159 )
2024-01-29 15:37:57 +01:00
John-John Tedro
90b078f037
Improve ergonomics of gfx_select! ( #5069 )
2024-01-16 11:15:56 +01:00
daxpedda
580340f2d3
Add cfg_aliases to wgpu-core and wgpu-hal ( #5055 )
2024-01-14 00:59:59 -05:00
6e21f7a929
Arcanization of wgpu core resources ( #3626 )
...
Arcanization of wgpu_core resources
---------
Co-authored-by: Elabajaba <Elabajaba@users.noreply.github.com >
Co-authored-by: Niklas Korz <niklas@niklaskorz.de >
Co-authored-by: grovesNL <josh@joshgroves.com >
Co-authored-by: Jim Blandy <jimb@red-bean.com >
Co-authored-by: Mauro Gentile <Mauro.Gentile@ubisoft.com >
Co-authored-by: Sludge <96552222+SludgePhD@users.noreply.github.com >
2023-11-20 08:41:52 +01:00
daxpedda and Connor Fitzgerald
88f18ed190
Don't implement Send or Sync on Wasm ( #3691 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-06-29 20:31:18 +00:00
Connor Fitzgerald and Connor Fitzgerald
10172e1f38
Move Examples and Tests to Their Own Crates ( #3841 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io >
2023-06-10 18:35:46 +00:00
Jim Blandy
29914b308f
wgpu-core: Move identity code to new identity module.
2023-05-24 09:54:03 -07:00
Jim Blandy
f00e6b70ea
wgpu-core: Move Global to new global module.
2023-05-24 09:54:03 -07:00
Elabajaba
1e27fd4afb
fix clippy for rust 1.67 ( #3435 )
...
* clippy --fix
* elide lifetimes
* fmt and more fixes
* disable clippy::needless_borrowed_reference as it clashes with clippy::pattern_type_mismatch
* missed flags for target=wasm32-unknown-unknown
2023-02-01 23:06:03 +01:00
Mikko Lehtonen
60fd2a32e9
Implement missing PrettyError impls ( #3066 )
2022-10-05 18:43:52 -04:00
Mikko Lehtonen
78e4cd5dbc
Remove AsDisplay trait in error formatting
2021-08-03 11:51:52 -04:00
Mikko Lehtonen
019dca3cfa
Error formatting impls closer to errors
...
This is achieved by making a ErrorFormatter helper that is passed to
fmt_pretty, making the impls a lot simpler.
2021-08-03 11:51:52 -04:00
Mikko Lehtonen
e4cdddc639
Move error formatting to wgpu-core
2021-08-03 11:51:52 -04:00