Commit Graph

14 Commits

Author SHA1 Message Date
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
Connor Fitzgerald
bac2d82a43 Bump naga versions 2023-07-20 22:20:46 -04:00
Connor Fitzgerald
b99d58ea43 Update to version 0.12 2023-04-19 17:04:49 -04:00
Connor Fitzgerald
f0edae8ce9 Update to 0.11 (#2222) 2023-01-25 21:27:09 +00:00
Erich Gubler
224ff3897d build(cli): use conventional bin path for naga-cli 2022-12-27 10:38:37 -08:00
Erich Gubler
b37dda8854 build: move to the Rust 2021 edition (#2085)
* build: move to the Rust 2021 edition

Since the MSRV of `naga` [is currently 1.56][msrv], I don't think there's a strong reason to stay
with the 2018 edition, and there _are_ a [few good reasons][edition-guide] to move to the 2021
edition.

I did this migration mostly automatically, per [official Rust guidelines]:

```sh
$ cargo fix --edition --all-targets
$ sed -i Cargo.toml 's/2018/2021'
$ cargo fix --edition-idioms --allow-dirty # doesn't change anything
```

The only manual edit needed to stymie a new warning introduced was the removal of the `TryFrom`
import in several modules, since it's now in the 2021 prelude.

[msrv]: a7193d652e/.github/workflows/pipeline.yml (L14)
[edition-guide]: https://doc.rust-lang.org/edition-guide/rust-2021/index.html
[official Rust guidelines]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html#edition-migration

* refactor(wgsl-in): use `pat` instead of `pat_param` again

How we were using `pat` in the Rust 2018 edition is actually the use case that
Rust 2021's `pat` fragment specifier is intended to satisfy. So, let's just use
that!
2022-10-25 08:44:17 -07:00
Connor Fitzgerald
c52d91023d Add changelog and bump version to 0.10 (#2077) 2022-10-05 17:04:49 -04:00
João Capucho
7d0e9847b0 Remove the glsl-validate feature
When it was introduced it was supposed to allow for fast compiles by
skipping glsl specific validation, but as it turns the subset of glsl that's
compilable code is already pretty close to the subset of valid glsl code.

So the current code gated behind glsl-validate amounts to a single branch that
isn't even performance sensitive, and most of the validation is not specific to
glsl and is made by naga's validator which can be turned off, so the original
goal of fast compile times by disabling validation can still be accomplished.
2022-09-05 19:37:39 -07:00
Connor Fitzgerald
350171ed2f Prepare naga-cli 0.9 for release (#1999) 2022-07-02 04:00:51 +00:00
Dzmitry Malyshau
231da54cd7 Bincode support for naga-cli 2022-02-17 09:49:33 -05:00
Igor Shaposhnik
3e1244c5cb Make shader validation under a separate feature (#1437) 2021-10-05 15:11:32 -04:00
Jim Blandy
95d3a4e699 Enable span tracking by default in the Naga CLI. (#1364) 2021-09-15 15:32:19 -07:00
Zicklag
a0e50e3eac Improve CLI Argument Doc and Error Handling
- Use argh for parsing commandline arguments and generating help message
- Remove almost all panics and handle errors by printing them and
exiting 1
2021-07-20 13:54:30 -04:00
Jakob Hellermann
4224d14a08 move bin/naga.rs to a separate crate in workspace (#938)
* move bin/naga.rs to a separate crate

* enable all shader languages for naga binary

* [naga-cli] add env logger

* [naga-cli] remove unneccessary code

* [naga-cli]enable glsl-validate feature

* move naga-cli to cli, add trailing newline

* remove commented env_logger dependency
2021-06-12 19:24:01 -04:00