Lucas Abel
b8c462ac31
[core] fix missing applies of DISCARD_HAL_LABELS ( #7991 )
2025-07-23 12:06:42 -04:00
Connor Fitzgerald
ff0de91ad7
Bump REPO_MSRV to 1.88 ( #7960 )
2025-07-17 13:00:40 -04:00
Connor Fitzgerald
1ed61877b5
Remove wgpu_core::hal_api::HalApi
2025-07-16 15:10:00 -04:00
Erich Gubler
7ff0bd784e
fix!: remove WebGpuError impl. for Request{Adapter,Device}Error
2025-06-30 10:58:56 -04:00
Erich Gubler
964c5bbf4c
feat(core): impl WebGpuError for API errors
2025-06-30 10:58:56 -04:00
Jim Blandy
9046b439d7
Add more logging to Instance::device_request_adapter. ( #7786 )
2025-06-11 08:36:15 +00:00
teoxoy
3b72d59a3c
make memory pressure detection optional and configurable
2025-04-22 09:21:27 +02:00
Bruce Mitchener
dde9422114
Fix build with profiling enabled ( #7509 )
2025-04-11 00:34:05 +00:00
Connor Fitzgerald
6a986f4bc4
Timestamp normalization
2025-04-03 10:35:20 -04:00
Erich Gubler
4db992a66d
refactor(core): avoid manually reimplemented sort_by_key ( #7366 )
2025-03-18 17:43:04 -04:00
Kevin Reid
fbe005f11a
Make request_adapter() report which backends were tried.
...
This will help users determine whether the problem is:
* a backend is not statically enabled
* a backend is not dynamically enabled
* no drivers or physical adapters are present for that backend
(further distinction would be useful here)
* no adapters met the required criteria
There are deficiencies in the reporting of WebGPU vs. WebGL support.
Those would best be fixed by also fixing the mutual exclusion of those
backends.
2025-03-14 11:45:49 +01:00
Kevin Reid
326ad03ce1
Move trace_dir/trace_path to a custom enum inside DeviceDescriptor.
...
This allows `wgpu` to not unconditionally depend on `std::path::Path`.
It’s also, in my opinion, more user-friendly, because the feature which
most users will not use (and is not currently functional) is now a
defaultable struct field instead of a required parameter.
The disadvantage is that `wgpu-types` now has to know about tracing.
2025-03-10 22:17:06 -04:00
Matilde Morrone
7eb69f43b6
Add DRM support to Vulkan backend ( #7212 )
...
* Add basic drm support to vulkan backend
* Move vulkan drm implementation to its own module
* Properly feature gate drm support and add safety docs
* Disable drm on wasm targets
* Remove old fixme comment from vulkan drm backend
* Move cfg check inside drm module
* Use expect instead of allow for create_surface_from_drm
* Document that drm is not available on apple platforms
2025-03-04 20:53:38 +00: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
Kevin Reid
118a985ccd
Allow creating Noop backend through the normal mechanisms.
2025-02-12 22:31:47 -05:00
Connor Fitzgerald
a1fc4a0316
Allow Short Circuting GL Fences ( #6942 )
2025-01-21 19:28:14 +00:00
@brodycj - C. Jonathan Brody and Connor Fitzgerald
beb33414c7
trace directory path updates ( #6924 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-16 14:50:15 +00:00
@brodycj - C. Jonathan Brody
623f143a82
Start using hashbrown ( #6925 )
2025-01-16 14:53:36 +01:00
Connor Fitzgerald
0f37714fb8
Separate Out Backend Options into Individual Structs ( #6895 )
2025-01-15 17:32:15 +00:00
18471d8e78
Image atomics support ( #6706 )
...
* Image atomics support
* Address feedback
* fix merge
* Fixes
* Add a couple tests
* Update wgpu-types/src/lib.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
* feedback
* feedback
* glsl
* glsl fix
* fix glsl
* fix fix
* fix fix fic
* fix?
* fix
---------
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
2025-01-13 15:37:12 +00:00
Andreas Reich
fb210ab363
Pass InstanceDescriptor by reference and make it clonable ( #6849 )
2025-01-06 15:40:30 -05:00
Andreas Reich
ed694eda89
Improve logging around surface creation ( #6511 )
...
* additional debug logging for request_adapter, demote some messages to debug
* unrelated log messages that annoyed me in Vulkan: debug utils disabled is now `debug`, it being enabled is `info`
* document compatible_surface requirement for WebGL directly on wgt::RequestAdapterOptions
* make adapterenumarge_adapters & request_adapters results info log again when api_log is enabled
2024-12-08 14:44:55 +01:00
atlv
0b6571a68d
Align Storage Access enums to spec ( #6642 )
2024-12-03 17:37:23 +01:00
atlv
d5253be7fd
rename TFFF::STORAGE_READ_WRITE to STORAGE_WRITE ( #6622 )
2024-12-01 23:26:47 -05:00
atlv
5e52a313b9
rename TFC::STORAGE to STORAGE_WRITE ( #6621 )
2024-12-01 16:53:27 -06:00
atlv
b75f46cfbe
fix typo ( #6591 )
2024-11-22 21:09:48 -05:00
Teodor Tanasoaia
1abf3fe90e
remove unused enum variants ( #6550 )
2024-11-15 14:25:18 +01:00
teoxoy
6c7dbba399
move PendingWrites into the Queue
...
The `Device` should not contain any `Arc`s to resources as that creates cycles (since all resources hold strong references to the `Device`).
Note that `PendingWrites` internally has `Arc`s to resources.
I think this change also makes more sense conceptually since most operations that use `PendingWrites` are on the `Queue`.
2024-11-14 06:27:37 -08:00
Andreas Reich
ae6c6fbea4
Fix Vulkan surface capabilities being advertised when its query failed. ( #6510 )
...
* distinguish `GetSurfaceSupportError` between backend unsupported and failing to get surface caps
* Fix vulkan backend returning invalid surface configuration
* changelog entry
2024-11-12 23:51:07 +01:00
cybersoulK
a8214b67f6
Fix missing binding in wgpu-core/src/instance.rs when profiling has a backend enabled ( #6422 )
2024-10-18 00:15:25 +00:00
teoxoy
3eb9c781cf
impl Drop for Surface
2024-10-14 13:24:44 +02:00
teoxoy
c38ed8d9fa
move surface creation methods on the Instance
2024-10-14 13:24:44 +02:00
teoxoy
de97e5449c
move enumerate_adapters on the Instance
2024-10-14 13:24:44 +02:00
teoxoy
4d55c6917e
make remaining Adapter methods public
2024-10-14 13:24:44 +02:00
teoxoy
d1c95d2bfd
add adapter getters
2024-10-14 13:24:44 +02:00
teoxoy
321bd64ba2
add Adapter::backend()
2024-10-14 13:24:44 +02:00
teoxoy
5627a0b6d9
move request_adapter on the Instance
2024-10-14 13:24:44 +02:00
teoxoy
40206ce4d7
add new Instance::as_hal fn
2024-10-14 13:24:44 +02:00
Teodor Tanasoaia
c8beade187
remove backend from ID ( #6263 )
2024-09-13 17:30:38 +02:00
teoxoy
c182d3f24f
[wgpu-core] rename .strict_unregister() & .strict_remove() to .remove()
2024-09-10 11:58:54 +02:00
teoxoy
ac74f36590
[wgpu-core] rename .strict_get() to .get()
2024-09-10 11:58:54 +02:00
teoxoy
aa280ecd44
[wgpu-core] change return type of device creation methods to be more rusty
...
This is fine from the WebGPU spec's perspective as device creation returns a promise that can reject.
2024-09-10 11:58:54 +02:00
teoxoy
da9afea271
[wgpu-core] use .strict_get() & .strict_unregister() for surfaces
...
This works because we never assign errors to surfaces (they are never invalid).
2024-09-10 11:58:54 +02:00
teoxoy
98426329a4
[wgpu-core] introduce Registry .strict_get() & .strict_unregister() and use them for adapters
...
This works because we never assign errors to adapters (they are never invalid).
2024-09-10 11:58:54 +02:00
teoxoy
eb47449eb9
invalidate the device when we encounter driver-induced device loss or on unexpected errors
2024-09-09 15:03:19 +02:00
Erich Gubler
754ead25ab
chore: resolve wgt::Backend::Empty raising unused_qualifications
2024-08-23 16:20:34 -04:00
Marijn Suijten
a157c3cf4b
[wgpu-hal] Migrate d3d12 backend over to windows-rs ( #5956 )
...
* windows-rs 0.58
* Clean up suspicious committed allocation workaround
* dx12: Flatten suballocation module
2024-08-20 11:48:37 -04:00
teoxoy
2c31414517
add an Unexpected variant to DeviceError
2024-08-15 13:56:05 +01:00
Andreas Reich
1bfe8845d5
ignore 'arc instead of rc' warnings on wasm
2024-08-14 17:34:11 +02:00
Andreas Reich
24498f04d4
The second unraveling: hub and all types on it are generic free!
...
gfx_select macros are empty husks now that are waiting to be removed
2024-08-14 17:34:11 +02:00