Jim Blandy
badcaee6e3
[naga] Make BlockContext::resolve_pointer_type
infallible.
...
Since `BlockContext::resolve_pointer_type` never returns an error,
change its result type from a `Result` to a `&TypeInner`. Adjust
callers accordingly.
Remove calls (well, there's only one) to `resolve_pointer_type`
entirely when the caller does not need the value, since
`resolve_pointer_type` is now infallible and has no side effects.
2024-06-03 11:30:28 +02:00
Jim Blandy
049db89039
[naga] Remove ExpressionError::DoesntExist
.
...
Remove `valid::expression::ExpressionError::DoesntExist`. This error is reported
when expression validation encounters an invalid `Handle<Expression>`, but we
have already verified that the module is free of invalid handles in
`Validator::validate_module_handles`, so this condition should never arise.
2024-06-03 11:30:28 +02:00
Jim Blandy
91e4be314c
[naga doc] Fix broken links in Naga bitflags
types.
...
Fix links in documentation for types defined using the `bitflags!` macro.
As described in [bitflags#407], for some reason, `cargo doc` doesn't
check for broken links in documentation for types or members defined
using `bitflags::bitflags!`.
[bitflags#407]: https://github.com/bitflags/bitflags/issues/407
2024-06-03 10:26:47 +02:00
dependabot[bot]
dd86dcf8f8
build(deps): bump the patch-updates group with 19 updates ( #5770 )
...
Bumps the patch-updates group with 19 updates:
| Package | From | To |
| --- | --- | --- |
| [parking_lot](https://github.com/Amanieu/parking_lot ) | `0.12.2` | `0.12.3` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.202` | `1.0.203` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.37.0` | `1.38.0` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.65` | `2.0.66` |
| [backtrace](https://github.com/rust-lang/backtrace-rs ) | `0.3.71` | `0.3.72` |
| [bytemuck_derive](https://github.com/Lokathor/bytemuck ) | `1.6.0` | `1.7.0` |
| [crc32fast](https://github.com/srijs/rust-crc32fast ) | `1.4.0` | `1.4.2` |
| [deno_unsync](https://github.com/denoland/deno_unsync ) | `0.3.3` | `0.3.4` |
| [gimli](https://github.com/gimli-rs/gimli ) | `0.28.1` | `0.29.0` |
| [objc-sys](https://github.com/madsmtm/objc2 ) | `0.3.3` | `0.3.5` |
| [object](https://github.com/gimli-rs/object ) | `0.32.2` | `0.35.0` |
| [plotters](https://github.com/plotters-rs/plotters ) | `0.3.5` | `0.3.6` |
| [plotters-backend](https://github.com/plotters-rs/plotters ) | `0.3.5` | `0.3.6` |
| [plotters-svg](https://github.com/plotters-rs/plotters ) | `0.3.5` | `0.3.6` |
| [polling](https://github.com/smol-rs/polling ) | `3.7.0` | `3.7.1` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.83` | `1.0.85` |
| [serde_derive](https://github.com/serde-rs/serde ) | `1.0.202` | `1.0.203` |
| [tokio-macros](https://github.com/tokio-rs/tokio ) | `2.2.0` | `2.3.0` |
| [wayland-backend](https://github.com/smithay/wayland-rs ) | `0.3.3` | `0.3.4` |
Updates `parking_lot` from 0.12.2 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.2...0.12.3 )
Updates `serde` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203 )
Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0 )
Updates `syn` from 2.0.65 to 2.0.66
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.65...2.0.66 )
Updates `backtrace` from 0.3.71 to 0.3.72
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases )
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.71...0.3.72 )
Updates `bytemuck_derive` from 1.6.0 to 1.7.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/bytemuck_derive-v1.6.0...bytemuck_derive-v1.7.0 )
Updates `crc32fast` from 1.4.0 to 1.4.2
- [Commits](https://github.com/srijs/rust-crc32fast/compare/v1.4.0...v1.4.2 )
Updates `deno_unsync` from 0.3.3 to 0.3.4
- [Commits](https://github.com/denoland/deno_unsync/commits )
Updates `gimli` from 0.28.1 to 0.29.0
- [Changelog](https://github.com/gimli-rs/gimli/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gimli-rs/gimli/compare/0.28.1...0.29.0 )
Updates `objc-sys` from 0.3.3 to 0.3.5
- [Commits](https://github.com/madsmtm/objc2/compare/objc-sys-0.3.3...objc-sys-0.3.5 )
Updates `object` from 0.32.2 to 0.35.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gimli-rs/object/compare/0.32.2...0.35.0 )
Updates `plotters` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md )
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6 )
Updates `plotters-backend` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md )
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6 )
Updates `plotters-svg` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md )
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6 )
Updates `polling` from 3.7.0 to 3.7.1
- [Release notes](https://github.com/smol-rs/polling/releases )
- [Changelog](https://github.com/smol-rs/polling/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/polling/compare/v3.7.0...v3.7.1 )
Updates `proc-macro2` from 1.0.83 to 1.0.85
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.83...1.0.85 )
Updates `serde_derive` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203 )
Updates `tokio-macros` from 2.2.0 to 2.3.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-macros-2.2.0...tokio-macros-2.3.0 )
Updates `wayland-backend` from 0.3.3 to 0.3.4
- [Release notes](https://github.com/smithay/wayland-rs/releases )
- [Changelog](https://github.com/Smithay/wayland-rs/blob/master/historical_changelog.md )
- [Commits](https://github.com/smithay/wayland-rs/commits )
---
updated-dependencies:
- dependency-name: parking_lot
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: backtrace
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: bytemuck_derive
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: crc32fast
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: deno_unsync
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: gimli
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: objc-sys
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: object
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: plotters
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: plotters-backend
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: plotters-svg
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: polling
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: proc-macro2
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: serde_derive
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: tokio-macros
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: wayland-backend
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 09:20:29 +02:00
Brad Werth
9b7a965667
Add an experimental vertex pulling flag to Metal pipelines.
...
This proves a flag in msl::PipelineOptions that attempts to write all
Metal vertex entry points to use a vertex pulling technique. It does
this by:
1) Forcing the _buffer_sizes structure to be generated for all vertex
entry points. The structure has additional buffer_size members that
contain the byte sizes of the vertex buffers.
2) Adding new args to vertex entry points for the vertex id and/or
the instance id and for the bound buffers. If there is an existing
@builtin(vertex_index) or @builtin(instance_index) param, then no
duplicate arg is created.
3) Adding code at the beginning of the function for vertex entry points
to compare the vertex id or instance id against the lengths of all the
bound buffers, and force an early-exit if the bounds are violated.
4) Extracting the raw bytes from the vertex buffer(s) and unpacking
those bytes into the bound attributes with the expected types.
5) Replacing the varyings input and instead using the unpacked
attributes to fill any structs-as-args that are rebuilt in the entry
point.
A new naga test is added which exercises this flag and demonstrates the
effect of the transform. The msl generated by this test passes
validation.
Eventually this transformation will be the default, always-on behavior
for Metal pipelines, though the flag may remain so that naga
translation tests can be run with and without the tranformation.
2024-05-30 13:08:59 +02:00
Schell Carl Scivally
480d4dbd73
spv-in parsing Op::AtomicIIncrement ( #5702 )
...
Parse spirv::Op::AtomicIIncrement, add atomic_i_increment test.
2024-05-30 04:39:32 +00:00
Jim Blandy
89a0ebfbd6
[naga] Test CallResult
and AtomicResult
population.
...
Add tests to ensure that validation checks that `CallResult` and
`AtomicResult` expressions actually have their values provided by
`Call` and `Atomic` statements, and not `Emit` statements.
2024-05-28 09:17:16 +02:00
Jim Blandy
59cd0e964b
[naga] Validate CallResult
and AtomicResult
population.
...
Validate that `CallResult` and `AtomicResult` expressions actually
have their values provided by `Call` and `Atomic` statements, and not
`Emit` statements.
Fixes #5740 .
2024-05-28 09:17:16 +02:00
dependabot[bot]
d9c054c645
build(deps): bump the patch-updates group with 19 updates ( #5720 )
...
Bumps the patch-updates group with 19 updates:
| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.83` | `1.0.86` |
| [bytemuck](https://github.com/Lokathor/bytemuck ) | `1.15.0` | `1.16.0` |
| [libc](https://github.com/rust-lang/libc ) | `0.2.154` | `0.2.155` |
| [raw-window-handle](https://github.com/rust-windowing/raw-window-handle ) | `0.6.1` | `0.6.2` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.201` | `1.0.202` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.60` | `1.0.61` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.63` | `2.0.65` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.0.97` | `1.0.98` |
| [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam ) | `0.8.19` | `0.8.20` |
| [either](https://github.com/rayon-rs/either ) | `1.11.0` | `1.12.0` |
| [instant](https://github.com/sebcrozet/instant ) | `0.1.12` | `0.1.13` |
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys ) | `0.4.13` | `0.4.14` |
| [miniz_oxide](https://github.com/Frommi/miniz_oxide ) | `0.7.2` | `0.7.3` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.82` | `1.0.83` |
| [rustversion](https://github.com/dtolnay/rustversion ) | `1.0.16` | `1.0.17` |
| [serde_derive](https://github.com/serde-rs/serde ) | `1.0.201` | `1.0.202` |
| [smol_str](https://github.com/rust-analyzer/smol_str ) | `0.2.1` | `0.2.2` |
| [thiserror-impl](https://github.com/dtolnay/thiserror ) | `1.0.60` | `1.0.61` |
| [toml_datetime](https://github.com/toml-rs/toml ) | `0.6.5` | `0.6.6` |
Updates `anyhow` from 1.0.83 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.83...1.0.86 )
Updates `bytemuck` from 1.15.0 to 1.16.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.15.0...v1.16.0 )
Updates `libc` from 0.2.154 to 0.2.155
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.154...0.2.155 )
Updates `raw-window-handle` from 0.6.1 to 0.6.2
- [Release notes](https://github.com/rust-windowing/raw-window-handle/releases )
- [Changelog](https://github.com/rust-windowing/raw-window-handle/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/raw-window-handle/compare/v0.6.1...v0.6.2 )
Updates `serde` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202 )
Updates `thiserror` from 1.0.60 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.60...1.0.61 )
Updates `syn` from 2.0.63 to 2.0.65
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.63...2.0.65 )
Updates `cc` from 1.0.97 to 1.0.98
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.97...1.0.98 )
Updates `crossbeam-utils` from 0.8.19 to 0.8.20
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.19...crossbeam-utils-0.8.20 )
Updates `either` from 1.11.0 to 1.12.0
- [Commits](https://github.com/rayon-rs/either/compare/1.11.0...1.12.0 )
Updates `instant` from 0.1.12 to 0.1.13
- [Changelog](https://github.com/sebcrozet/instant/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sebcrozet/instant/commits )
Updates `linux-raw-sys` from 0.4.13 to 0.4.14
- [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.13...v0.4.14 )
Updates `miniz_oxide` from 0.7.2 to 0.7.3
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.7.2...0.7.3 )
Updates `proc-macro2` from 1.0.82 to 1.0.83
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.82...1.0.83 )
Updates `rustversion` from 1.0.16 to 1.0.17
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.16...1.0.17 )
Updates `serde_derive` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202 )
Updates `smol_str` from 0.2.1 to 0.2.2
- [Commits](https://github.com/rust-analyzer/smol_str/commits/v0.2.2 )
Updates `thiserror-impl` from 1.0.60 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.60...1.0.61 )
Updates `toml_datetime` from 0.6.5 to 0.6.6
- [Commits](https://github.com/toml-rs/toml/compare/toml_datetime-v0.6.5...toml_datetime-v0.6.6 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: raw-window-handle
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: crossbeam-utils
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: either
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: instant
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: linux-raw-sys
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: miniz_oxide
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: proc-macro2
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: rustversion
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: serde_derive
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: smol_str
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror-impl
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: toml_datetime
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-26 18:34:50 +02:00
Jim Blandy
aaefc7c10d
[naga] Fix cargo doc --document-private-items
. Add to CI.
2024-05-24 10:38:06 +02:00
Jim Blandy
b898cdf908
[naga spv-in] Doc fix: Parser
-> Frontend
...
Fix documentation left unchanged when `Parser` was renamed to
`Frontend`.
2024-05-23 12:59:11 +02:00
Jim Blandy
7fc7f58280
[naga spv-in] Delete misplaced, outdated comment.
...
This comment had become misplaced - it belongs on
`lookup_sampled_image` - but also, that table is no longer "storing
flags on how they are used". So the name of the field and type are
probably documentation enough.
2024-05-22 08:38:31 +02:00
Connor Fitzgerald
eeb1a9d7b7
Add Benchmarks ( #5694 )
2024-05-16 09:05:41 -04:00
Vladislav
00456cfb37
Add parsing support for un/pack4xI/U8
2024-05-14 17:57:04 +02:00
teoxoy
66d7387f0d
[msl] refactor chain of if blocks to match
2024-05-14 17:57:04 +02:00
Erich Gubler
ca91744955
chore: apply unused_qualifications
lint via cargo +1.78.0 fix && cargo fmt
2024-05-13 10:10:54 -04:00
Erich Gubler
bfe96d87b2
chore(spv): remove unused MergeInstruction
2024-05-13 10:10:54 -04:00
Erich Gubler
78a208b005
chore: satisfy clippy::empty_docs
2024-05-13 10:10:54 -04:00
Erich Gubler
b4193d50db
chore: satisfy clippy::multiple_bound_locations
2024-05-13 10:10:54 -04:00
bjorn3
fa48562229
Avoid introducing spurious features for optional dependencies ( #5691 )
...
* Avoid introducing spurious features for optional dependencies
If a feature depends on an optional dependency without using the dep:
prefix, a feature with the same name as the optional dependency is
introduced. This feature almost certainly won't have any effect when
enabled other than increasing compile times and polutes the feature list
shown by cargo add. Consistently use dep: for all optional dependencies
to avoid this problem.
* Add changelog entry
2024-05-12 08:45:35 +02:00
bjorn3
ebbf901304
Remove unused num-traits dependency of naga ( #5689 )
2024-05-11 16:26:49 -04:00
dependabot[bot]
f4b8b15df3
build(deps): bump the patch-updates group across 1 directory with 26 updates ( #5673 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-05-09 14:26:38 -04:00
stefnotch
f874ed061c
Add get_compilation_info ( #5410 )
...
* Add get_compilation_info API
* Rename glsl ParseError to ParseErrors
* Document ParseError label order
* Update line_position to count UTF-8 bytes
2024-04-29 11:35:36 +02:00
Connor Fitzgerald
4521502da6
Release v0.20.0 ( #5619 )
2024-04-28 18:06:35 -04:00
Erich Gubler
e8e33ede11
refactor(naga): remove extraneous leading path qualifiers ( #5612 )
...
Implemented by `cargo fix -p naga --lib`.
2024-04-28 16:33:13 +02:00
teoxoy
55c9d69ba0
[naga] fix the way we adjust constant initializers when processing overrides
...
This fixes 2 issues:
- we used to index `adjusted_global_expressions` with the handle index of the constant instead of its initializer
- we used to adjust the initializer multiple times if the arena contained multiple `Expression::Constant`s pointing to the same constant
2024-04-25 11:04:09 -07:00
vero
18ceb5183c
[spv-out] Move request_type_capabilities
outside of LocalType
lookup
2024-04-25 11:17:23 +02:00
Imbris
82fa580152
[hlsl-out] Fix accesses on zero value expressions ( #5587 )
2024-04-24 10:40:08 +02:00
dependabot[bot]
0d9e11d465
build(deps): bump the patch-updates group across 1 directory with 7 updates ( #5584 )
...
Bumps the patch-updates group with 6 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [raw-window-handle](https://github.com/rust-windowing/raw-window-handle ) | `0.6.0` | `0.6.1` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.58` | `1.0.59` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.0.94` | `1.0.95` |
| [jobserver](https://github.com/rust-lang/jobserver-rs ) | `0.1.30` | `0.1.31` |
| [rustix](https://github.com/bytecodealliance/rustix ) | `0.38.32` | `0.38.33` |
| [signal-hook-registry](https://github.com/vorner/signal-hook ) | `1.4.1` | `1.4.2` |
Updates `raw-window-handle` from 0.6.0 to 0.6.1
- [Release notes](https://github.com/rust-windowing/raw-window-handle/releases )
- [Changelog](https://github.com/rust-windowing/raw-window-handle/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/raw-window-handle/compare/v0.6.0...v0.6.1 )
Updates `thiserror` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59 )
Updates `cc` from 1.0.94 to 1.0.95
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.94...1.0.95 )
Updates `jobserver` from 0.1.30 to 0.1.31
- [Commits](https://github.com/rust-lang/jobserver-rs/commits )
Updates `rustix` from 0.38.32 to 0.38.33
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.32...v0.38.33 )
Updates `signal-hook-registry` from 1.4.1 to 1.4.2
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md )
- [Commits](https://github.com/vorner/signal-hook/compare/registry-v1.4.1...registry-v1.4.2 )
Updates `thiserror-impl` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59 )
---
updated-dependencies:
- dependency-name: raw-window-handle
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: jobserver
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: rustix
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: signal-hook-registry
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror-impl
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 19:49:16 +02:00
teoxoy
c2e520c52c
[naga] add Expression::Override
to needs_pre_emit
2024-04-22 08:38:31 -07:00
teoxoy
ca729cc607
Introduce HashableLiteral
...
The only reason `Literal` had to implement `Eq` and `Hash` was due to the SPV backend having to cache those in a `HashMap`.
The `PartialEq` impl was error prone due to the match not being exhaustive.
2024-04-18 12:26:24 -07:00
Teodor Tanasoaia
d08a069573
Fix vectors being unconditionally host shareable ( #5556 )
2024-04-18 10:02:18 -04:00
vero
4e77762a32
Refactor MSL atomic writing ( #5533 )
2024-04-18 12:23:45 +02:00
vero
163ffa6d63
Refactor WGSL atomic writing ( #5534 )
2024-04-18 10:57:35 +02:00
dependabot[bot]
1735968969
build(deps): bump the patch-updates group with 23 updates ( #5550 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 20:14:55 -04:00
Alexander Meißner
ea77d5674d
Subgroup Operations ( #5301 )
...
Co-authored-by: Jacob Hughes <j@distanthills.org>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: atlas dostal <rodol@rivalrebels.com>
2024-04-17 15:25:52 -04:00
vero
c6efbef8a6
Make scalar_width
return size in bytes ( #5532 )
2024-04-15 20:05:42 +02:00
teoxoy
9df68197a4
[spv-in] add support for specialization constants
2024-04-11 09:46:55 -07:00
Andreas Reich
82dead09e4
Bump wgpu-core/hal/types & naga versions to match latest released patch versions ( #5404 )
2024-04-09 00:33:43 -04:00
dependabot[bot]
73738afa82
build(deps): bump the patch-updates group with 35 updates ( #5507 )
...
Bumps the patch-updates group with 35 updates:
| Package | From | To |
| --- | --- | --- |
| [bitflags](https://github.com/bitflags/bitflags ) | `2.4.2` | `2.5.0` |
| [futures-lite](https://github.com/smol-rs/futures-lite ) | `2.2.0` | `2.3.0` |
| [getrandom](https://github.com/rust-random/getrandom ) | `0.2.12` | `0.2.13` |
| [glam](https://github.com/bitshifter/glam-rs ) | `0.25.0` | `0.27.0` |
| [heck](https://github.com/withoutboats/heck ) | `0.4.1` | `0.5.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.114` | `1.0.115` |
| [smallvec](https://github.com/servo/rust-smallvec ) | `1.13.1` | `1.13.2` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.36.0` | `1.37.0` |
| [indexmap](https://github.com/indexmap-rs/indexmap ) | `2.2.5` | `2.2.6` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.52` | `2.0.58` |
| [ab_glyph](https://github.com/alexheretic/ab-glyph ) | `0.2.23` | `0.2.24` |
| [aho-corasick](https://github.com/BurntSushi/aho-corasick ) | `1.1.2` | `1.1.3` |
| [async-trait](https://github.com/dtolnay/async-trait ) | `0.1.77` | `0.1.79` |
| [autocfg](https://github.com/cuviper/autocfg ) | `1.1.0` | `1.2.0` |
| [backtrace](https://github.com/rust-lang/backtrace-rs ) | `0.3.69` | `0.3.71` |
| [bytes](https://github.com/tokio-rs/bytes ) | `1.5.0` | `1.6.0` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.0.90` | `1.0.91` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.2` | `4.5.4` |
| [clap_derive](https://github.com/clap-rs/clap ) | `4.5.0` | `4.5.4` |
| [downcast-rs](https://github.com/marcianx/downcast-rs ) | `1.2.0` | `1.2.1` |
| [fastrand](https://github.com/smol-rs/fastrand ) | `2.0.1` | `2.0.2` |
| [half](https://github.com/starkat99/half-rs ) | `2.4.0` | `2.4.1` |
| [itoa](https://github.com/dtolnay/itoa ) | `1.0.10` | `1.0.11` |
| [memchr](https://github.com/BurntSushi/memchr ) | `2.7.1` | `2.7.2` |
| [pin-project-lite](https://github.com/taiki-e/pin-project-lite ) | `0.2.13` | `0.2.14` |
| [polling](https://github.com/smol-rs/polling ) | `3.5.0` | `3.6.0` |
| [rayon](https://github.com/rayon-rs/rayon ) | `1.9.0` | `1.10.0` |
| [regex](https://github.com/rust-lang/regex ) | `1.10.3` | `1.10.4` |
| [regex-syntax](https://github.com/rust-lang/regex ) | `0.8.2` | `0.8.3` |
| [rustix](https://github.com/bytecodealliance/rustix ) | `0.38.31` | `0.38.32` |
| [rustversion](https://github.com/dtolnay/rustversion ) | `1.0.14` | `1.0.15` |
| [uuid](https://github.com/uuid-rs/uuid ) | `1.7.0` | `1.8.0` |
| [widestring](https://github.com/starkat99/widestring-rs ) | `1.0.2` | `1.1.0` |
| [xml-rs](https://github.com/kornelski/xml-rs ) | `0.8.19` | `0.8.20` |
Updates `bitflags` from 2.4.2 to 2.5.0
- [Release notes](https://github.com/bitflags/bitflags/releases )
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md )
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0 )
Updates `futures-lite` from 2.2.0 to 2.3.0
- [Release notes](https://github.com/smol-rs/futures-lite/releases )
- [Changelog](https://github.com/smol-rs/futures-lite/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/futures-lite/compare/v2.2.0...v2.3.0 )
Updates `getrandom` from 0.2.12 to 0.2.13
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.13 )
Updates `heck` from 0.4.1 to 0.5.0
- [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md )
- [Commits](https://github.com/withoutboats/heck/commits )
Updates `serde_json` from 1.0.114 to 1.0.115
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115 )
Updates `smallvec` from 1.13.1 to 1.13.2
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.13.1...v1.13.2 )
Updates `tokio` from 1.36.0 to 1.37.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.36.0...tokio-1.37.0 )
Updates `indexmap` from 2.2.5 to 2.2.6
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.5...2.2.6 )
Updates `syn` from 2.0.52 to 2.0.58
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.52...2.0.58 )
Updates `ab_glyph` from 0.2.23 to 0.2.24
- [Release notes](https://github.com/alexheretic/ab-glyph/releases )
- [Commits](https://github.com/alexheretic/ab-glyph/compare/ab-glyph-0.2.23...ab-glyph-0.2.24 )
Updates `aho-corasick` from 1.1.2 to 1.1.3
- [Commits](https://github.com/BurntSushi/aho-corasick/compare/1.1.2...1.1.3 )
Updates `async-trait` from 0.1.77 to 0.1.79
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.77...0.1.79 )
Updates `autocfg` from 1.1.0 to 1.2.0
- [Commits](https://github.com/cuviper/autocfg/compare/1.1.0...1.2.0 )
Updates `backtrace` from 0.3.69 to 0.3.71
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases )
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.69...0.3.71 )
Updates `bytes` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/tokio-rs/bytes/releases )
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.5.0...v1.6.0 )
Updates `cc` from 1.0.90 to 1.0.91
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.90...1.0.91 )
Updates `clap` from 4.5.2 to 4.5.4
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.2...v4.5.4 )
Updates `clap_derive` from 4.5.0 to 4.5.4
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.0...v4.5.4 )
Updates `downcast-rs` from 1.2.0 to 1.2.1
- [Changelog](https://github.com/marcianx/downcast-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/marcianx/downcast-rs/compare/v1.2.0...v1.2.1 )
Updates `fastrand` from 2.0.1 to 2.0.2
- [Release notes](https://github.com/smol-rs/fastrand/releases )
- [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/fastrand/compare/v2.0.1...v2.0.2 )
Updates `half` from 2.4.0 to 2.4.1
- [Release notes](https://github.com/starkat99/half-rs/releases )
- [Changelog](https://github.com/starkat99/half-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/starkat99/half-rs/compare/v2.4.0...v2.4.1 )
Updates `itoa` from 1.0.10 to 1.0.11
- [Release notes](https://github.com/dtolnay/itoa/releases )
- [Commits](https://github.com/dtolnay/itoa/compare/1.0.10...1.0.11 )
Updates `memchr` from 2.7.1 to 2.7.2
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.1...2.7.2 )
Updates `pin-project-lite` from 0.2.13 to 0.2.14
- [Release notes](https://github.com/taiki-e/pin-project-lite/releases )
- [Changelog](https://github.com/taiki-e/pin-project-lite/blob/main/CHANGELOG.md )
- [Commits](https://github.com/taiki-e/pin-project-lite/compare/v0.2.13...v0.2.14 )
Updates `polling` from 3.5.0 to 3.6.0
- [Release notes](https://github.com/smol-rs/polling/releases )
- [Changelog](https://github.com/smol-rs/polling/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/polling/compare/v3.5.0...v3.6.0 )
Updates `rayon` from 1.9.0 to 1.10.0
- [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md )
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.9.0...rayon-core-v1.10.0 )
Updates `regex` from 1.10.3 to 1.10.4
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4 )
Updates `regex-syntax` from 0.8.2 to 0.8.3
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.8.2...regex-syntax-0.8.3 )
Updates `rustix` from 0.38.31 to 0.38.32
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.31...v0.38.32 )
Updates `rustversion` from 1.0.14 to 1.0.15
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.14...1.0.15 )
Updates `uuid` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/uuid-rs/uuid/releases )
- [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0 )
Updates `widestring` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/starkat99/widestring-rs/releases )
- [Changelog](https://github.com/starkat99/widestring-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/starkat99/widestring-rs/compare/v1.0.2...v1.1.0 )
Updates `xml-rs` from 0.8.19 to 0.8.20
- [Changelog](https://github.com/kornelski/xml-rs/blob/main/Changelog.md )
- [Commits](https://github.com/kornelski/xml-rs/compare/0.8.19...0.8.20 )
---
updated-dependencies:
- dependency-name: bitflags
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: futures-lite
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: getrandom
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: heck
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: ab_glyph
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: aho-corasick
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: async-trait
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: autocfg
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: backtrace
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: bytes
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: clap
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: clap_derive
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: downcast-rs
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: fastrand
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: half
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: itoa
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: memchr
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: pin-project-lite
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: polling
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: rayon
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: regex
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: regex-syntax
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: rustix
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: rustversion
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: uuid
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: widestring
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: xml-rs
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-04-09 00:20:27 -04:00
wicast
17ef6cac90
fix(spv-out): OpSourceContinued for large source (gfx-rs#5390)
2024-04-08 11:27:18 +02:00
vero
911baf3e8c
Add DirectX ShaderModel 6.1-6.7 detection ( #5498 )
2024-04-06 11:35:59 +02:00
vero
1c48a23cff
Add Metal 3.0 and 3.1 detection ( #5497 )
2024-04-05 19:22:33 +02:00
Jim Blandy
2ad95b2774
[naga wgsl-in] Allow override expressions as local var initializers.
...
Allow `LocalVariable::init` to be an override expression.
Note that this is unrelated to WGSL compliance. The WGSL front end
already accepts any sort of expression as an initializer for
`LocalVariable`s, but initialization by an override expression was
handled in the same way as initialization by a runtime expression, via
an explicit `Store` statement.
This commit merely lets us skip the `Store` when the initializer is an
override expression, producing slightly cleaner output in some cases.
2024-04-05 18:07:41 +02:00
teoxoy
7df0aa6364
move the burden of evaluating override-expressions to users of naga's API
2024-04-05 18:07:41 +02:00
Jim Blandy
ba19d8df34
[naga] Adjust RayQuery statements in override processing.
2024-04-05 18:07:41 +02:00
Jim Blandy
906ed128de
[naga] Spell out members in adjust_expr.
2024-04-05 18:07:41 +02:00
Jim Blandy
8a2bc07f11
[naga] Handle comparison operands in pipeline constant evaluation.
...
Properly adjust `AtomicFunction::Exchange::compare` after pipeline
constant evaluation.
2024-04-05 18:07:41 +02:00
Jim Blandy
a7d8ee999d
[naga] Add missing newline to test input file.
2024-04-05 18:07:41 +02:00
Jim Blandy
8107f80b7f
[naga] Tweak comments in ConstantEvaluator::try_eval_and_append
.
...
I found I needed a little bit more detail here.
2024-04-05 18:07:41 +02:00