Made --spirt the default, added --no-spirt

This commit is contained in:
Sylvester Hesp 2023-03-14 14:40:30 +01:00
parent 2f1a102c36
commit eaab5101ce
2 changed files with 9 additions and 4 deletions

View File

@ -361,8 +361,8 @@ impl CodegenArgs {
opts.optflag(
"",
"spirt",
"use SPIR-T for legalization (see also `docs/src/codegen-args.md`)",
"no-spirt",
"disable SPIR-T for legalization (see also `docs/src/codegen-args.md`)",
);
opts.optmulti(
"",
@ -537,7 +537,7 @@ impl CodegenArgs {
dce: !matches.opt_present("no-dce"),
compact_ids: !matches.opt_present("no-compact-ids"),
structurize: !matches.opt_present("no-structurize"),
spirt: matches.opt_present("spirt"),
spirt: !matches.opt_present("no-spirt"),
spirt_passes: matches
.opt_strs("spirt-passes")
.iter()

View File

@ -139,7 +139,9 @@ anyway, be careful).
Disables CFG structurization. Probably results in invalid modules.
### `--spirt`
### `--spirt` <sub>_(until 0.6.0)_</sub>
Note: as of `rust-gpu 0.6.0`, `SPIR-🇹` is enabled by default. Use `--no-spirt` to disable.
Enables using the experimental [`SPIR-🇹` shader IR framework](https://github.com/EmbarkStudios/spirt) in the linker - more specifically, this:
- adds a `SPIR-V -> SPIR-🇹 -> SPIR-V` roundtrip
@ -149,6 +151,9 @@ Enables using the experimental [`SPIR-🇹` shader IR framework](https://github.
For more information, also see [the `SPIR-🇹` repository](https://github.com/EmbarkStudios/spirt).
### `--no-spirt` <sub>_(0.6.0)_</sup>
Disables the [`SPIR-🇹` shader IR framework](https://github.com/EmbarkStudios/spirt) in the linker.
### `--spirt-passes PASSES`
Enable additional `SPIR-🇹` passes, as listed in `PASSES` (comma-separated).