From a47b5c554fce23a395c2005981faf5c84946f586 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 11 Apr 2022 11:04:18 -0700 Subject: [PATCH] Update to Naga rev 7aaac25f. --- Cargo.lock | 2 +- wgpu-core/Cargo.toml | 2 +- wgpu-core/src/validation.rs | 5 ++++- wgpu-hal/Cargo.toml | 4 ++-- wgpu/Cargo.toml | 6 +++--- wgpu/examples/water/water.wgsl | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 286aa96d0..47698f71f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "naga" version = "0.8.0" -source = "git+https://github.com/gfx-rs/naga?rev=f90e563#f90e563c281cfc71c794e0426ebcced9e3999202" +source = "git+https://github.com/gfx-rs/naga?rev=7aaac25f#7aaac25fbf64c0f77f0e2deba2963293f3632dad" dependencies = [ "bit-set", "bitflags", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 9d059ea58..822f750c2 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -40,7 +40,7 @@ thiserror = "1" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" features = ["span", "validate", "wgsl-in"] diff --git a/wgpu-core/src/validation.rs b/wgpu-core/src/validation.rs index ad76f0523..e46451028 100644 --- a/wgpu-core/src/validation.rs +++ b/wgpu-core/src/validation.rs @@ -845,7 +845,10 @@ impl Interface { sampling, }, }, - Some(&naga::Binding::BuiltIn(built_in)) => Varying::BuiltIn(built_in), + Some(&naga::Binding::BuiltIn { + built_in, + invariant: _, + }) => Varying::BuiltIn(built_in), None => { log::error!("Missing binding for a varying"); return; diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 25deabbc1..178f43825 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -91,14 +91,14 @@ js-sys = { version = "0.3" } [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" # DEV dependencies [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" features = ["wgsl-in"] diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 895b76262..3d33d049b 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -139,20 +139,20 @@ env_logger = "0.9" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" optional = true # used to test all the example shaders [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" features = ["wgsl-in"] [target.'cfg(target_arch = "wasm32")'.dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "f90e563" +rev = "7aaac25f" #version = "0.8" features = ["wgsl-out"] diff --git a/wgpu/examples/water/water.wgsl b/wgpu/examples/water/water.wgsl index b2bfe6b67..ea4633b69 100644 --- a/wgpu/examples/water/water.wgsl +++ b/wgpu/examples/water/water.wgsl @@ -242,10 +242,10 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4 { let terrain_depth = to_linear_depth(textureSample(terrain_depth_tex, depth_sampler, normalized_coords).r); let dist = terrain_depth - pixel_depth; - let clamped = pow(smoothStep(0.0, 1.5, dist), 4.8); + let clamped = pow(smoothstep(0.0, 1.5, dist), 4.8); let final_colour = in.f_Light + reflection_colour; - let t = smoothStep(1.0, 5.0, dist) * 0.2; //TODO: splat for mix()? + let t = smoothstep(1.0, 5.0, dist) * 0.2; //TODO: splat for mix()? let depth_colour = mix(final_colour, water_colour, vec3(t, t, t)); return vec4(depth_colour, clamped * (1.0 - in.f_Fresnel));