mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
[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.
This commit is contained in:
parent
9013e226c3
commit
9afd54ea24
@ -81,6 +81,8 @@ Wgpu now exposes backend feature for the Direct3D 12 (`dx12`) and Metal (`metal`
|
||||
|
||||
- Naga constant evaluation can now process binary operators whose operands are both vectors. By @jimblandy in [#4861](https://github.com/gfx-rs/wgpu/pull/4861).
|
||||
|
||||
- Add `--bulk-validate` option to Naga CLI. By @jimblandy in [#4871](https://github.com/gfx-rs/wgpu/pull/4871).
|
||||
|
||||
### Changes
|
||||
|
||||
- Arcanization of wgpu core resources: By @gents83 in [#3626](https://github.com/gfx-rs/wgpu/pull/3626) and thanks also to @jimblandy, @nical, @Wumpf, @Elabajaba & @cwfitzgerald
|
||||
|
@ -188,10 +188,16 @@ fn run(args: Args) -> anyhow::Result<()> {
|
||||
})
|
||||
}
|
||||
ValidateSubcommand::Wgsl => {
|
||||
visit_files(snapshots_base_out, "wgsl/*.wgsl", |path| {
|
||||
ack_visiting(path);
|
||||
EasyCommand::new("cargo", |cmd| cmd.args(["run", "-p", "naga-cli", "--"]).arg(path)).success()
|
||||
})
|
||||
let mut paths = vec![];
|
||||
let mut error_status = visit_files(snapshots_base_out, "wgsl/*.wgsl", |path| {
|
||||
paths.push(path.to_owned());
|
||||
Ok(())
|
||||
});
|
||||
EasyCommand::new("cargo", |cmd| {
|
||||
cmd.args(["run", "-p", "naga-cli", "--", "--bulk-validate"]).args(paths)
|
||||
}).success()
|
||||
.log_if_err_found(&mut error_status);
|
||||
error_status
|
||||
}
|
||||
ValidateSubcommand::Hlsl(cmd) => {
|
||||
let visit_hlsl = |consume_config_item: &mut dyn FnMut(
|
||||
|
Loading…
Reference in New Issue
Block a user