From 0e5892fa041546177dc151f56ceef9611c004022 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 14 Dec 2021 23:59:06 -0500 Subject: [PATCH] Update naga with Metal bounds checks (#2276) --- Cargo.lock | 2 +- wgpu-core/Cargo.toml | 2 +- wgpu-hal/Cargo.toml | 4 ++-- wgpu-hal/src/metal/device.rs | 5 +++++ wgpu/Cargo.toml | 6 +++--- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21fce70cd7..814d245ab3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,7 +871,7 @@ dependencies = [ [[package]] name = "naga" version = "0.7.1" -source = "git+https://github.com/gfx-rs/naga?rev=c69f676#c69f67660973a3bffa3b27c295f698dc4aa01524" +source = "git+https://github.com/gfx-rs/naga?rev=3867ef4#3867ef4f6cba6af0bbeec330c9379d7ade14e4ef" dependencies = [ "bit-set", "bitflags", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 3e0bad5f55..d01b6a7f3e 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -38,7 +38,7 @@ thiserror = "1" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" features = ["span", "validate", "wgsl-in"] diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index f896b3d468..7542a3a88b 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -75,12 +75,12 @@ js-sys = { version = "0.3" } [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" features = ["wgsl-in"] diff --git a/wgpu-hal/src/metal/device.rs b/wgpu-hal/src/metal/device.rs index db49216502..d4018dcfd1 100644 --- a/wgpu-hal/src/metal/device.rs +++ b/wgpu-hal/src/metal/device.rs @@ -635,6 +635,11 @@ impl crate::Device for super::Device { ..per_stage_map.cs }, }, + bounds_check_policies: naga::proc::BoundsCheckPolicies { + index: naga::proc::BoundsCheckPolicy::ReadZeroSkipWrite, + buffer: naga::proc::BoundsCheckPolicy::ReadZeroSkipWrite, + image: naga::proc::BoundsCheckPolicy::ReadZeroSkipWrite, + }, }, }) } diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index d36b4eb6e2..e3b1266dbf 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -136,20 +136,20 @@ env_logger = "0.8" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" optional = true # used to test all the example shaders [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" features = ["wgsl-in"] [target.'cfg(target_arch = "wasm32")'.dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "c69f676" +rev = "3867ef4" #version = "0.7" features = ["wgsl-out"]