mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Address Jim's notes
This commit is contained in:
2
.github/workflows/pipeline.yml
vendored
2
.github/workflows/pipeline.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
# we could use `test` but `criterion` is a dev dependency,
|
||||
# and it doesn't build with our MSRV
|
||||
command: check
|
||||
# `cli` already enables most features, so let's add the rest,
|
||||
# `cli` already enables most features,
|
||||
# except for `arbitrary`, which requires Rust-1.51
|
||||
args: --workspace
|
||||
- name: Check snapshots
|
||||
|
||||
@@ -59,12 +59,15 @@ fn frontends(c: &mut Criterion) {
|
||||
});
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
group.bench_function("wgsl", |b| {
|
||||
let inputs = gather_inputs("tests/in", "wgsl");
|
||||
let inputs_wgsl = gather_inputs("tests/in", "wgsl");
|
||||
let inputs = inputs_wgsl
|
||||
.iter()
|
||||
.map(|input| std::str::from_utf8(input).unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
let mut parser = naga::front::wgsl::Parser::new();
|
||||
b.iter(move || {
|
||||
for input in inputs.iter() {
|
||||
let string = std::str::from_utf8(input).unwrap();
|
||||
parser.parse(string).unwrap();
|
||||
for &input in inputs.iter() {
|
||||
parser.parse(input).unwrap();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user