Commit Graph
762 Commits
Author SHA1 Message Date
Andy Leiserson b09a919c6a DepthStencilState validation fixes (#8840)
* Make `depth_compare` and `depth_write_enabled` optional

These fields are optional in the WebGPU API. Having them optional in the
wgpu API as well keeps validation logic centralized in wgpu-core.

Fixes #8830

* Remove `DepthStencilStateIdl`
2026-02-25 14:59:48 +01:00
Imbris 6d3a421c3c Document OpenGL support for timestamp queries (#9112) 2026-02-25 07:48:36 -05:00
Andy Leiserson 73624c9892 chore(deno): Implement is_fallback_adapter and validate feature level strings (#9043) 2026-02-23 11:10:43 -08:00
Inner Daemons fdd903e6e4 Add supported caps info to naga backends (#9068)
* Initial commit

* 3/5 done I think

* Updated naga bin to use new caps

* Made clippy shut up

* Tried to fix dota2 validation error

* HLSL list made, also formatted Cargo.toml

* Made stuff work with snapshots

* Added changelog and GLSL list

* Updated message
2026-02-23 06:44:20 -07:00
Erich Gubler 7705c84485 fix(d12): fix startup crash for shader models 6.8, 6.9 (#9083) 2026-02-21 04:37:22 +00:00
Inner Daemons 8f50bb9d98 Make passthrough shaders non-experimental (#9054)
* Refactored passthrough shaders

* Added a changelog entry
2026-02-18 12:29:50 -05: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
Inner Daemons 6503562948 Add a DX12 backend option to force a certain shader model (#8984) 2026-02-11 18:14:30 -05:00
Inner Daemons ed12b74168 Changed wgpu to default to static dxc when the feature is enabled (#8882) 2026-02-11 22:41:45 +00:00
Inner Daemons 7609ed99e5 Add draw_id builtin (#8883) 2026-02-11 20:47:29 +00:00
09f49b6f97 feat(gles): Add GlDebugFns option to disable OpenGL debug functions (#8931)
Co-authored-by: mobile-pusher-bot[bot] <127349242+mobile-pusher-bot[bot]@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2026-02-11 17:05:32 +01:00
Connor Fitzgerald 04746e747e Implement 3 part MSRV policy (#8999) 2026-02-08 17:04:36 -05:00
Luo Zhihao da5a61be7b Fix typo in doc of VertexFormat::Sint16 (#8988) 2026-02-03 11:39:34 -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
Inner Daemons fab57513ec Add metallib passthrough (#8886) 2026-01-30 13:52:05 -05:00
Andy Leiserson 735e8d2a40 Fix validation related to depth bias and frag_depth
* Depth bias is only supported with triangle topologies (fixes #6071)
* If the shader outputs `frag_depth`, the pipeline must have a depth
  attachment
2026-01-30 09:36:29 -08:00
Vecvec 8a37e0f56a [wgsl in and IR] naga ray tracing pipelines (#8570) 2026-01-29 14:18:56 -05:00
Timo KöstersandErich Gubler b93bab52bc feat: support blendable f32 textures on vulkan (#8963)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-01-29 17:07:22 +00:00
Timo Kösters db8270e3bc docs: clarify bytes_per_row requirement (#8959) 2026-01-28 23:03:33 +00: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
Inner DaemonsandErich Gubler 4d11f5f8de Made traces use .metal extension instead of .msl (#8880)
* Changed msl snapshots to use .metal extension

* Made traces use `.metal` extension instead of `.msl`

* Added changelog entry

---------

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-01-26 17:25:43 +00:00
Noah d0c9044e42 Limits doc: fix typo (#8914) 2026-01-22 21:52:59 -05:00
atlvandConnor Fitzgerald 4a3526a745 Add per-vertex attribute support to vulkan, spir-v and wgsl. (#8821)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-01-16 01:04:06 +00:00
Ivor Wanders 1a47bf8b82 Improve documentation for validation of the counts field in BindGroupLayoutEntry. (#8795) 2026-01-15 14:50:38 -05:00
atlv 993448ab2c Add Limits::or_worse_values_from (#8870) 2026-01-14 11:28:50 -08:00
Andy Leiserson cd7958561a Restore tracing support in wgpu
The loop/break changes in `play.rs` are reverting changes made in #4202.

Fixes #5974
2026-01-09 15:55:33 +01:00
Andy Leiserson 985da29bcf Add in-memory tracing and inline data in traces 2026-01-09 15:55:33 +01:00
Jan Hohenheim fe3c9a581a Fix weird comma (#8797) 2025-12-30 14:45:41 -05:00
Erich Gubler 6948a01d8c fix(core): remove max_inter_stage_shader_components validation 2025-12-23 16:09:17 -05:00
Erich Gubler 0fbfbf8aa4 feat(core)!: add Limits::max_inter_stage_shader_variables 2025-12-23 16:09:17 -05:00
Marijn Suijten 234ec66152 Allow optional RawDisplayHandle in InstanceDescriptor (#8012) 2025-12-23 14:53:04 -05:00
Kevin Reid 592736efa0 Expand query set documentation.
This is intended to provide all the information necessary to make use of
occlusion and timestamp queries, without needing to read example code or
the WebGPU spec.
2025-12-22 21:01:26 -05:00
Kevin Reid 70415d02c1 Replace docs.rs links in Features with link_to_wgpu_docs!. 2025-12-22 21:01:26 -05:00
Kevin Reid 022f041292 Markdown fixes. 2025-12-22 21:01:26 -05:00
Dzmitry Malyshau bff1f6d095 (Naga) Cooperative Matrix Support (#8251) 2025-12-22 13:14:57 -05:00
Inner Daemons fa8afdf3e0 Fix mesh task workgroup limit on nvidia (#8754) 2025-12-17 19:59:02 -05: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
703c7d274d Naga mesh shader SPIR-V writer (#8456)
Co-authored-by: Inner Daemons <magnus.larsson.mn@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-12-16 23:33:15 -05:00
Connor Fitzgerald e52e8336b0 Bring immediate api in line with spec (#8724) 2025-12-16 13:13:09 +01:00
Andy Leiserson 4a91c7fc6c Ensure the limit for storage binding size honors alignment (#8719) 2025-12-15 12:42:17 -05: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
Layl 21e6143ed0 Add MULTISAMPLE_ARRAY feature flag. (#8571) 2025-12-05 18:31:05 +01:00
Connor FitzgeraldandJMS55 9a41de4e96 Move subgroup size info to AdapterInfo (#8609)
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2025-12-04 17:01:56 +00:00
Kevin Reid 2ca7ed99ba Break up wgpu-types/src/lib.rs into more files. (#8607) 2025-12-01 14:27:45 -05:00
Connor Fitzgerald 5895de82b5 Rename push constants to immediates (#8586) 2025-12-01 15:20:02 +01:00
Connor Fitzgerald babd6940d9 Revert "Lower blas_max_primitve_count (#8446)"
This reverts commit f314b1611a.
2025-11-27 10:56:10 +01:00
Connor Fitzgerald dc01e6e213 Normalize logging levels (#8579) 2025-11-27 10:55:02 +01:00
Kevin Reid fa4c8e8198 Make links from wgpu-types to wgpu work in docs.rs.
As a bonus, the macro now allows defining such links while writing the
item name only once instead of twice.
2025-11-26 20:15:53 -05:00
Inner DaemonsandAndreas Reich 05369a6b83 Multiview on DX12 (#8495)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-11-16 17:46:52 +01:00