Commit Graph
53 Commits
Author SHA1 Message Date
teoxoy 67b4f3c7e5 [wgpu] make vertex buffer slots optional 2026-04-14 17:20:15 -07:00
AliandErich Gubler 51faa6fd87 Implements #8875: Using binding_array should require an enable extension (#9298)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-04-11 04:52:44 +00:00
Erich Gubler da87026797 style: run prettier --write . 2026-03-25 12:46:54 -06:00
Kevin Reid 1148bac37c Convert comments on lint attributes to reasons. (#9292) 2026-03-24 18:58:52 +00:00
Andy Leiserson 81eca17db8 test(bench): Reset terminal color after report (#9272) 2026-03-20 18:12:04 +00:00
Marijn Suijten 35db26b2c6 Make HasDisplayHandle optional in WindowHandle (#8782) 2026-03-10 11:36:12 -04:00
Teodor Tanasoaia e114d2f0a7 Add support for gaps in bind group layouts & update relevant validation (#9034)
* [wgpu-core] add support for optional BG & BGL entries

* [wgpu] allow gaps in bind group layouts

And allow unbinding in the web backend.

* adapt tests

* add changelog entry

* [wgpu] remove generic from `PipelineLayoutDescriptor`
2026-02-25 19:47:36 +01:00
Inner Daemons 6bca1014b2 Various SPIR-V fixes for mesh shaders (#8756)
* Initial commit adding miscellaneous changes from msl-write and hlsl-write

* Same as previous commit

* Fixed divergence issue

* Removed some unnecessary barriers

* Zero init workgroup memory

* Added limits validation

* Added changelog

* Handled overflow, removed todo

* Lets see if this fixes llvmpipe

* Also this commit fixes llvmpipe maybe

* Unfortunate but not too unexpected at this point

* Updated feature to say to use ShaderRuntimeChecks::unchecked()

* Updated snapshots and took some changes from the hlsl writer

* Snapshots

* 2 quick tweaks

* Updated framework with suggestions by Connor in #8752

* Moved the task runtime limits into naga::back

* Fixed soem stuff

* Fixed checks: >= into >

* Cant believe I forgot this

* Removed code using u64 to check stuff

* Removed thing with limiting it to 2<<21

* Some more work

* Fixed compiles

* Added new field to spv options

* Updated some stuff to pass around the task runtime limits in more ways

* New PR started

* Did another quick fix

* Another quick fix

* Added changelog entry

* Added some explanation docs

* Fixed a warning

* Fixed shader

* Fixed some things & added docs

* Reverted dxc thing

* Fixed thing

* Refactored to TaskDispatchLimits

* Fixed compile error
2026-02-12 14:47:42 -05:00
Marijn Suijten 234ec66152 Allow optional RawDisplayHandle in InstanceDescriptor (#8012) 2025-12-23 14:53:04 -05:00
Connor Fitzgerald e52e8336b0 Bring immediate api in line with spec (#8724) 2025-12-16 13:13:09 +01:00
Connor Fitzgerald ca5e3f5ace Remove criterion from Cargo.toml 2025-12-03 11:29:56 -05:00
Connor Fitzgerald 5895de82b5 Rename push constants to immediates (#8586) 2025-12-01 15:20:02 +01:00
Connor Fitzgerald f91d9f385b Fix vscode issues on wasm32 (#8584) 2025-11-27 10:56:43 +01:00
Connor Fitzgerald 853ad6c464 Setup and use new benchmarking harness (#8511) 2025-11-18 20:28:21 +00:00
ad0f3111b7 Add multiview limits and tests (#8206)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Magnus <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-11-01 12:08:15 +00:00
Andreas Reich 333f811e9c Rework wgpu::PollType to only two enum variants (#8285) 2025-10-01 18:08:07 -04:00
MagnusandConnor Fitzgerald 54ce9f7f98 Update shader bencher to share some logic with snapshots (#8108)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-09-11 00:55:42 +00:00
Connor Fitzgerald 8d1f4bb5f2 Require token for experimental features (#8163) 2025-08-29 15:43:27 -04:00
renovate[bot] cf4a74c6b9 chore(deps): update deps and deny file 2025-07-18 13:02:48 -04:00
Connor Fitzgerald ff0de91ad7 Bump REPO_MSRV to 1.88 (#7960) 2025-07-17 13:00:40 -04:00
Andy Leiserson 82fa8e2a94 [naga] Remove non-essential override references via compaction
Adds a mode to compaction that removes unused functions, global
variables, and named types and overrides. This mode is used
everywhere except the compaction at the end of lowering, where
it is important to preserve unused items for type checking and
other validation of the module.

Pruning all but the active entry point and then compacting makes
`process_overrides` tolerant of missing values for overrides that are
not used by the active entry point.

Fixes #5885
2025-06-12 14:22:18 +09:00
Andy Leiserson a04085c5e4 Update naga benchmarks and add a compaction benchmark (#7715) 2025-05-30 15:02:05 -07:00
Andy Leiserson 850c3d4310 [naga] Write only the current entrypoint (#7626)
Changes the MSL and HLSL backends to support writing only a single entry
point, and uses them that way in wgpu-hal.

This is working towards a fix for #5885.

* Increase the limit in test_stack_size
2025-04-30 09:59:41 +02:00
teoxoy 5ecc48d494 add RenderPassColorAttachment::depth_slice 2025-04-25 12:39:45 +02:00
Kevin Reid 02700ab162 Move test and benchmark targets to standard Cargo autodiscovery layout. (#7436)
This will make it easier for contributors to understand the file layout,
at the cost of said layout containing several more nested directories.
I will personally appreciate not having to remember to look for
`root.rs` instead of `main.rs`.

I also renamed the test targets so that they do not *all* share the
superfluous suffix “-test” (test targets live in a different namespace
than other target types and packages, so the name can presume that it
is always known that they are tests).

The Naga snapshot data sets `naga/tests/{in,out}` have been left in
their original positions.
2025-03-31 21:17:05 -04: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
Kevin Reid 177205b3be Make lack of spirv-as non-fatal for testing. 2025-02-26 19:19:46 -05:00
Connor Fitzgerald 031ed26ac3 Rename bench's root benchmark to wgpu-benchmark 2025-02-24 11:53:24 -05:00
Connor Fitzgerald f44ecda16b Fix Execution of Benchmarks (#7190) 2025-02-21 11:43:50 -05:00
Connor Fitzgerald 7e119968ce Properly Deal with Timeouts (#7030) 2025-02-14 23:19:51 +00:00
Connor Fitzgerald 03a01df3cb Speed Up Benchmarks in Test (#7129) 2025-02-13 18:48:13 -05:00
Connor Fitzgerald 8caefceb8e Add rust-version to more crates (#7036) 2025-01-31 10:33:10 +01:00
Connor Fitzgerald 0f37714fb8 Separate Out Backend Options into Individual Structs (#6895) 2025-01-15 17:32:15 +00:00
Connor Fitzgerald 2cfea40acc Fix bind group initialization in benchmarks (#6916) 2025-01-14 23:02:05 +00:00
Connor Fitzgerald c71d67010f Fix Features when Depending on wgpu (#6915) 2025-01-14 18:19:43 +00:00
Erich Gubler d9cc72785b Use more Rust features allowed under REPO_MSRV (#6887)
* chore: remove `std::mem::*` imports now unnecessary with `REPO_MSRV`

`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](https://github.com/rust-lang/rust/pull/123168/).

* refactor(benches): s/once_cell::Lazy/std::sync::LazyLock

Weaken our dependence on the `once_cell` crate by using functionality
from `std` instead that was upstreamed from `once_cell`, this time with
what's available in Rust 1.80+.

It's not yet possible to eliminate this dependency entirely, but do what
we can with `REPO_MSRV` for now.

* chore: remove unnecessarily `allow`'d lint rules under `REPO_MSRV`

* chore: migrate easy `allow`s to `expect` under `REPO_MSRV`

Remove or `expect` clear-cut `allow` statements that were easy for me to
figure out.

* chore: `warn` on `clippy::allow_attributes` under `REPO_MSRV`
2025-01-10 22:06:26 +00:00
Connor Fitzgerald a8a91737b2 Switch Binding Arrays on Metal to Argument Buffers (#6751) 2025-01-07 16:00:56 -05:00
Andreas Reich fb210ab363 Pass InstanceDescriptor by reference and make it clonable (#6849) 2025-01-06 15:40:30 -05:00
Erich Gubler 809ea1d478 chore(benches): add tracy to lints.rust.unexpected_cfgs.check-cfg 2024-12-17 13:30:52 -05:00
Connor Fitzgerald 60f8535e12 Add Bind Group Creation Benchmark (#6725)
* Add Bind Group Creation Benchmark

* Mind the Limits
2024-12-16 04:14:04 -05:00
Andreas Reich e23146aa3e Avoid breaking change: set_bind_group now takes Into<Option<...>> rather than Option<...> (#6452) 2024-10-23 15:29:42 -04:00
Hamir Mahal 8e787eb70a style: simplify string formatting for readability (#6316) 2024-09-24 23:40:53 -04:00
Brad Werth 9b36a3e129 Make bind group an Option for set_bind_group calls. (#6216)
This is just an API change for all the "set_bind_group" calls. Calls
that pass a Some() argument should have unchanged behavior. The None
cases are left as TODOs.
2024-09-06 14:29:09 -07:00
Erich Gubler 0e352f5b34 Resolve lints for Rust 1.78-1.81 that can be preempted before upgrade (#6225)
* chore: remove `Context` methods detected as dead code

This is detected by `rustc` as of Rust 1.79.0.

* refactor: satisfy `clippy::manual_inspect`

Detected as of Rust 1.81.0.

* refactor: satisfy `clippy::needless_borrows_for_generic_args`

Detected as of Rust 1.81.0.

* refactor: suppress false-positive `dead_code` lint for `SubmissionIndex`

* chore: eliminate `dead_code` when `target_os = "emscripten"`
2024-09-06 11:55:22 +02:00
Nicolas Silva 86507f33cd Reduce the number of iterations in benchmarks to a small number when running on CI 2024-07-24 14:52:22 +02:00
Erich Gubler e216566e48 feat(shader)!: make ProgrammableStage::entry_point optional 2024-07-24 07:40:00 -04:00
Andreas Reich 9b680e6997 Undo doing less bench iterations under cfg(test) (#6021) 2024-07-24 08:56:14 +02:00
Connor Fitzgerald 3c3b532cf3 Remove latest_submission_index (#5976)
* Remove latest_submission_index

* CI

* Comments
2024-07-18 16:43:39 +00:00
Andreas Reich d3edbc57a9 Compute pass benchmark (#5767)
Adds a benchmark for compute pass recording, very similar to what we have for render passes.
2024-07-14 22:13:50 +02:00
Nicolas SilvaandAndreas Reich 4c6318c0d2 Expose gpu allocation configuration options (#5875)
* Expose gpu allocation configuration options

This commit adds hints to control memory allocations strategies to the configuration options. These hints allow for automatic profiles such as optimizing for performance (the default, makes sense for a game), optimizing for memory usage (typically more useful for a web browser or UI library) and specifying settings manually.

The details of gpu allocation are still in flux. The goal is to switch vulkan and metal to gpu_allocator which is currently used with d3d12. gpu_allocator will also likely receive more configuration options, in particular the ability to start with smaller memory block sizes and progressively grow the block size. So the manual settings already provision for this upcoming option. Another approach could be to wait and add the manual option after the dust settles.

The reason for providing presets and defining values in the backends is that I am convinced that optimal fonigurations should take hardware capabilities into consideration. It's a deep rabbithole, though, so that will be an exercise for later.

* changelog

* Update CHANGELOG.md

Co-authored-by: Andreas Reich <r_andreas2@web.de>

* Add a comment about not entirely knowing what we are doing

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-07-08 14:49:44 +02:00