Commit Graph

8767 Commits

Author SHA1 Message Date
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 Nicol
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 Brody
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
Jamie Nicol
34cfee6ebc [naga wgsl-in] Return error if wgsl parser recurses too deeply.
It's currently trivial to write a shader that causes the wgsl parser
to recurse too deeply and overflow the stack. This patch makes the
parser return an error when recursing too deeply, before the stack
overflows.

It makes use of a new function Parser::track_recursion(). This
increments a counter returning an error if the value is too high,
before calling the user-provided function and returning its return
value after decrementing the counter again.

Any recursively-called functions can simply be modified to call
track_recursion(), providing their previous contents in a closure as
the argument. All instances of recursion during parsing call through
either Parser::statement(), Parser::unary_expression(), or
Parser::type_decl(), so only these functions have been updated as
described in order to keep the patch as unobtrusive as possible.

A value of 256 has been chosen as the recursion limit, but can be
later tweaked if required. This avoids the stack overflow in the
testcase attached to issue #5757.
2025-01-28 15:00:26 +00:00
Connor Fitzgerald
d6904a70a5 Remove Incorrect Emcripten Instructions (#7010) 2025-01-28 13:25:25 +01:00
Kevin Reid
98e080410f Fix compatibility issues in hello_window example. (#7009) 2025-01-27 12:14:20 -05:00
Kevin Reid
321ee42771 Don’t copy buffer data back to JS if unnecessary, in WebGPU backend. (#7007) 2025-01-27 12:14:09 -05:00
metamuffin
33e8df0f44 Fix deadlock between snatchable_lock and trackers in Queue::write_texture (#7004)
* Fix deadlock between snatchable_lock and trackers in Queue::write_texture

* Fix another deadlock in write_texture between pending_writes and snatchable_lock.
2025-01-27 18:01:57 +01:00
@brody4hire - C. Jonathan Brody
df54acc05d use hashbrown in more crates (etc.) (#6938)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-27 11:50:33 -05:00
Daniel McNab
fcbadc9529 Link to TextureBlitterBuilder from TextureBlitter::new (#7003) 2025-01-27 11:30:26 +01:00
dependabot[bot]
7e4cfb5947 chore(deps): bump web-time from 0.2.4 to 1.1.0 (#7001)
Bumps [web-time](https://github.com/daxpedda/web-time) from 0.2.4 to 1.1.0.
- [Release notes](https://github.com/daxpedda/web-time/releases)
- [Changelog](https://github.com/daxpedda/web-time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/daxpedda/web-time/compare/v0.2.4...v1.1.0)

---
updated-dependencies:
- dependency-name: web-time
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-26 23:05:33 -05:00
dependabot[bot]
a5491c4484 chore(deps): bump the patch-updates group with 8 updates (#7000)
Bumps the patch-updates group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [trybuild](https://github.com/dtolnay/trybuild) | `1.0.102` | `1.0.103` |
| [clap](https://github.com/clap-rs/clap) | `4.5.26` | `4.5.27` |
| [clap_builder](https://github.com/clap-rs/clap) | `4.5.26` | `4.5.27` |
| [crunchy](https://github.com/eira-fransham/crunchy) | `0.2.2` | `0.2.3` |
| [is-terminal](https://github.com/sunfishcode/is-terminal) | `0.4.13` | `0.4.15` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.43` | `0.38.44` |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.14` | `1.0.15` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.12.0` | `1.12.1` |


Updates `trybuild` from 1.0.102 to 1.0.103
- [Release notes](https://github.com/dtolnay/trybuild/releases)
- [Commits](https://github.com/dtolnay/trybuild/compare/1.0.102...1.0.103)

Updates `clap` from 4.5.26 to 4.5.27
- [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/clap_complete-v4.5.26...clap_complete-v4.5.27)

Updates `clap_builder` from 4.5.26 to 4.5.27
- [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.26...v4.5.27)

Updates `crunchy` from 0.2.2 to 0.2.3
- [Commits](https://github.com/eira-fransham/crunchy/commits)

Updates `is-terminal` from 0.4.13 to 0.4.15
- [Commits](https://github.com/sunfishcode/is-terminal/compare/v0.4.13...v0.4.15)

Updates `rustix` from 0.38.43 to 0.38.44
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.43...v0.38.44)

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

Updates `uuid` from 1.12.0 to 1.12.1
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.12.0...1.12.1)

---
updated-dependencies:
- dependency-name: trybuild
  dependency-type: direct:production
  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_builder
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: crunchy
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: is-terminal
  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: unicode-ident
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: uuid
  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>
2025-01-26 23:05:10 -05:00
ed-2100
36ccc9fc1d Fix surface drop order. (#6997)
* Fix surface drop order.

* Add changes to changelog.

* Update SAFETY note.

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

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-26 22:23:51 -05:00
dependabot[bot]
4bb9c396ce chore(deps): bump actions/checkout from 2 to 4 (#6998)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 02:30:41 +00:00
Dennis Lonoshchuk
0e7d93ed92 Adds hello window example (#6992)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-27 02:08:52 +00:00
Connor Fitzgerald
b233d204f7 Fix Hello Compute Shader (#6985) 2025-01-24 18:26:49 +00:00
Reina_Sakiria
5386d38113 [naga spv-in] OpImageWrite allows input other than Vector4. (#6630)
* fix(naga-spv-in): Image write value type is invalid.

* fix(naga-spv-in): input vector 4 may case error

* fix(naga-spv-in): Incorrect swizzle pattern for vector size 3.
2025-01-24 16:59:58 +01:00
JMS55
0fc0b35899 Transition resources (#6678)
* WIP

* Fix typo

* WIP: Implement structure of  command_encoder_transition_resources

* WIP

* More work

* Clippy

* Fix web build

* Use new types for API, more docs

* Add very basic test

* Try to fix test cfg

* Fix merge

* Missed commit

* Use wgt types instead of hal types

* Implement `Clone` for `ShaderModule` (#6939)

* Move to dispatch trait, move more things to wgt

* Move existing code to use new wgt types

* Fixes

* Format import

* Format another file

* Fixes

* Make module private

* Fix imports

* Fix test imports

* Rexport types

* Fix imports

* Fix import

---------

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-24 00:54:19 -05:00