Commit Graph
470 Commits
Author SHA1 Message Date
Luo ZhihaoandErich Gubler a7e0298dc5 Validate LoadOp and StoreOp are None for attachments without corresponding depth or stencil aspect (#9567)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-05-29 11:28:50 -04:00
Andy Leiserson 61e76ee746 fix(core): Use more checked arithmetic, part 2b (#9425) 2026-04-16 14:27:01 +02:00
teoxoy c9c7359f5b deduplicate vertex buffer validation in is_ready 2026-04-14 17:20:15 -07:00
teoxoy a1b646243d converge on a single VertexState impl for both render passes and
render bundles

- render passes now defer setting vertex buffers to the start of a draw
  command (same as bundles)
- render bundles now cache vertex/instance limit calculations when
  setting the pipeline or when setting a vertex buffer (same as passes)
2026-04-14 17:20:15 -07:00
teoxoy 4bbed4074c add max_bind_groups_plus_vertex_buffers limit 2026-04-14 17:20:15 -07:00
teoxoy 2060683c29 make vertex buffer slots optional 2026-04-14 17:20:15 -07:00
atlv e6e5f5288c Bring immediate in line with webgpu spec (#9280) 2026-04-09 22:36:02 +00:00
Andy Leiserson acc5855e1f fix(core): Use more checked arithmetic, part 2 (#9363) 2026-04-09 15:21:20 -06:00
Inner DaemonsandAndreas Reich b5bd5aed7d Mesh shaders MSL writer (#8739)
* Single squashed commit

* Updated changelog

* Fixed stupid changelog thing

* If I have to do this one more fucking time I'm gonna lose it

* Removed some pub(super)'s

* Thing

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2026-04-07 17:26:22 +00:00
Elabajaba e8afd9a906 fix debug assertion not covering both parts of the debug statement (#9352) 2026-04-01 19:56:14 -06:00
Andy Leiserson 11db97cf1b fix(core): Use more checked arithmetic (#9357) 2026-04-01 15:23:21 -07:00
Kristoffer Søholm fd04edc0ac Fix bad debug_assert in dx12 indirect multi draw (#9332) 2026-03-31 13:46:25 -04:00
Andy Leiserson e14050d7db fix(core): Fix resource usage for R/O depth w/o TEXTURE_BINDING (#9346)
* fix(core): Fix resource usage for R/O depth w/o TEXTURE_BINDING

Fixes #9343

* Update test and waive failure

Related to #5231

* changelog
2026-03-31 17:02:11 +02:00
Andy Leiserson d152e7369b Reduce binary bloat from error vtables (#9149) 2026-03-04 08:52:24 -08:00
Andy Leiserson 3676e0e247 fix(core): Validate occlusion query set type in begin_render_pass (#9086) 2026-02-23 14:38:46 -08:00
Luo Zhihao c0f04c801c Validate strip_index_format equals index buffer format for indexed drawing with strip topology 2026-02-01 23:14:52 -08: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
Andy Leiserson 1481b23e55 Clean up imports/exports in wgpu_core::command (#8836) 2026-01-09 12:23:34 -08:00
952d653835 New mesh shader limits (#8507)
* Initial commit

* Other initial changes

* Updated shader snapshots

* Added new HLSL limitation

* Moved error to global variable error

* Added docs to per_primitive

* Added a little bit more docs here and there in IR

* Adding validation to ensure that task shaders have a task payload

* Updated spec to reflect the change to payload variables

* Updated the mesh shading spec because it was goofy

* some doc tweaks

* Tried to clarify docs a little

* Tried to update spec

* Removed a warning

* Addressed comment about docs mistake

* Review in progress

- Extensive revisions to `docs/api-specs/mesh_shading.md`.

- Doc comments.

- Ensure `Module` stays at the bottom of `ir/mod.rs`.

- Avoid a clone.

- Rename some arguments to be more specific.

- Minor readability tweaks.

* mesh_shading.md: more tweaks

* Ran cargo fmt

* Small tweaks

* [naga] Move definition of `ShaderStage::compute_like` to `proc`.

Move the definition of `naga::ShaderStage::compute_like` from
`naga::ir` into `naga::proc`. We generally want ot keep methods out of
`naga::ir`, since the IR itself is complicated enough already.

* Replace TODO comment with followup issue.

* Update analyzer.rs

Co-authored-by: Jim Blandy <jimb@red-bean.com>

* Removed stuff in accordance with Jim's recommendation

* minor changes for readability

* Pull mesh shader output type validation out into its own function.

* doc fixes

* remove duplicated task payload validation

* Quick little changes

* Another quick fix

* Quick fix

* Removed unnecessary TODO statement

* A

* Tried to be more expressive

* Made functions only work in mesh shader entry points

* Various validation fix attempts

* Undid capabilities resize

* WGSL PR is up :)

* Update naga/src/ir/mod.rs

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>

* Update naga/src/front/wgsl/error.rs

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>

* Update naga/src/ir/mod.rs

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>

* Other Erich suggestion

* Updated docs & validation for some builtins

* Added some docs & removed contentious "// TODO"

* Fixed bad validation, formatted mesh shader wgsl

* Rewrote the IR and parser significantly

* Improved validation slightly, remvoed obselete crap, fixed bug in compaction, made clippy happy

* Added changelog entry

* Made parser respect enable extension

* Updated mesh shader spec

* Cleaned up the mesh shader analyzer function

* Updated changelog

* Updated validation from spv-write

* Slight tweaks

* Added capabilitiy thing blah blah blah

* Fixed compaction & clean stuff up

* Fixed compaction and such pt 2

* Paved the way for primitive-index stuff

* Little bit of cleanup

* Added new features/capabilities for point primitives and added snapshots for stuff

* Updated spec to rename something

* Updated some limits stuff

* Made some improvements

* Fixed doctests & webgpu stuff

* Fixed experimental features stuff

* A little more scaffolding

* Added some initial validation

* Added per primitive validation

* Improved per primitive validation

* Added some more validation

* Fixed primitive index validation

* Updated the spec

* Updated comments on some limits

* Made some fixes

* Fixed new validation rule for task payload size

* Update wgpu-core/src/validation.rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Update wgpu-core/src/validation.rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* A small tweak to mesh shader recommended minimums

* Addressed 2 comments

* A few more comments addressed with limits

* Addressed more comments

* Update wgpu-core/src/validation.rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* Split up error

* Addressed another comment by changing workgroup size validation

* Final comment addressed

* Update wgpu-info/src/human.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update wgpu-core/src/validation.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update wgpu-info/src/human.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed compilation and added some new test functions

---------

Co-authored-by: SupaMaggie70Incorporated <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-17 05:13:27 +00:00
Connor Fitzgerald e52e8336b0 Bring immediate api in line with spec (#8724) 2025-12-16 13:13:09 +01:00
Andy Leiserson 422d539731 Add missing maxColorAttachmentBytesPerSample validation for render passes (#8697) 2025-12-09 13:32:57 -08:00
Teodor Tanasoaia d41e43bc60 [wgpu-core] validate occlusion and pipeline statistics queries end (#8684) 2025-12-08 18:42:26 +01:00
Connor Fitzgerald e3149bac9e LoadOp::DontCare (#8549) 2025-12-08 03:41:38 +00:00
Connor Fitzgerald a356cb2026 Update Repo MSRV to 1.91 (#8678) 2025-12-07 21:52:35 -05:00
Connor Fitzgerald 5895de82b5 Rename push constants to immediates (#8586) 2025-12-01 15:20:02 +01:00
Andy Leiserson 6043b059c4 Tweak error behavior for unbalanced passes, and update CTS (#8543) 2025-11-18 11:18:17 -05:00
Andy Leiserson 71820eef20 Fix performance regression in bind group processing (#8519) 2025-11-14 00:10:42 -05: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
Andy Leiserson e584f382e0 Store pointers instead of IDs when tracing (1/2)
This updates pass operations.

The trace player is temporarily broken.
2025-10-30 13:52:58 +01:00
Mikołaj Radkowski e7fcb94888 Make multi-planar textures renderable (#8307) 2025-10-29 13:33:48 -04:00
Andy Leiserson 3ca6a1c0df Defer some bind group processing until draw/dispatch
This allows us to save some work when a bind group is replaced,
although WebGPU still requires us to fail a submission if any
resource in any bind group that was ever referenced during
encoding is destroyed.

Fixes #8399
2025-10-23 14:59:25 +02:00
Andy Leiserson 7f644452f0 Check for attachment overlap using textures, not views (#8402) 2025-10-22 17:37:38 +02: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
Andy LeisersonandAndreas Reich 1967900565 Encode commands on finish (#8220)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-09-25 14:22:51 -04:00
Andy Leiserson 04a3401638 Extract command encoding to free functions (#8210) 2025-09-11 15:15:33 -04:00
Andy Leiserson d79a49a060 Rename commands to trace_commands 2025-09-11 10:20:03 -07:00
Andy Leiserson 718497356c Move enum Command from device::trace to command::encoder_command. 2025-09-11 10:20:03 -07:00
Andy Leiserson c0c16078e9 Rename and relocate ID resolution helpers 2025-09-11 10:20:03 -07:00
Andy Leiserson 885845087f Extract the parts of PassState that apply to the base encoder
And rename a few things.
2025-09-11 10:20:03 -07:00
Andy Leiserson a9638c8e3a Remove pending_query_resets from CommandBufferMutable (#8187)
It is emptied by `reset_queries` at the end of every render pass, so
it's just keeping an allocation alive, not holding any state. It seems
unlikely that there is sufficient performance gain from reusing the
memory allocation to justify the complexity of additional state at
higher layers.
2025-09-09 13:03:12 -04:00
Connor Fitzgerald 2ff46cd7cd Remove MULTI_DRAW_INDIRECT feature (#8162) 2025-08-28 12:00:14 -04:00
Lisitsa Nikita 1b948fbf42 Fix 'Read-only attachment with load' error message (#8068) 2025-08-09 17:58:32 +02:00
Andy Leiserson 910143d622 Check for more cases of unbalanced debug groups (#8048)
Fixes #3911
2025-08-05 16:52:50 +02:00
Andy Leiserson f25a79595a Add a missing condition to viewport validation (#8040) 2025-08-01 01:10:15 -04:00
SupaMaggie70Incorporated 074c0e7191 Add mesh shading api to wgpu & wgpu-core (#7345) 2025-07-24 20:58:56 -04:00
Lucas Abel b8c462ac31 [core] fix missing applies of DISCARD_HAL_LABELS (#7991) 2025-07-23 12:06:42 -04:00
teoxoy b8c5c4add4 rename cmd_buf to cmd_enc where appropriate 2025-07-22 16:19:18 +02:00
teoxoy 63f3df86c8 [wgpu-core] split command encoders from command buffers 2025-07-22 16:19:18 +02:00
Andy Leiserson c868142709 Validate vertex and index buffer alignment (#7929) 2025-07-11 14:43:03 -07:00
Kevin Reid da6ccd5516 Fix undeclared base in profiling scopes.
This would cause compilation to fail if profiling was enabled.
2025-07-10 14:42:08 -04:00