Commit Graph
244 Commits
Author SHA1 Message Date
Erich Gubler b9e787e667 refactor: satisfy clippy::never_loop 2024-06-17 05:26:03 -04:00
Kevin Reid 9b70254437 Reduce string allocations related to labels and logging. (#5690) 2024-05-14 04:39:28 -04:00
Erich Gubler ca91744955 chore: apply unused_qualifications lint via cargo +1.78.0 fix && cargo fmt 2024-05-13 10:10:54 -04:00
Jim Blandy b3c5a6fb84 [core] Enforce a deadlock-free locking order for Mutexes.
If `debug_assertions` or the `"validate-locks"` feature are enabled,
change `wgpu-core` to use a wrapper around `parking_lot::Mutex` that
checks for potential deadlocks.

At the moment, `wgpu-core` does contain deadlocks, so the ranking in
the `lock::rank` module is incomplete, in the interests of keeping it
acyclic. #5572 tracks the work needed to complete the ranking.
2024-04-22 18:49:03 -07:00
Andreas Reich cbace631ec Fix surfaces only compatible with first enabled backend (#5535) 2024-04-17 15:32:04 -04:00
Jim Blandy f8deb0317f [core] Use expect instead of "if let else panic". (#5513)
Use `Option::expect` to check the result from `Arc::into_inner`,
rather than `if let Some ... else panic!`.
2024-04-10 03:53:10 -04:00
lylythechosenone d814851350 [wgpu-core] pass resources as Arcs when adding them to the registry (#5499)
* [wgpu-core] pass resources as Arcs when adding them to the registry (fix gfx-rs#5493)

* [wgpu-core] also add `Arc::new` to `#[cfg(dx12)]` blocks

* [wgpu-core] allow `clippy::arc_with_non_send_sync`
2024-04-06 09:10:24 +02:00
Nicolas SilvaandConnor Fitzgerald c77b4d3f56 Use a unique tracker index per resource instead of the ID in trackers (#5244)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-26 20:25:12 +00:00
Nicolas Silva 286306d7e8 Store the device's queue via a weak ref instead of an ID (#5230) 2024-02-15 15:42:28 -05:00
John-John Tedro f45d500c1c Remove HalSurface and fix layout assumptions in AnySurface and AnyDerive 2024-02-02 14:31:28 -05:00
Andreas Reich 45957088ad Fix panic when creating a surface while no backend is available (#5166)
* Fix panic when creating a surface while no backend is available

* changelog entry
2024-01-31 08:48:33 +00: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 dec6ea5ea4 Improve the consistency of identifiers (#5108) 2024-01-29 10:56:04 +01:00
daxpedda 580340f2d3 Add cfg_aliases to wgpu-core and wgpu-hal (#5055) 2024-01-14 00:59:59 -05:00
Andreas Reich 4fd4a7142e Unify surface creation by introducing new SurfaceTarget enum (#4984) 2024-01-11 22:24:01 -05:00
Jim Blandy 8af6975d5e Prefer Arc::into_inner over Arc::try_unwrap. (#5018) 2024-01-08 19:24:33 -05:00
Valaphee The Meerkat a1fafe394f Remove DX11 backend (#4828) 2023-12-06 15:12:46 -05:00
teoxoy acdc9fcced move alignments & downlevel .clone()s inside function 2023-11-29 19:55:18 +01:00
teoxoy da73522720 rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
teoxoy 9be6c8890f rename DeviceDescriptor.features to DeviceDescriptor.required_features 2023-11-29 19:55:18 +01:00
Nicolas Silva ebcfd25b58 Downgrade resource lifetime management log level to trace. (#4772)
* Downgrade resource lifetime management log level to trace.

Allow promoting it back to info via an feature flag.

* Don't filter out info and warning log in the examples.

* Changelog entry.
2023-11-25 17:33:02 +01:00
Nicolas Silva 350c9633fe Conditionally lift API logging from trace to info level (#4769)
* Conditionally lift API logging from trace to info level

Most of this logging used to be info level until I demoted it to trace. Unfortunately this gets in my way because:
 - Most of the logging I currently need is these API entry points, there is is a fair amount of more verbose logging in wgpu at higher levels than trace
 - Firefox disable all trace and debug logging for optimized builds, which means I miss the this API logging where I need most.

This patch lifts the api logging back to info level.

* Move the api logging behind the api_log macro
2023-11-24 19:14:38 +01: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 37fe6a5424 Mark some methods unsafe (#4596) 2023-10-29 23:59:48 -04:00
Valaphee The Meerkat 92d237fd93 Fix missing feature checks for dx11 and dx12 (#4287) 2023-10-23 18:49:17 +00:00
Nicolas SilvaandJim Blandy 8c03aa85e6 Make it possible to filter labels out ahead of wgpu-hal (#4246)
* Make it possible to filter labels out.

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2023-10-18 17:45:59 +02:00
Nicolas SilvaandConnor Fitzgerald f95d1c55e3 Expose Instance flags (#4230)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-11 17:39:04 +00:00
Colin Edwards 0f7b530ea8 Add WinUI 3 SwapChainPanel support (#4191) 2023-10-11 13:36:30 -04:00
Nicolas Silva 9a76c483da Add trace level logging to most API entry points (#4183)
* Add trace level logging to most API entry points

* Add a changelog entry
2023-09-28 18:29:44 +02:00
Jim Blandy 7634ae6112 wgpu_core: Add logging to Instance::new.
For each backend `blah`, log::debug/trace whether we were able to
populate `Instance::blah`.
2023-09-05 13:47:27 -04:00
Pieter-Jan Briers e973a06268 Allow specifying minor GLES3 version (#3998) 2023-08-16 11:51:56 -04:00
3305e88d63 feature: Timestamp queries (#3636)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-08-02 18:04:24 -04:00
Aaron HillandConnor Fitzgerald fd5550cc89 Make RequestAdapterOptions.power_preference optional (#3903)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-07-19 21:04:31 +00:00
Connor FitzgeraldandConnor 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 55e3558db4 wgpu-core: Move Resource trait to resource module. 2023-05-24 09:54:03 -07:00
Jim Blandy 29914b308f wgpu-core: Move identity code to new identity module. 2023-05-24 09:54:03 -07:00
Jim Blandy 13bd3eea55 wgpu-core: Move HalAPI to new hal_api 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
daxpedda 85fc427470 Adjust internal canvas size on Surface::configure() (#3690) 2023-04-19 21:09:31 +00:00
Connor FitzgeraldandConnor Fitzgerald 51bf95bbd6 Make wgpu-core errors non-exhaustive (#3652)
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-04-07 19:18:29 +02:00
Benjamin Schaaf fdbbd02c1e Properly drop surfaces (#3647)
Co-authored-by: Benjamin Schaaf <bschaaf@sublimetext.com>
Fixes #3646
2023-04-05 17:48:12 -04:00
Connor Fitzgerald db3be88f90 Uppercase all error strings 2023-03-03 11:33:20 -05:00
Teodor Tanasoaia 2a3a9bf013 Remove unused STORAGE_ATOMICS flag (#3539) 2023-03-01 13:27:41 -05:00
daxpedda 74303308cd Make crate features no-op on incompatible targets (#3466)
* Make crate features no-op on incompatible targets

* Remove `portable_features`

* Test `--all-features` in CI

* Make `renderdoc` no-op on WASM

* Address review
2023-02-21 13:50:55 +01:00
Nicolas Silva 8f1db56fc0 Work around a clippy error (#3505) 2023-02-20 15:35:58 +01:00
Nathan Adams 238697c2da Add MULTISAMPLE_X16 texture format feature flag where supported (#3454) 2023-02-06 19:53:48 +01:00
Xiaopeng Liandlixiaopeng.jetspark 24a904256e Add create_surface_from_surface_handle (#3225)
Co-authored-by: lixiaopeng.jetspark <lixiaopeng.jetspark@bytedance.com>
2023-01-19 11:16:11 -05:00
Elabajaba 81569dd6c3 Updated Dxc integration for DX12 backend (#3356)
Co-authored-by: unknown <alimilhim5@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/2722
closes https://github.com/gfx-rs/wgpu/pull/3147
2023-01-18 21:25:56 +00:00
Andreas Reich eaa87ba42c Force all adapters to report min buffer alignment of 32 (#3262) 2022-12-21 13:46:15 -05:00
Connor FitzgeraldandJim Blandy 5241633b3a Implement Presentation Timestamp Correlation (#3240)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00:00