* [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`
* 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`
* 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
We always want to call newer methods if available, so there is no need
to store this in a variable if we can use the `available!` macro
directly at the usage site.
This is clearer than the check against `NSOperatingSystemVersion`, and
the `available!` allows being compiled away if the deployment target is
specified to be high enough.
The `available!` macro also allows checking against patch versions.
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`
To keep the diff smaller and easier to review, this uses a temporary
fork of `objc2-metal` and `objc2-quartz-core` whose methods use the
naming scheme of the `metal` crate.
One particular difficult part with this is that the `metal` crate has
several methods where the order of the arguments are swapped relative
to the corresponding Objective-C methods.
This includes most perilously the following, since these have both an
offset and an index argument, both of which are integers:
- `set_bytes`
- `set_vertex_bytes`
- `set_fragment_bytes`
- `set_buffer`
- `set_vertex_buffer`
- `set_fragment_buffer`
- `set_threadgroup_memory_length`
But also:
- `set_vertex_texture`
- `set_fragment_texture`
- `set_sampler_state`
- `set_vertex_sampler_state`
- `set_fragment_sampler_state`
Fixes#8846
Note that the CTS test in the issue is already enabled
(`webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:*`).
It seems the failure only appears on specific hardware/drivers.
* 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>