Commit Graph
8782 Commits
Author SHA1 Message Date
sagudev 5764ada320 Unofy ResolvedBindingResource into BindingResource
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev a46fb070c2 Unify ResolvedPipelineLayoutDescriptor into PipelineLayoutDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev c3bda444a1 Unify ResolvedRenderPipelineDescriptor into RenderPipelineDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev dadd5af55c Unify ResolvedComputePipelineDescriptor into ComputePipelineDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 40f5763e72 Unify ResolvedFragmentState into FragmentState
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev aa2d6d0849 Unify ResolvedVertexState into VertexState
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev e14e397424 Unify ResolvedProgrammableStageDescriptor into ProgrammableStageDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 8e943e828c Unify ResolvedSurfaceOutput into SurfaceOutput
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev c0688b6de7 Unify ResolvedBufferBinding into BufferBinding
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
Jamie Nicol c07fab2c12 [naga wgsl-in] Allow abstract literals to be used as return values
When lowering a return statement, call expression_for_abstract()
rather than expression() to avoid concretizing the return value. Then,
if the function has a return type, call try_automatic_conversions() to
attempt to convert our return value to the correct type.

This has the unfortunate side effect that some errors that would have
been caught by the validator are instead encountered as conversion
errors by the parser. This may result in a slightly less descriptive
error message in some cases. (See the change to the invalid_functions()
test, for example.)
2025-02-07 11:44:03 -08:00
Erich Gubler 005bde99f9 chore: revert to hashbrown 0.14.5 and friends (#7081) 2025-02-07 17:04:26 +00:00
Jim Blandy 410ab29a24 [naga] Compact out unused anonymous overrides.
In compaction, remove unused anonymous overrides.

Since overrides are no longer used by definition, include override
initialization expressions in the tandem traversal of types and global
expressions.

To simplify overload processing, we plan to make all override-sized
arrays refer to their lengths via actual `Override`s. Arrays with
non-identifier override expressions as their lengths would refer to
anonymous `Override`s with interesting `init` expressions. But in
order to avoid re-introducing #6788, we need compaction to remove
anonymous overrides.
2025-02-06 19:40:04 -08:00
Jim Blandy 936d882d31 [naga] Use r#override instead of override_.
Use the standard Rust reserved identifier syntax for `override`,
rather than the non-standard trailing underscore.
2025-02-06 19:40:04 -08:00
Jim Blandy 9d7ec93d28 [naga] Simplify iterator construction in type_expression_tandem. (#7070)
Rather than reversing two iterators and then zipping them, zip them
first and then reverse the result.

However, zipped iterators are only reversible if the inputs implement
`ExactSizeIterator`, so make `UniqueArena::iter` promise that as well.

For consistency, make `Arena::iter` also promise to return an
`ExactSizeIterator`.
2025-02-06 20:41:55 -05:00
Shaye Garg dad9d0b577 Fix 3D Texture Views on Dx12 (#7071)
* use all w slices

* update changelog
2025-02-06 22:29:06 +00:00
Kevin Reid d59dce5eea More documentation for TextureView. (#7069)
Explain how to make one and what its properties are.
2025-02-06 16:42:10 -05:00
AMS21 b32cbd4ea6 Fix typo folloed -> followed (#7067) 2025-02-06 14:02:17 +00:00
sagudev 9db6430fdb ArcComputePassDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
sagudev 5c900f15f7 ArcPassTimestampWrites
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
sagudev bcbe4311a5 ArcRenderPassColorAttachment
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
Jim Blandy 426882403d Fix time for wgpu maintainers meeting. (#7060)
Change the time from UTC to US EST. UTC is not affected by US daylight
savings time, but the current understanding is that our meeting time
is affected.

In the maintainers meeting, we confirmed that this was okay for the
European attendees (some have other US DST-affected meetings
afterwards) but of course everything can be revisited as needed.
2025-02-05 17:37:15 +00:00
Vecvec d34707ec3f Rename instance_id & instance_custom_index to instance_index & instance_custom_data (#6780) 2025-02-05 18:23:22 +01:00
Jim Blandy 8fb94d9c08 [naga] Require hashbrown's serde feature as a dev-dependency.
Add `hashbrown` with the `"serde"` feature as a development dependency
for Naga. Regardless of whether Naga's `deserialize` feature is
enabled, the snapshot tests need to deserialize parameters saved in
files as RON text.

It would also suffice to use `std::collections::HashSet` in the
snapshot tests, although we would need to build a `naga::FashHashSet`
from the std `HashSet` at one point. Adding the dev-dependency seems
slightly simpler.

Fixes #7038.
2025-02-05 08:44:23 -08:00
Erich Gubler 9b76bcf12e fix(dx12): query resource binding tier, not resource heap tier, for bindless feature check (#7059) 2025-02-05 10:41:46 -05:00
Connor Fitzgerald d9e9c3aa19 Fix Zero Sized Sampler Heap Issue (#7054) 2025-02-03 15:49:31 -05:00
dependabot[bot] ff4496b5d6 chore(deps): bump the patch-updates group with 12 updates (#7052)
Bumps the patch-updates group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [serde_json](https://github.com/serde-rs/json) | `1.0.137` | `1.0.138` |
| [syn](https://github.com/dtolnay/syn) | `2.0.96` | `2.0.98` |
| [async-trait](https://github.com/dtolnay/async-trait) | `0.1.85` | `0.1.86` |
| [bumpalo](https://github.com/fitzgen/bumpalo) | `3.16.0` | `3.17.0` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.2.10` | `1.2.11` |
| [ryu](https://github.com/dtolnay/ryu) | `1.0.18` | `1.0.19` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.22.22` | `0.22.23` |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.15` | `1.0.16` |
| [wayland-backend](https://github.com/smithay/wayland-rs) | `0.3.7` | `0.3.8` |
| [wayland-scanner](https://github.com/smithay/wayland-rs) | `0.31.5` | `0.31.6` |
| [wayland-sys](https://github.com/smithay/wayland-rs) | `0.31.5` | `0.31.6` |
| [winnow](https://github.com/winnow-rs/winnow) | `0.6.24` | `0.7.0` |


Updates `serde_json` from 1.0.137 to 1.0.138
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.137...v1.0.138)

Updates `syn` from 2.0.96 to 2.0.98
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.96...2.0.98)

Updates `async-trait` from 0.1.85 to 0.1.86
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.85...0.1.86)

Updates `bumpalo` from 3.16.0 to 3.17.0
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.16.0...3.17.0)

Updates `cc` from 1.2.10 to 1.2.11
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.10...cc-v1.2.11)

Updates `ryu` from 1.0.18 to 1.0.19
- [Release notes](https://github.com/dtolnay/ryu/releases)
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.18...1.0.19)

Updates `toml_edit` from 0.22.22 to 0.22.23
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.22...v0.22.23)

Updates `unicode-ident` from 1.0.15 to 1.0.16
- [Release notes](https://github.com/dtolnay/unicode-ident/releases)
- [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.15...1.0.16)

Updates `wayland-backend` from 0.3.7 to 0.3.8
- [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)

Updates `wayland-scanner` from 0.31.5 to 0.31.6
- [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)

Updates `wayland-sys` from 0.31.5 to 0.31.6
- [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)

Updates `winnow` from 0.6.24 to 0.7.0
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.6.24...v0.7.0)

---
updated-dependencies:
- dependency-name: serde_json
  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: async-trait
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: bumpalo
  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: ryu
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: toml_edit
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: unicode-ident
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: wayland-backend
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: wayland-scanner
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: wayland-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: winnow
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 23:01:08 -05:00
dependabot[bot] f92d811aea chore(deps): bump crate-ci/typos from 1.29.4 to 1.29.5 (#7051)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.4 to 1.29.5.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.29.4...v1.29.5)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 21:35:02 -05:00
Jamie NicolandTeodor Tanasoaia 4e7d892317 [naga msl-out hlsl-out] Improve workaround for infinite loops causing undefined behaviour (#6929)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-31 15:27:52 -05:00
Connor Fitzgerald ad194a8a3e Simple Check Feature Task xtask (#7041) 2025-01-31 17:59:29 +00:00
Vecvec 7cde4707ec Fix hlsl storage format generation (#6993) 2025-01-31 16:31:03 +01:00
Connor Fitzgerald 8caefceb8e Add rust-version to more crates (#7036) 2025-01-31 10:33:10 +01:00
Vecvec ba098a59e0 Update mesa in CI. (#7044)
* Update mesa version.

* Update ubuntu version.
2025-01-31 01:45:00 -05:00
Connor Fitzgerald d27c8be2e2 Fix More Dependencies (#7040) 2025-01-30 22:19:46 -05:00
Connor Fitzgerald 693d01c2a7 Add Example 02 CI (#7037) 2025-01-30 22:15:22 -05:00
@brody4hire - C. Jonathan Brody a8cc83e17a avoid default features in many dependencies (etc.) (#7031) 2025-01-30 10:30:42 -05:00
@brody4hire - C. Jonathan Brody 8773d47c6d chore: remove obsolete entries from allow-git in .deny.toml (#7032) 2025-01-30 10:29:41 -05:00
@brody4hire - C. Jonathan Brody 7ff5009e27 chore: update noise -> 0.9 & remove from allow-git (#7033) 2025-01-30 09:35:58 +01:00
@brody4hire - C. Jonathan Brody 55c33b0372 update MapErrWithSpan to be pub(crate) trait 2025-01-29 20:22:56 -05:00
@brody4hire - C. Jonathan Brody a1185b21cc remove std::error::Error constraint not needed from AddSpan impl 2025-01-29 20:22:56 -05:00
@brody4hire - C. Jonathan Brody 58cbb93213 add blank lines & returned output type comment to MapErrWithSpan 2025-01-29 20:22:56 -05:00
@brody4hire - C. Jonathan Brody 1f2cc66f4e add blank lines & returned output type comment to AddSpan 2025-01-29 20:22:56 -05:00
@brody4hire - C. Jonathan Brody d7ed0c5290 keep internal AddSpan trait & impl together 2025-01-29 20:22:56 -05:00
@brody4hire - C. Jonathan Brody ea4d18c108 cleanup: resolve spelling errors in test comments (#7028) 2025-01-29 23:49:26 +00:00
@brody4hire - C. Jonathan BrodyandErich Gubler b8a5efc2f2 cleanup: CHANGELOG.md - resolve minor issues (#7024)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2025-01-29 15:34:19 -05:00
Jamie Nicol 6c8d0b061c [naga] Restore return statement at end of functions without return types (#7021) 2025-01-29 13:54:49 -05:00
Erich Gubler e0ebd1b266 diag(naga): clarify ImageStore type mismatch cases (#6791) 2025-01-29 11:13:36 -05:00
Jamie Nicol d9777355c9 [naga const_eval] Ensure eval_zero_value_and_splat() lowers a Splat of a ZeroValue correctly
eval_zero_value_and_splat() is called to lower ZeroValue and Splat
expressions into Literal and Compose expressions. However, in its
current form it either calls splat() *or* eval_zero_value_impl()
depending on the expression type.

splat() will lower a Splat of a scalar ZeroValue to a vector
ZeroValue, which means eval_zero_value_and_splat() can still return a
ZeroValue. Its callers, such as binary_op(), are unable to handle this
ZeroValue, so cannot proceed with const evaluation.

This patch makes it so that eval_zero_value_and_splat() will first
call splat(), *and then* call eval_zero_value_impl(), which will lower
the vector ZeroValue returned by splat() into a Compose of Literals.
Callers such as binary_op() are perfectly able to handle this Compose,
so can now proceed with const evaluation.
2025-01-29 06:55:48 -08:00
Jim Blandy 2a456f5c7b [naga] Move methods on TypeInner and friends into their own module. (#7018) 2025-01-28 19:47:40 -05:00
Erich Gubler 65d499f302 Clean up naga's xtask a bit (#7014) 2025-01-28 16:26:38 +00:00
Jamie Nicol b245b358f5 [naga] Don't treat Emit statements as return statements during ensure_block_returns() (#7013) 2025-01-28 10:48:40 -05:00