[rs] Update naga to gfx-23

This commit is contained in:
Dzmitry Malyshau 2021-04-26 12:16:01 -04:00
parent cd7ba87a2c
commit 07a876c8d5
3 changed files with 9 additions and 11 deletions

View File

@ -28,26 +28,26 @@ cross = ["wgc/cross"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6"
rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
features = ["raw-window-handle"]
[target.'cfg(target_arch = "wasm32")'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6"
rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
features = ["raw-window-handle"]
optional = true
[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6"
rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
[dependencies]
arrayvec = "0.5"
log = "0.4"
parking_lot = "0.11"
profiling = { version = "0.1.10", default-features = false } # Need 0.1.10+ to avoid compliation error with proc macros off.
profiling = { version = "1", default-features = false }
raw-window-handle = "0.3"
serde = { version = "1", features = ["derive"], optional = true }
smallvec = "1"
@ -71,13 +71,13 @@ env_logger = "0.8"
# used to test all the example shaders
[dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga"
tag = "gfx-22"
tag = "gfx-23"
features = ["wgsl-in"]
# used to generate SPIR-V for the Web target
[target.'cfg(target_arch = "wasm32")'.dependencies.naga]
git = "https://github.com/gfx-rs/naga"
tag = "gfx-22"
tag = "gfx-23"
features = ["wgsl-in", "spv-out"]
[[example]]

View File

@ -1021,7 +1021,7 @@ impl crate::Context for Context {
};
let global = &self.0;
let (id, _, error) = wgc::gfx_select!(device.id => global.device_create_render_pipeline(
let (id, error) = wgc::gfx_select!(device.id => global.device_create_render_pipeline(
device.id,
&descriptor,
PhantomData,
@ -1068,7 +1068,7 @@ impl crate::Context for Context {
};
let global = &self.0;
let (id, _, error) = wgc::gfx_select!(device.id => global.device_create_compute_pipeline(
let (id, error) = wgc::gfx_select!(device.id => global.device_create_compute_pipeline(
device.id,
&descriptor,
PhantomData,

View File

@ -1144,12 +1144,10 @@ impl crate::Context for Context {
crate::ShaderSource::Wgsl(ref code) => {
use naga::{back::spv, front::wgsl, valid::Validator};
let module = wgsl::parse_str(code).unwrap();
let mut capabilities = HashSet::default();
capabilities.insert(spv::Capability::Shader);
let options = spv::Options {
lang_version: (1, 0),
flags: spv::WriterFlags::empty(),
capabilities,
capabilities: None,
};
let analysis = Validator::new(naga::valid::ValidationFlags::all())
.validate(&module)