Skip to content

Commit

Permalink
Update naga with Metal bounds checks (#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark authored Dec 15, 2021
1 parent 6c2e8ed commit 0e5892f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
5 changes: 5 additions & 0 deletions wgpu-hal/src/metal/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ impl crate::Device<super::Api> 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,
},
},
})
}
Expand Down
6 changes: 3 additions & 3 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 0e5892f

Please sign in to comment.