[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] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
package = "wgpu-core" package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu" git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6" rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
features = ["raw-window-handle"] features = ["raw-window-handle"]
[target.'cfg(target_arch = "wasm32")'.dependencies.wgc] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc]
package = "wgpu-core" package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu" git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6" rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
features = ["raw-window-handle"] features = ["raw-window-handle"]
optional = true optional = true
[dependencies.wgt] [dependencies.wgt]
package = "wgpu-types" package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu" git = "https://github.com/gfx-rs/wgpu"
rev = "523ef2dfec0bf18c696bc53fea252fd6fa7350c6" rev = "13015c8621daade1decb7e1083b7e0f73eeab6c7"
[dependencies] [dependencies]
arrayvec = "0.5" arrayvec = "0.5"
log = "0.4" log = "0.4"
parking_lot = "0.11" 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" raw-window-handle = "0.3"
serde = { version = "1", features = ["derive"], optional = true } serde = { version = "1", features = ["derive"], optional = true }
smallvec = "1" smallvec = "1"
@ -71,13 +71,13 @@ env_logger = "0.8"
# used to test all the example shaders # used to test all the example shaders
[dev-dependencies.naga] [dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
tag = "gfx-22" tag = "gfx-23"
features = ["wgsl-in"] features = ["wgsl-in"]
# used to generate SPIR-V for the Web target # used to generate SPIR-V for the Web target
[target.'cfg(target_arch = "wasm32")'.dependencies.naga] [target.'cfg(target_arch = "wasm32")'.dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
tag = "gfx-22" tag = "gfx-23"
features = ["wgsl-in", "spv-out"] features = ["wgsl-in", "spv-out"]
[[example]] [[example]]

View File

@ -1021,7 +1021,7 @@ impl crate::Context for Context {
}; };
let global = &self.0; 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, device.id,
&descriptor, &descriptor,
PhantomData, PhantomData,
@ -1068,7 +1068,7 @@ impl crate::Context for Context {
}; };
let global = &self.0; 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, device.id,
&descriptor, &descriptor,
PhantomData, PhantomData,

View File

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