Commit Graph

16 Commits

Author SHA1 Message Date
Imbris
6d7975eb3b [naga hlsl-out glsl-out] Work around backend loop/switch bugs.
Introduce a new module, `naga:🔙: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
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