Commit Graph

14 Commits

Author SHA1 Message Date
Jim Blandy
0c69735f59 Change naga::back::spv::DebugInfo::file_name to a &Path.
This makes it a bit easier to use in the CLI and snapshot tests.
2023-09-25 07:59:41 -07:00
Jim Blandy
8b267218a4 Implement module compaction.
Add a new Naga feature, `"compact"`, which adds a new function
`naga::compact::compact`, which removes unused expressions, types, and
constants from a `Module`.
2023-09-20 18:46:33 +02:00
Jim Blandy
0b7afb3943 cli: Move file output into its own function. 2023-09-20 18:46:33 +02:00
Jim Blandy
55a2ee445c cli: Gather up SPIR-V output options settings. 2023-09-20 18:46:33 +02:00
Jim Blandy
187aed8e11 cli: Put a full naga::front::spv::Options in Parameters.
This lets us gather up the code that influences SPV input.
2023-09-20 18:46:33 +02:00
Jim Blandy
23860c0e29 cli: Change --generate-debug-symbols from option to switch.
Change `--generate-debug-symbols` from an option that requires a
value, "true" or "false", to a switch, whose mere presence enables the
feature.
2023-09-20 18:46:33 +02:00
Jim Blandy
2a47a15f03 cli: Populate dot backend options in Parameters early.
This is a step towards having the output loop depend only on `params`,
rather than both `params` and `args`.
2023-09-20 18:46:33 +02:00
Elie Michel
0ae0446f3a [cli] Add support for .{vert,frag,comp}.glsl files (#2462) 2023-09-13 15:23:58 +02:00
Teodor Tanasoaia
a550b0b499 Split image bounds check policy (#2265) 2023-06-29 14:59:37 +00:00
wicast
3ca8b4997d fix(spv-out-debug): fix debug options (#2394) 2023-06-29 13:31:26 +02:00
wicast
25e4f17a69 add debug info for spv-out (#2379) 2023-06-28 14:30:25 +02:00
Shaye Garg
67ea8f0c06 [wgsl-in] Split into multiple files (#2207)
Make changes suggested in #2075, but put off to a separate PR because they would interfere with reviewing the change:

- Split the new WGSL front end into modules in a logical way.
- Rename `Parser` to `Frontend`.
2023-01-31 07:17:58 -08:00
Jim Blandy
ca99d8bcbc Inline identifiers into format strings.
[Since Rust 1.58], Rust format strings have been able to "capture
arguments simply by writing {ident} in the string." Clippy 1.67 made
the corresponding warning, `uninlined_format_args`, warn-by-default.
Inlined arguments seem more readable, so Naga should adopt them.

[Since Rust 1.58]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1580-2022-01-13
2023-01-31 11:27:51 +01:00
Erich Gubler
224ff3897d build(cli): use conventional bin path for naga-cli 2022-12-27 10:38:37 -08:00