Commit Graph
341 Commits
Author SHA1 Message Date
teoxoy aa2b7907c0 [core] filter native-only features and limits if
`STRICT_WEBGPU_COMPLIANCE` is set
2026-07-01 14:43:44 -04:00
Stuart Parmenter cf2dbfd40f Add display HDR query (Surface::display_hdr_info): DX12, Vulkan, Metal, Web (#9739) 2026-06-29 18:13:31 -04:00
Luo Zhihao c841633bb3 Bring transient attachment in line with webgpu spec (#9568) 2026-06-18 18:28:52 -07:00
Andy Leiserson e55f061770 fix(core): Align limit when clamping at u32 for indirect validation (#9698) 2026-06-18 15:24:47 +02:00
teoxoy 6e8d0bd149 add tests for adapter_allowed 2026-06-03 23:36:32 +02:00
teoxoy 939776d5dc check that all limits are at least as high as default limits under
`STRICT_WEBGPU_COMPLIANCE`
2026-06-03 23:36:32 +02:00
teoxoy b61ddc1211 check alignment limits are powers of 2 2026-06-03 23:36:32 +02:00
teoxoy 6aa13649e4 filter out adapters with missing downlevel flags under
`STRICT_WEBGPU_COMPLIANCE`
2026-06-03 23:36:32 +02:00
Teoxoy bf1b57d47f [indirect-draw-validation] make sure we don't encounter u64 offsets in indirect draw validation 2026-06-03 22:43:37 +02:00
Jim Blandy bf8330c20b Make DRM support optional. (#9390) 2026-04-09 13:11:04 -07:00
Andy LeisersonandTeodor Tanasoaia 55b45559a7 feat(core): Limit bucketing
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2026-03-23 18:25:15 -07:00
Erich Gubler 70b8343e06 refactor(core): rename Instance::name to _name (#8957) 2026-03-11 17:29:08 +00:00
Marijn Suijten 35db26b2c6 Make HasDisplayHandle optional in WindowHandle (#8782) 2026-03-10 11:36:12 -04:00
Erich Gubler 9bc127f128 chore: update CORE_MSRV to 1.90 (#8943)
New cases for some Clippy lints pop up as part of this upgrade that
cannot be done before, listed below. Yuck!

- `clippy::manual_is_multiple_of`
- `clippy::missing_const_for_fn`
- `clippy::useless_nonzero_new_unchecked`
2026-01-27 19:37:10 -05:00
pinandErich Gubler 8ad8a820c6 Add basic NetBSD support (#8695)
* Add basic NetBSD support

  - closes https://github.com/gfx-rs/wgpu/issues/8541
  - replaces https://github.com/gfx-rs/wgpu/pull/8679

  ```
  Tests:
  Summary [ 149.522s] 469 tests run: 463 passed, 6 failed, 0 skipped
  FAIL [ 0.095s] naga::naga snapshots::convert_snapshots_spv
  FAIL [ 0.387s] wgpu-benchmark::bench/wgpu-benchmark Computepass Encoding
  FAIL [ 0.386s] wgpu-benchmark::bench/wgpu-benchmark Device::create_bind_group
  FAIL [ 0.378s] wgpu-benchmark::bench/wgpu-benchmark Device::create_buffer
  FAIL [ 0.389s] wgpu-benchmark::bench/wgpu-benchmark Renderpass Encoding
  FAIL [ 0.075s] wgpu-test::wgpu-validation api::instance::multi_instance::multi_instance
  ```

* Exclude Vulkan and DRM surface paths on NetBSD

  Match platform support and avoiding cfg mismatches between wgpu and wgpu-core.
(with help from LLM)

---------

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-01-26 16:27:57 +00:00
Marijn Suijten 234ec66152 Allow optional RawDisplayHandle in InstanceDescriptor (#8012) 2025-12-23 14:53:04 -05:00
Dzmitry Malyshau bff1f6d095 (Naga) Cooperative Matrix Support (#8251) 2025-12-22 13:14:57 -05:00
Teodor Tanasoaia 5c76751104 [d3d12] add support for optional adapter telemetry (#8576) 2025-12-16 12:34:29 -05:00
OpsticandConnor Fitzgerald f0209e3db8 Add support for transient textures on Vulkan and Metal (#8247)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-10-16 19:50:01 +00:00
Connor Fitzgerald 8d1f4bb5f2 Require token for experimental features (#8163) 2025-08-29 15:43:27 -04:00
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 BrodyandConnor 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