Commit Graph
41 Commits
Author SHA1 Message Date
JMS55 868eb17098 SHADER_I16 full support (#9412) 2026-04-24 20:49:41 -04:00
Inner Daemons a53ffffe38 Mesh shader HLSL writer (#8752) 2026-03-24 15:42:38 -04: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
Connor Fitzgerald af2d45e3f3 [naga xtask] Remove cargo xtask bench 2025-12-03 11:29:56 -05:00
renovate[bot]andConnor Fitzgerald 9380b87755 chore(deps): update cargo.lock (#8229)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-10-01 22:42:49 +00:00
Connor Fitzgerald ff0de91ad7 Bump REPO_MSRV to 1.88 (#7960) 2025-07-17 13:00:40 -04:00
Connor Fitzgerald 9c32742dbe Move xtask dependencies into Cargo.toml 2025-04-27 18:34:52 +02:00
Connor Fitzgerald eb4a2b77d7 Bring xtasks back into workspace 2025-04-27 18:34:52 +02:00
Connor Fitzgerald 8235cd2932 Use no_main to allow xtasks to compile on wasm 2025-04-27 18:34:52 +02:00
renovate[bot] 5f3f7028fc chore(deps): update cargo.lock (#7635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 14:53:30 +00:00
renovate[bot] 1d6c1d020c Update Rust crate which to v7 (#7619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 22:00:17 +00:00
renovate[bot] 3727b67253 Update Rust crate env_logger to 0.11.0 (#7609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 21:38:52 +00:00
renovate[bot] 20d5da7e07 Update Minor Updates (#7607)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 20:59:26 +00:00
Jim Blandy 936aa4d9dc [naga xtask] Update Cargo.lock. (#7522) 2025-04-11 17:55:42 -04:00
Christian Legnitto 6ef9b8256a [naga msl-out] invalid code emitted for minimum i32/i64 value literal.
The literal `-2147483648` is parsed by Metal as negation of positive
2147483648. As 2147483648 is too large for a int, the expression is
silently promoted to a long. Sometimes this does not matter as it will
often be implicitly converted back to an int after the negation.
However, if the expression is used in a bitcast then we hit a compiler
error due to mismatched bitwidths.

Similarily for `-9223372036854775808`, as 9223372036854775808 is too
large for a long, metal emits a `-Wconstant-conversion` warning and
changes the value to -9223372036854775808. This would then be negated
again, possibly causing undefined behaviour.

In both cases we can avoid the issue by expressing the literals as the
second most negative value expressible by the type, minus one.

eg `-2147483647 - 1` and `-9223372036854775807L - 1L`.

We have added a test which uses the most negative i32 literal in an
addition. Because we bitcast addition operands to unsigned in metal,
this would cause a validation error without this fix. For the i64 case
existing tests already make use of the minimum literal value. Passing
the flag `-Werror=constant-conversion` to Metal during validation will
therefore catch this issue.
2025-04-09 14:13:03 -04:00
Jim Blandy 700a2e8ced [naga] Update naga/xtask/Cargo.lock. 2025-03-31 13:32:11 -07:00
Christian Legnitto 1ef9940114 Reduce repo MSRV from 1.85 to 1.84 (#7425)
* Reduce repo MSRV from 1.85 to 1.84

Fixes https://github.com/gfx-rs/wgpu/issues/7409

* Replace usage of task::Waker::noop()

* Gate waker code to `noop` feature

* Remove unused copied waker function

* Remove doctest from copied code
2025-03-27 14:25:19 -04:00
Connor Fitzgerald 8fb09a5ad6 Move REPO_MSRV to 1.85 (#7218) 2025-02-24 23:39:34 -05:00
Connor Fitzgerald 1ec34839ee Improve Validation Errors with Naga Validator (#7185) 2025-02-21 10:57:59 -05:00
Connor Fitzgerald 8caefceb8e Add rust-version to more crates (#7036) 2025-01-31 10:33:10 +01:00
Erich Gubler 65d499f302 Clean up naga's xtask a bit (#7014) 2025-01-28 16:26:38 +00:00
Connor FitzgeraldandGuus Waals b0f1fa66ef Add VisionOS Support (#6888)
* Add visionos support

* Use `target_vendor = "apple"`

* Fixes

* Build VisionOS

* Gah

* Bleh

* Typos

---------

Co-authored-by: Guus Waals <_@guusw.nl>
2025-01-10 17:33:58 +00:00
Erich Gubler aaac47c24e fix(naga): s/os/target_os/ in xtask's FXC/DXC check (#6774) 2024-12-17 16:12:24 -05:00
Erich Gubler d22aa2eb55 chore: format TOML files with taplo 0.9.3 2024-10-11 14:40:01 -04:00
Imbris 6d7975eb3b [naga hlsl-out glsl-out] Work around backend loop/switch bugs.
Introduce a new module, `naga::back::continue_forward`, containing
shared code for rendering Naga `Continue` statements as backend
`break` statements and assignments to introduced `bool` locals.
See the module's documentation for details.

- [hlsl-out] Transform degenerate single body switches into `do-while`
  loops. Properly render `Continue` statements enclosed by
  `Switch` statements enclosed by `Loop` statements.

- [glsl-out] Transform degenerate single body switches into `do-while`
  loops.

Improve `naga xtask validate spv` error message.

Fixes #4485.
Fixes #4514.
2024-07-23 18:12:19 -07:00
vero 1c48a23cff Add Metal 3.0 and 3.1 detection (#5497) 2024-04-05 19:22:33 +02:00
Jim Blandy ffaabeb921 [naga xtask] Update Cargo.lock for dependabot #5241.
The dependabot PR #5241 made `naga/hlsl-snapshots` depend on nanoserde 0.1.37,
but didn't regenerate `naga/xtask/Cargo.lock`.
2024-03-07 12:14:02 +01:00
Erich Gubler e45a86fa7c [naga xtask] Add and use ValidateSubcommand::all.
Add an `all` method to `ValidateSubcommand`, so that we can just use
matches elsewhere, and let the compile catch missing or duplicated
cases for us.
2023-12-27 13:07:09 -08:00
Jim Blandy 71f18fd61a [naga xtask] Use anyhow::ensure! where appropriate. 2023-12-27 13:07:09 -08:00
Jim Blandy 3e252ac2f3 [naga xtask] Use log::error in preference to eprintln. 2023-12-27 13:07:09 -08:00
Jim Blandy de3df51807 [naga xtask] Add validate all subcommand. 2023-12-27 13:07:09 -08:00
Jim Blandy 403db446e4 [naga xtask] Run validation jobs in parallel, using jobserver. 2023-12-27 13:07:09 -08:00
Jim Blandy 85ab6327d3 [naga xtask] Use indicatif crate to report validation progress. 2023-12-27 13:07:09 -08:00
Jim Blandy a1a8b6d445 [naga xtask] Remove ack_visiting function. 2023-12-27 13:07:09 -08:00
Jim Blandy 0d25acba68 [naga xtask] Collect validation jobs in a Vec before running them. 2023-12-27 13:07:09 -08:00
Jim Blandy 17a9166c26 [naga xtask] Produce output only when an error occurs. 2023-12-27 13:07:09 -08:00
Jim Blandy 41276a1731 [naga xtask] Break validation subcommands into functions. 2023-12-27 13:07:09 -08:00
Jim Blandy 9041bb94db [naga xtask] Move validation subcommands into their own module. 2023-12-27 13:07:09 -08:00
Jim Blandy 9afd54ea24 [naga xtask] Use naga-cli's --bulk-validate option.
Use `naga --bulk-validate` for `cargo xtask validate wgsl`, reducing
runtime from 12s to 0.8s.
2023-12-24 12:03:28 -08:00
Connor Fitzgerald 34e947de4b Integration of Naga into Repo (#4296) 2023-10-25 16:51:36 -04:00
Connor Fitzgerald 5369eec3b2 Move naga to subfolder 2023-10-25 14:25:04 -04:00