From 0bd85262399f8aa3d2f9bc4bbb4a1a34217fab1d Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 4 Apr 2021 11:15:55 -0400 Subject: [PATCH] Update naga to gfx-20 --- Cargo.lock | 20 ++++++++++---------- wgpu-core/Cargo.toml | 22 +++++++++++----------- wgpu-core/src/device/mod.rs | 5 ++--- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 54550a68fd..d80078ede0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "gfx-auxil" version = "0.8.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "fxhash", "gfx-hal", @@ -475,7 +475,7 @@ dependencies = [ [[package]] name = "gfx-backend-dx11" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "arrayvec", "bitflags", @@ -496,7 +496,7 @@ dependencies = [ [[package]] name = "gfx-backend-dx12" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "arrayvec", "bit-set", @@ -517,7 +517,7 @@ dependencies = [ [[package]] name = "gfx-backend-empty" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "gfx-hal", "log", @@ -527,7 +527,7 @@ dependencies = [ [[package]] name = "gfx-backend-gl" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "arrayvec", "bitflags", @@ -550,7 +550,7 @@ dependencies = [ [[package]] name = "gfx-backend-metal" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "arrayvec", "bitflags", @@ -575,7 +575,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "arrayvec", "ash", @@ -595,7 +595,7 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" dependencies = [ "bitflags", "naga", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "naga" version = "0.3.1" -source = "git+https://github.com/gfx-rs/naga?tag=gfx-19#80a8243953f93c5265ed20cd2bca85bc336fe355" +source = "git+https://github.com/gfx-rs/naga?tag=gfx-20#0369ee181ed9cd315635fc0e3d99deecdbc72246" dependencies = [ "bit-set", "bitflags", @@ -1171,7 +1171,7 @@ dependencies = [ [[package]] name = "range-alloc" version = "0.1.2" -source = "git+https://github.com/gfx-rs/gfx?rev=3c98acc515c22c8e1d78bbfaf16fc7201326e109#3c98acc515c22c8e1d78bbfaf16fc7201326e109" +source = "git+https://github.com/gfx-rs/gfx?rev=99e75efbe6ca95c2ad3eecf49cfb8474a17050df#99e75efbe6ca95c2ad3eecf49cfb8474a17050df" [[package]] name = "raw-window-handle" diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index edf8dad1ea..d138c6fc0a 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -40,28 +40,28 @@ thiserror = "1" gpu-alloc = { git = "https://github.com/zakarumych/gpu-alloc.git", rev = "560ad651aa8f7aefcee8f5bcf41e67a84561bcda" } gpu-descriptor = { version = "0.1" } -hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } -gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } +hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } +gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } [target.'cfg(all(not(target_arch = "wasm32"), all(unix, not(target_os = "ios"), not(target_os = "macos"))))'.dependencies] -gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109", features = ["naga"] } -gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df", features = ["naga"] } +gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } [target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies] -gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } -gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109", optional = true } +gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df", optional = true } [target.'cfg(all(not(target_arch = "wasm32"), windows))'.dependencies] -gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } -gfx-backend-dx11 = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } -gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109", features = ["naga"] } +gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } +gfx-backend-dx11 = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df", features = ["naga"] } [target.'cfg(target_arch = "wasm32")'.dependencies] -gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "3c98acc515c22c8e1d78bbfaf16fc7201326e109" } +gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "99e75efbe6ca95c2ad3eecf49cfb8474a17050df" } [dependencies.naga] git = "https://github.com/gfx-rs/naga" -tag = "gfx-19" +tag = "gfx-20" features = ["spv-in", "spv-out", "wgsl-in"] [dependencies.wgt] diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 59ba96fa0a..7acdb4f622 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -326,9 +326,8 @@ impl Device { let spv_options = { use naga::back::spv; let mut flags = spv::WriterFlags::empty(); - if cfg!(debug_assertions) { - flags |= spv::WriterFlags::DEBUG; - } + flags.set(spv::WriterFlags::DEBUG, cfg!(debug_assertions)); + //Note: we don't adjust the coordinate space, because `NDC_Y_UP` is required. spv::Options { lang_version: (1, 0), capabilities: [