diff --git a/Cargo.lock b/Cargo.lock index 451b37f3c..0eb89aebe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,7 +26,7 @@ dependencies = [ [[package]] name = "approx" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -34,7 +34,7 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -46,7 +46,7 @@ version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -55,30 +55,36 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "autocfg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.24" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -99,21 +105,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cbindgen" version = "0.6.7" -source = "git+https://github.com/grovesNL/cbindgen?branch=associated-constants#fce3e8302de527eb9dec0570b8de0d97bcea900d" +source = "git+https://github.com/grovesNL/cbindgen?branch=associated-constants#c87c6774c9f1b9540abac4fc505ed63f0e0a0798" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.25" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -153,7 +159,7 @@ dependencies = [ "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -163,7 +169,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -179,13 +185,13 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "d3d12" version = "0.1.0" -source = "git+https://github.com/gfx-rs/d3d12-rs.git?rev=ee01154#ee0115462e4c3178e80454c11a34a458f9a326e7" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -198,7 +204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -224,21 +230,21 @@ dependencies = [ [[package]] name = "failure" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -285,61 +291,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gfx-backend-dx12" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#389429e14319ee4994ab4ada3338a3b930046e4d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "d3d12 0.1.0 (git+https://github.com/gfx-rs/d3d12-rs.git?rev=ee01154)", + "d3d12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", + "gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "spirv_cross 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "spirv_cross 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gfx-backend-empty" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#389429e14319ee4994ab4ada3338a3b930046e4d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", + "gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gfx-backend-metal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#389429e14319ee4994ab4ada3338a3b930046e4d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "cocoa 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", + "gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "metal 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "metal 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "spirv_cross 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "spirv_cross 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "storage-map 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gfx-backend-vulkan" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#389429e14319ee4994ab4ada3338a3b930046e4d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", + "gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)", "xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -347,12 +355,11 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#389429e14319ee4994ab4ada3338a3b930046e4d" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -372,7 +379,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.44" +version = "0.2.46" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -380,7 +387,7 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -414,21 +421,21 @@ name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memmap" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "metal" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -436,7 +443,7 @@ dependencies = [ "cocoa 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -445,13 +452,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -525,18 +532,39 @@ dependencies = [ "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "percent-encoding" version = "1.0.1" @@ -586,36 +614,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -647,6 +674,19 @@ dependencies = [ "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_os" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_pcg" version = "0.1.1" @@ -658,15 +698,28 @@ dependencies = [ [[package]] name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "range-alloc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.43" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -674,7 +727,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -687,7 +740,7 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -703,10 +756,10 @@ name = "rusttype" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "approx 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stb_truetype 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "stb_truetype 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -742,7 +795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.80" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde_derive 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", @@ -760,12 +813,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -774,7 +827,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -787,27 +840,27 @@ dependencies = [ [[package]] name = "smithay-client-toolkit" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "andrew 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-protocols 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-protocols 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "spirv_cross" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -817,7 +870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stb_truetype" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -848,17 +901,7 @@ dependencies = [ [[package]] name = "syn" -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.15.22" +version = "0.15.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -873,7 +916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -883,9 +926,9 @@ version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -895,8 +938,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -910,10 +953,10 @@ dependencies = [ [[package]] name = "toml" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -956,42 +999,42 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-scanner 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-commons" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-protocols" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-scanner 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-scanner" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -999,7 +1042,7 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1010,7 +1053,7 @@ dependencies = [ name = "wgpu" version = "0.1.0" dependencies = [ - "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "wgpu-native 0.1.0", ] @@ -1026,14 +1069,14 @@ name = "wgpu-native" version = "0.1.0" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-backend-dx12 0.1.0 (git+https://github.com/gfx-rs/gfx)", - "gfx-backend-empty 0.1.0 (git+https://github.com/gfx-rs/gfx)", - "gfx-backend-metal 0.1.0 (git+https://github.com/gfx-rs/gfx)", - "gfx-backend-vulkan 0.1.0 (git+https://github.com/gfx-rs/gfx)", - "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", + "gfx-backend-dx12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-backend-empty 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-backend-metal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-backend-vulkan 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1065,21 +1108,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winit" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "cocoa 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smithay-client-toolkit 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)", + "smithay-client-toolkit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1089,7 +1133,7 @@ name = "x11" version = "2.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1099,7 +1143,7 @@ version = "2.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1108,7 +1152,7 @@ name = "xcb" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1126,17 +1170,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum andrew 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "62ea7024f6f4d203bede7c0c9cdafa3cbda3a9e0fa04d349008496cc95b8f11b" "checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f71f10b5c4946a64aad7b8cf65e3406cd3da22fc448595991d22423cf6db67b4" -"checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc" +"checksum approx 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3c57ff1a5b00753647aebbbcf4ea67fa1e711a65ea7a30eb90dbf07de2485aee" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)" = "11f080bc0414ee1b6b959442cb36478d56c6e6b9bb2b04079a5048d9acc91a30" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" -"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" +"checksum autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e5f34df7a019573fb8bdc7e24a2bfebe51a2a1d6bfdbaeccedb3c41fc574727" +"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum cbindgen 0.6.7 (git+https://github.com/grovesNL/cbindgen?branch=associated-constants)" = "" -"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" +"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" @@ -1144,35 +1189,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" -"checksum d3d12 0.1.0 (git+https://github.com/gfx-rs/d3d12-rs.git?rev=ee01154)" = "" +"checksum d3d12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4fda5547c55c93b070d59108464bbfd7d9da9563b2ce78fceefc6430e972a420" "checksum derivative 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6073e9676dbebdddeabaeb63e3b7cefd23c86f5c41d381ee1237cc77b1079898" "checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a" "checksum downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "18df8ce4470c189d18aa926022da57544f31e154631eb4cfe796aea97051fe6c" -"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" -"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum gfx-backend-dx12 0.1.0 (git+https://github.com/gfx-rs/gfx)" = "" -"checksum gfx-backend-empty 0.1.0 (git+https://github.com/gfx-rs/gfx)" = "" -"checksum gfx-backend-metal 0.1.0 (git+https://github.com/gfx-rs/gfx)" = "" -"checksum gfx-backend-vulkan 0.1.0 (git+https://github.com/gfx-rs/gfx)" = "" -"checksum gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)" = "" +"checksum gfx-backend-dx12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c373f40998da0fd605a7a90ce8d775a8cbcb06558edc2ea9740df1db2077686" +"checksum gfx-backend-empty 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6bb068297aed95a014abaa01738986c2ed5d08c5f9f152c992300c415e9b917c" +"checksum gfx-backend-metal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68fa011e32280f7566bddbb736734291b685c812087c99bc848d6ac7ae3e0b7f" +"checksum gfx-backend-vulkan 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "982c618fd9ddeea7e68b2d872b9b6cf13024fc7d4033ba90f0e54ac0d33c798f" +"checksum gfx-hal 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "84c470bce77fcaaea6854858682a99026ff796b880b0ca30511593a6b2bc77c0" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" -"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" +"checksum libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)" = "023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum line_drawing 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" -"checksum metal 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8411e1b14691a658f4b285f980c98d1af1922dcf037ea4454288dc456ca0d1ed" -"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" +"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +"checksum metal 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7de9c2b83c946ab01c9942928388f911d93486b97636d9927541345905fea65d" +"checksum nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "921f61dc817b379d0834e45d5ec45beaacfae97082090a49c2cf30dcbc30206f" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9833ab0efe5361b1e2122a0544a5d3359576911a42cb098c2e59be8650807367" @@ -1182,7 +1227,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0015e9e8e28ee20c581cfbfe47c650cedeb9ed0721090e0b7ebb10b9cdbcc2" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" @@ -1190,18 +1237,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" -"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" -"checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" +"checksum rand 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3906503e80ac6cbcacb2c2973fa8e473f24d7e2747c8c92bb230c2441cad96b5" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_os 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f46fbd5550acf75b0c2730f5dd1873751daf9beb8f11b44027778fae50d7feca" "checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" -"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" -"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum range-alloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5927936723a9e8b715d37d7e4b390455087c4bdf25b9f702309460577b14f9" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" +"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rusttype 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "436c67ae0d0d24f14e1177c3ed96780ee16db82b405f0fba1bb80b46c9a30625" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" @@ -1209,41 +1259,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" +"checksum serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "0e732ed5a5592c17d961555e3b552985baf98d50ce418b7b655f31f6ba7eb1b7" "checksum serde_derive 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ac38f51a52a556cd17545798e29536885fb1a3fa63d6399f5ef650f4a7d35901" -"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" +"checksum serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "bdf540260cfee6da923831f4776ddc495ada940c30117977c70f1313a6130545" "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" "checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" -"checksum smithay-client-toolkit 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ef227bd9251cf8f8e54f8dd9a4b164307e515f5312cd632ebc87b56f723893a2" -"checksum spirv_cross 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc3aef2f7822a4fdd4174f547700f208bbc0f0871c59b754573717c92fd29f4" +"checksum smithay-client-toolkit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d858330eeed4efaf71c560555e2a6a0597d01b7d52685c3cc964ab1cc360f8c6" +"checksum spirv_cross 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c38f3b84da9c0439a5898f0697a07c8d59259b9d36c43e4fd5a9a01c38cd80a" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum stb_truetype 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "48fa7d3136d8645909de1f7c7eb5416cc43057a75ace08fc39ae736bc9da8af1" +"checksum stb_truetype 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71a7d260b43b6129a22dc341be18a231044ca67a48b7e32625f380cc5ec9ad70" "checksum storage-map 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cb94f167ccba0941876c8e722e888be8b4c05511ffdacc8cfcd4c647adfd424d" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" -"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" +"checksum syn 0.15.24 (registry+https://github.com/rust-lang/crates.io-index)" = "734ecc29cd36e8123850d9bf21dfd62ef8300aaa8f879aabaa899721808be37c" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" -"checksum toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "19782e145d5abefb03758958f06ea35f7b1d8421b534140e0238fd3d0bfd66e3" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" -"checksum wayland-client 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)" = "267d642a6e551e5af62a5e4fbfaab299221e6ddbd453b5985cfa84c835887679" -"checksum wayland-commons 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)" = "da95f98e6b8222cb0f248811ecd69ba6ebe243b737fd34020f7c73665bb4a3af" -"checksum wayland-protocols 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d20e951995113cdb8f32578c8402e619aa3d3e894f3ca334deb219abc1f6df" -"checksum wayland-scanner 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4f17846a40a19f7917f11c18a6c8c3b3a34b3ba09cb200d3e03503ebdfcbf3a7" -"checksum wayland-sys 0.21.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a0931c24c91e4e56c1119e4137e237df2ccc3696df94f64b1e2f61982d89cc32" +"checksum wayland-client 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cb4e519a7a979ddf97ee25c07830bd10b2c466b3b904b8ad4a05b4eee58c1a4e" +"checksum wayland-commons 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d985937818df10af90fe61bf8fc520fc6179539d972378b78be773694bb9f432" +"checksum wayland-protocols 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)" = "e634e68e5b759cb549410ae1f25aab3c77cdc8f861aed9d0e86c2bd74efcb086" +"checksum wayland-scanner 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)" = "1c8b867a824057b856790776e7cee37daf0435fc06543f2d96b2e37d15322e99" +"checksum wayland-sys 0.21.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6807f24ccb5b1a76a854fbd18160ae11cea64717b2f643d10810e5ef7fba2f59" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winit 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "27aa86a5723951d6a08c2acb9f10e25cb39ceb5b1987d7daf74e181b21f8f50b" +"checksum winit 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c57c15bd4c0ef18dff33e263e452abe32d00e2e05771cacaa410a14cc1c0776" "checksum x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39697e3123f715483d311b5826e254b6f3cfebdd83cf7ef3358f579c3d68e235" "checksum x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)" = "940586acb859ea05c53971ac231685799a7ec1dee66ac0bccc0e6ad96e06b4e3" "checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" diff --git a/examples/hello_triangle_rust/main.rs b/examples/hello_triangle_rust/main.rs index 4f63bf034..402c9d01f 100644 --- a/examples/hello_triangle_rust/main.rs +++ b/examples/hello_triangle_rust/main.rs @@ -28,15 +28,15 @@ fn main() { let fs_bytes = include_bytes!("./../data/hello_triangle.frag.spv"); let fs_module = device.create_shader_module(fs_bytes); - let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { - bindings: &[], - }); + let bind_group_layout = + device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { bindings: &[] }); let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { bind_group_layouts: &[&bind_group_layout], }); let blend_state0 = device.create_blend_state(&wgpu::BlendStateDescriptor::REPLACE); - let depth_stencil_state = device.create_depth_stencil_state(&wgpu::DepthStencilStateDescriptor::IGNORE); + let depth_stencil_state = + device.create_depth_stencil_state(&wgpu::DepthStencilStateDescriptor::IGNORE); let _render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { layout: &pipeline_layout, @@ -54,17 +54,13 @@ fn main() { ], primitive_topology: wgpu::PrimitiveTopology::TriangleList, attachments_state: wgpu::AttachmentsState { - color_attachments: &[ - wgpu::Attachment { - format: wgpu::TextureFormat::R8g8b8a8Unorm, - samples: 1, - }, - ], + color_attachments: &[wgpu::Attachment { + format: wgpu::TextureFormat::R8g8b8a8Unorm, + samples: 1, + }], depth_stencil_attachment: None, }, - blend_states: &[ - &blend_state0, - ], + blend_states: &[&blend_state0], depth_stencil_state: &depth_stencil_state, }); @@ -72,20 +68,17 @@ fn main() { { let rpass = cmd_buf.begin_render_pass(&wgpu::RenderPassDescriptor { - color_attachments: &[ - wgpu::RenderPassColorAttachmentDescriptor { - attachment: &color_view, - load_op: wgpu::LoadOp::Clear, - store_op: wgpu::StoreOp::Store, - clear_color: wgpu::Color::GREEN, - }, - ], + color_attachments: &[wgpu::RenderPassColorAttachmentDescriptor { + attachment: &color_view, + load_op: wgpu::LoadOp::Clear, + store_op: wgpu::StoreOp::Store, + clear_color: wgpu::Color::GREEN, + }], depth_stencil_attachment: None, }); rpass.end_pass(); } - let queue = device.get_queue(); queue.submit(&[cmd_buf]); } diff --git a/wgpu-bindings/Cargo.toml b/wgpu-bindings/Cargo.toml index c65a44564..c6ef77ba4 100644 --- a/wgpu-bindings/Cargo.toml +++ b/wgpu-bindings/Cargo.toml @@ -5,6 +5,7 @@ authors = [ "Dzmitry Malyshau ", "Joshua Groves ", ] +edition = "2018" [features] default = [] diff --git a/wgpu-native/Cargo.toml b/wgpu-native/Cargo.toml index 17352c0b0..9a0496e34 100644 --- a/wgpu-native/Cargo.toml +++ b/wgpu-native/Cargo.toml @@ -5,6 +5,7 @@ authors = [ "Dzmitry Malyshau ", "Joshua Groves ", ] +edition = "2018" [lib] crate-type = ["lib", "cdylib", "staticlib"] @@ -17,10 +18,10 @@ remote = [] bitflags = "1.0" lazy_static = "1.1.0" log = "0.4" -parking_lot = { version = "0.6" } -gfx-hal = { git = "https://github.com/gfx-rs/gfx" } # required by gfx-memory -gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx" } -gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", optional = true } -gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", optional = true } -gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", optional = true } +parking_lot = { version = "0.7" } +gfx-hal = "0.1.0" +gfx-backend-empty = "0.1.0" +gfx-backend-vulkan = { version = "0.1.0", optional = true } +gfx-backend-dx12 = { version = "0.1.0", optional = true } +gfx-backend-metal = { version = "0.1.0", optional = true } #rendy-memory = { git = "https://github.com/rustgd/rendy", rev = "ce7dd7f", features = ["gfx-hal"] } diff --git a/wgpu-native/src/binding_model.rs b/wgpu-native/src/binding_model.rs index 9aff6c431..47196517b 100644 --- a/wgpu-native/src/binding_model.rs +++ b/wgpu-native/src/binding_model.rs @@ -1,7 +1,6 @@ -use hal; - -use {BindGroupLayoutId, BufferId, SamplerId, TextureViewId}; +use crate::{BindGroupLayoutId, BufferId, SamplerId, TextureViewId}; +use bitflags::bitflags; bitflags! { #[repr(transparent)] diff --git a/wgpu-native/src/command/allocator.rs b/wgpu-native/src/command/allocator.rs index 79b830e1f..886e4a722 100644 --- a/wgpu-native/src/command/allocator.rs +++ b/wgpu-native/src/command/allocator.rs @@ -1,10 +1,10 @@ use super::CommandBuffer; -use {DeviceId, LifeGuard, Stored}; -use track::{Tracker}; +use crate::track::Tracker; +use crate::{DeviceId, LifeGuard, Stored}; use hal::command::RawCommandBuffer; use hal::pool::RawCommandPool; -use hal::{self, Device}; +use hal::Device; use std::collections::HashMap; //TODO: use `parking_lot::Mutex`? @@ -19,7 +19,7 @@ struct CommandPool { impl CommandPool { fn allocate(&mut self) -> B::CommandBuffer { if self.available.is_empty() { - let extra = self.raw.allocate(20, hal::command::RawLevel::Primary); + let extra = self.raw.allocate_vec(20, hal::command::RawLevel::Primary); self.available.extend(extra); } @@ -37,7 +37,9 @@ impl Inner { fn recycle(&mut self, cmd_buf: CommandBuffer) { let pool = self.pools.get_mut(&cmd_buf.recorded_thread_id).unwrap(); for mut raw in cmd_buf.raw { - raw.reset(false); + unsafe { + raw.reset(false); + } pool.available.push(raw); } self.fences.push(cmd_buf.fence); @@ -62,26 +64,29 @@ impl CommandAllocator { } pub(crate) fn allocate( - &self, device_id: Stored, device: &B::Device + &self, + device_id: Stored, + device: &B::Device, ) -> CommandBuffer { let thread_id = thread::current().id(); let mut inner = self.inner.lock().unwrap(); let fence = match inner.fences.pop() { Some(fence) => { - device.reset_fence(&fence).unwrap(); + unsafe { device.reset_fence(&fence).unwrap() }; fence } - None => { - device.create_fence(false).unwrap() - } + None => device.create_fence(false).unwrap(), }; let pool = inner.pools.entry(thread_id).or_insert_with(|| CommandPool { - raw: device.create_command_pool( - self.queue_family, - hal::pool::CommandPoolCreateFlags::RESET_INDIVIDUAL, - ).unwrap(), + raw: unsafe { + device.create_command_pool( + self.queue_family, + hal::pool::CommandPoolCreateFlags::RESET_INDIVIDUAL, + ) + } + .unwrap(), available: Vec::new(), }); let init = pool.allocate(); @@ -102,7 +107,7 @@ impl CommandAllocator { let pool = inner.pools.get_mut(&cmd_buf.recorded_thread_id).unwrap(); if pool.available.is_empty() { - let extra = pool.raw.allocate(20, hal::command::RawLevel::Primary); + let extra = pool.raw.allocate_vec(20, hal::command::RawLevel::Primary); pool.available.extend(extra); } @@ -120,7 +125,7 @@ impl CommandAllocator { pub fn maintain(&self, device: &B::Device) { let mut inner = self.inner.lock().unwrap(); for i in (0..inner.pending.len()).rev() { - if device.get_fence_status(&inner.pending[i].fence).unwrap() { + if unsafe { device.get_fence_status(&inner.pending[i].fence).unwrap() } { let cmd_buf = inner.pending.swap_remove(i); inner.recycle(cmd_buf); } diff --git a/wgpu-native/src/command/compute.rs b/wgpu-native/src/command/compute.rs index 54d8cbf01..477e29f31 100644 --- a/wgpu-native/src/command/compute.rs +++ b/wgpu-native/src/command/compute.rs @@ -1,15 +1,10 @@ -use registry::{HUB, Items}; -use { - Stored, - BindGroupId, CommandBufferId, ComputePassId, ComputePipelineId, -}; +use crate::registry::{Items, HUB}; +use crate::{BindGroupId, CommandBufferId, ComputePassId, ComputePipelineId, Stored}; -use hal; use hal::command::RawCommandBuffer; use std::iter; - pub struct ComputePass { raw: B::CommandBuffer, cmb_id: Stored, @@ -17,20 +12,13 @@ pub struct ComputePass { impl ComputePass { pub(crate) fn new(raw: B::CommandBuffer, cmb_id: Stored) -> Self { - ComputePass { - raw, - cmb_id, - } + ComputePass { raw, cmb_id } } } #[no_mangle] -pub extern "C" fn wgpu_compute_pass_end_pass( - pass_id: ComputePassId, -) -> CommandBufferId { - let pass = HUB.compute_passes - .write() - .take(pass_id); +pub extern "C" fn wgpu_compute_pass_end_pass(pass_id: ComputePassId) -> CommandBufferId { + let pass = HUB.compute_passes.write().take(pass_id); HUB.command_buffers .write() @@ -42,41 +30,48 @@ pub extern "C" fn wgpu_compute_pass_end_pass( #[no_mangle] pub extern "C" fn wgpu_compute_pass_set_bind_group( - pass_id: ComputePassId, index: u32, bind_group_id: BindGroupId, + pass_id: ComputePassId, + index: u32, + bind_group_id: BindGroupId, ) { let bind_group_guard = HUB.bind_groups.read(); let set = &bind_group_guard.get(bind_group_id).raw; let layout = unimplemented!(); // see https://github.com/gpuweb/gpuweb/pull/93 - HUB.compute_passes - .write() - .get_mut(pass_id) - .raw - .bind_compute_descriptor_sets(layout, index as usize, iter::once(set), &[]); + unsafe { + HUB.compute_passes + .write() + .get_mut(pass_id) + .raw + .bind_compute_descriptor_sets(layout, index as usize, iter::once(set), &[]); + } } #[no_mangle] pub extern "C" fn wgpu_compute_pass_set_pipeline( - pass_id: ComputePassId, pipeline_id: ComputePipelineId, + pass_id: ComputePassId, + pipeline_id: ComputePipelineId, ) { let pipeline_guard = HUB.compute_pipelines.read(); let pipeline = &pipeline_guard.get(pipeline_id).raw; - HUB.compute_passes - .write() - .get_mut(pass_id) - .raw - .bind_compute_pipeline(pipeline); + unsafe { + HUB.compute_passes + .write() + .get_mut(pass_id) + .raw + .bind_compute_pipeline(pipeline); + } } #[no_mangle] -pub extern "C" fn wgpu_compute_pass_dispatch( - pass_id: ComputePassId, x: u32, y: u32, z: u32, -) { - HUB.compute_passes - .write() - .get_mut(pass_id) - .raw - .dispatch([x, y, z]); +pub extern "C" fn wgpu_compute_pass_dispatch(pass_id: ComputePassId, x: u32, y: u32, z: u32) { + unsafe { + HUB.compute_passes + .write() + .get_mut(pass_id) + .raw + .dispatch([x, y, z]); + } } diff --git a/wgpu-native/src/command/mod.rs b/wgpu-native/src/command/mod.rs index a257862af..c8673fa75 100644 --- a/wgpu-native/src/command/mod.rs +++ b/wgpu-native/src/command/mod.rs @@ -6,22 +6,23 @@ pub(crate) use self::allocator::CommandAllocator; pub use self::compute::*; pub use self::render::*; -use hal::{self, Device}; use hal::command::RawCommandBuffer; +use hal::Device; -use { - B, Color, LifeGuard, Origin3d, Stored, BufferUsageFlags, TextureUsageFlags, WeaklyStored, - BufferId, CommandBufferId, ComputePassId, DeviceId, RenderPassId, TextureId, TextureViewId, +use crate::device::{FramebufferKey, RenderPassKey}; +use crate::registry::{Items, HUB}; +use crate::track::{BufferTracker, TextureTracker}; +use crate::{conv, resource}; +use crate::{ + BufferId, BufferUsageFlags, Color, CommandBufferId, ComputePassId, DeviceId, LifeGuard, + Origin3d, RenderPassId, Stored, TextureId, TextureUsageFlags, TextureViewId, WeaklyStored, B, }; -use {conv, resource}; -use device::{FramebufferKey, RenderPassKey}; -use registry::{HUB, Items}; -use track::{BufferTracker, TextureTracker}; use std::collections::hash_map::Entry; use std::ops::Range; use std::thread::ThreadId; +use log::trace; #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] @@ -105,9 +106,13 @@ impl CommandBuffer { let b = buffer_guard.get(id); trace!("transit {:?} {:?}", id, transit); hal::memory::Barrier::Buffer { - states: conv::map_buffer_state(transit.start) .. - conv::map_buffer_state(transit.end), + states: conv::map_buffer_state(transit.start)..conv::map_buffer_state(transit.end), target: &b.raw, + range: Range { + start: None, + end: None, + }, + families: None, } }); let texture_barriers = texture_iter.map(|(id, transit)| { @@ -115,18 +120,20 @@ impl CommandBuffer { trace!("transit {:?} {:?}", id, transit); let aspects = t.full_range.aspects; hal::memory::Barrier::Image { - states: conv::map_texture_state(transit.start, aspects) .. - conv::map_texture_state(transit.end, aspects), + states: conv::map_texture_state(transit.start, aspects) + ..conv::map_texture_state(transit.end, aspects), target: &t.raw, range: t.full_range.clone(), //TODO? + families: None, } }); - - raw.pipeline_barrier( - hal::pso::PipelineStage::TOP_OF_PIPE .. hal::pso::PipelineStage::BOTTOM_OF_PIPE, - hal::memory::Dependencies::empty(), - buffer_barriers.chain(texture_barriers), - ); + unsafe { + raw.pipeline_barrier( + hal::pso::PipelineStage::TOP_OF_PIPE..hal::pso::PipelineStage::BOTTOM_OF_PIPE, + hal::memory::Dependencies::empty(), + buffer_barriers.chain(texture_barriers), + ); + } } } @@ -145,10 +152,12 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( let view_guard = HUB.texture_views.read(); let mut current_comb = device.com_allocator.extend(cmb); - current_comb.begin( - hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, - hal::command::CommandBufferInheritanceInfo::default(), - ); + unsafe { + current_comb.begin( + hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, + hal::command::CommandBufferInheritanceInfo::default(), + ); + } let mut extent = None; let rp_key = { @@ -172,31 +181,29 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( samples: view.samples, ops: conv::map_load_store_ops(at.depth_load_op, at.depth_store_op), stencil_ops: conv::map_load_store_ops(at.stencil_load_op, at.stencil_store_op), - layouts: layout .. layout, + layouts: layout..layout, }) } None => None, }; - let color_keys = desc.color_attachments - .iter() - .map(|at| { - let view = view_guard.get(at.attachment); - if let Some(ex) = extent { - assert_eq!(ex, view.extent); - } else { - extent = Some(view.extent); - } - let query = tracker.query(&view.texture_id, TextureUsageFlags::empty()); - let (_, layout) = conv::map_texture_state(query.usage, hal::format::Aspects::COLOR); - hal::pass::Attachment { - format: Some(conv::map_texture_format(view.format)), - samples: view.samples, - ops: conv::map_load_store_ops(at.load_op, at.store_op), - stencil_ops: hal::pass::AttachmentOps::DONT_CARE, - layouts: layout .. layout, - } - }); + let color_keys = desc.color_attachments.iter().map(|at| { + let view = view_guard.get(at.attachment); + if let Some(ex) = extent { + assert_eq!(ex, view.extent); + } else { + extent = Some(view.extent); + } + let query = tracker.query(&view.texture_id, TextureUsageFlags::empty()); + let (_, layout) = conv::map_texture_state(query.usage, hal::format::Aspects::COLOR); + hal::pass::Attachment { + format: Some(conv::map_texture_format(view.format)), + samples: view.samples, + ops: conv::map_load_store_ops(at.load_op, at.store_op), + stencil_ops: hal::pass::AttachmentOps::DONT_CARE, + layouts: layout..layout, + } + }); RenderPassKey { attachments: color_keys.chain(depth_stencil_key).collect(), @@ -213,31 +220,40 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( (2, hal::image::Layout::ColorAttachmentOptimal), (3, hal::image::Layout::ColorAttachmentOptimal), ]; - let depth_id = (desc.color_attachments.len(), hal::image::Layout::DepthStencilAttachmentOptimal); + let depth_id = ( + desc.color_attachments.len(), + hal::image::Layout::DepthStencilAttachmentOptimal, + ); let subpass = hal::pass::SubpassDesc { - colors: &color_ids[.. desc.color_attachments.len()], + colors: &color_ids[..desc.color_attachments.len()], depth_stencil: desc.depth_stencil_attachment.as_ref().map(|_| &depth_id), inputs: &[], resolves: &[], preserves: &[], }; - let pass = device.raw.create_render_pass( - &e.key().attachments, - &[subpass], - &[], - ).unwrap(); + let pass = unsafe { + device + .raw + .create_render_pass(&e.key().attachments, &[subpass], &[]) + } + .unwrap(); e.insert(pass) } }; let mut framebuffer_cache = device.framebuffers.lock(); let fb_key = FramebufferKey { - attachments: desc.color_attachments + attachments: desc + .color_attachments .iter() .map(|at| WeaklyStored(at.attachment)) - .chain(desc.depth_stencil_attachment.as_ref().map(|at| WeaklyStored(at.attachment))) + .chain( + desc.depth_stencil_attachment + .as_ref() + .map(|at| WeaklyStored(at.attachment)), + ) .collect(), }; let framebuffer = match framebuffer_cache.entry(fb_key) { @@ -250,9 +266,12 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( .iter() .map(|&WeaklyStored(id)| &view_guard.get(id).raw); - device.raw - .create_framebuffer(&render_pass, attachments, extent.unwrap()) - .unwrap() + unsafe { + device + .raw + .create_framebuffer(&render_pass, attachments, extent.unwrap()) + } + .unwrap() }; e.insert(fb) } @@ -267,7 +286,8 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( h: ex.height as _, } }; - let clear_values = desc.color_attachments + let clear_values = desc + .color_attachments .iter() .map(|at| { //TODO: integer types? @@ -279,23 +299,23 @@ pub extern "C" fn wgpu_command_buffer_begin_render_pass( hal::command::ClearValueRaw::from(hal::command::ClearValue::DepthStencil(value)) })); - current_comb.begin_render_pass( - render_pass, - framebuffer, - rect, - clear_values, - hal::command::SubpassContents::Inline, - ); + unsafe { + current_comb.begin_render_pass( + render_pass, + framebuffer, + rect, + clear_values, + hal::command::SubpassContents::Inline, + ); + } - HUB.render_passes - .write() - .register(RenderPass::new( - current_comb, - Stored { - value: command_buffer_id, - ref_count: cmb.life_guard.ref_count.clone(), - }, - )) + HUB.render_passes.write().register(RenderPass::new( + current_comb, + Stored { + value: command_buffer_id, + ref_count: cmb.life_guard.ref_count.clone(), + }, + )) } #[no_mangle] diff --git a/wgpu-native/src/command/render.rs b/wgpu-native/src/command/render.rs index 231d7a5fe..4c9d8159c 100644 --- a/wgpu-native/src/command/render.rs +++ b/wgpu-native/src/command/render.rs @@ -1,14 +1,9 @@ -use registry::{HUB, Items}; -use track::{BufferTracker, TextureTracker}; -use { - CommandBuffer, Stored, - CommandBufferId, RenderPassId, -}; +use crate::registry::{Items, HUB}; +use crate::track::{BufferTracker, TextureTracker}; +use crate::{CommandBuffer, CommandBufferId, RenderPassId, Stored}; -use hal; use hal::command::RawCommandBuffer; - pub struct RenderPass { raw: B::CommandBuffer, cmb_id: Stored, @@ -17,10 +12,7 @@ pub struct RenderPass { } impl RenderPass { - pub(crate) fn new( - raw: B::CommandBuffer, - cmb_id: Stored, - ) -> Self { + pub(crate) fn new(raw: B::CommandBuffer, cmb_id: Stored) -> Self { RenderPass { raw, cmb_id, @@ -31,13 +23,11 @@ impl RenderPass { } #[no_mangle] -pub extern "C" fn wgpu_render_pass_end_pass( - pass_id: RenderPassId, -) -> CommandBufferId { - let mut pass = HUB.render_passes - .write() - .take(pass_id); - pass.raw.end_render_pass(); +pub extern "C" fn wgpu_render_pass_end_pass(pass_id: RenderPassId) -> CommandBufferId { + let mut pass = HUB.render_passes.write().take(pass_id); + unsafe { + pass.raw.end_render_pass(); + } let mut cmb_guard = HUB.command_buffers.write(); let cmb = cmb_guard.get_mut(pass.cmb_id.value); @@ -50,7 +40,7 @@ pub extern "C" fn wgpu_render_pass_end_pass( &*HUB.buffers.read(), &*HUB.textures.read(), ); - last.finish(); + unsafe { last.finish() }; } cmb.raw.push(pass.raw); diff --git a/wgpu-native/src/conv.rs b/wgpu-native/src/conv.rs index 415d980f0..0838f3a75 100644 --- a/wgpu-native/src/conv.rs +++ b/wgpu-native/src/conv.rs @@ -1,14 +1,11 @@ -use hal; - -use {Color, Extent3d, binding_model, command, pipeline, resource}; - +use crate::{binding_model, command, pipeline, resource, Color, Extent3d}; pub fn map_buffer_usage( usage: resource::BufferUsageFlags, ) -> (hal::buffer::Usage, hal::memory::Properties) { use hal::buffer::Usage as U; use hal::memory::Properties as P; - use resource::BufferUsageFlags as W; + use crate::resource::BufferUsageFlags as W; let mut hal_memory = P::empty(); if usage.contains(W::MAP_READ) { @@ -42,10 +39,11 @@ pub fn map_buffer_usage( } pub fn map_texture_usage( - usage: resource::TextureUsageFlags, aspects: hal::format::Aspects + usage: resource::TextureUsageFlags, + aspects: hal::format::Aspects, ) -> hal::image::Usage { use hal::image::Usage as U; - use resource::TextureUsageFlags as W; + use crate::resource::TextureUsageFlags as W; let mut value = U::empty(); if usage.contains(W::TRANSFER_SRC) { @@ -72,10 +70,8 @@ pub fn map_texture_usage( value } -pub fn map_binding_type( - binding_ty: binding_model::BindingType, -) -> hal::pso::DescriptorType { - use binding_model::BindingType::*; +pub fn map_binding_type(binding_ty: binding_model::BindingType) -> hal::pso::DescriptorType { + use crate::binding_model::BindingType::*; use hal::pso::DescriptorType as H; match binding_ty { UniformBuffer => H::UniformBuffer, @@ -88,7 +84,7 @@ pub fn map_binding_type( pub fn map_shader_stage_flags( shader_stage_flags: binding_model::ShaderStageFlags, ) -> hal::pso::ShaderStageFlags { - use binding_model::ShaderStageFlags as F; + use crate::binding_model::ShaderStageFlags as F; use hal::pso::ShaderStageFlags as H; let mut value = H::empty(); @@ -104,11 +100,9 @@ pub fn map_shader_stage_flags( value } -pub fn map_primitive_topology( - primitive_topology: pipeline::PrimitiveTopology, -) -> hal::Primitive { +pub fn map_primitive_topology(primitive_topology: pipeline::PrimitiveTopology) -> hal::Primitive { use hal::Primitive as H; - use pipeline::PrimitiveTopology::*; + use crate::pipeline::PrimitiveTopology::*; match primitive_topology { PointList => H::PointList, LineList => H::LineList, @@ -134,8 +128,8 @@ pub fn map_blend_state_descriptor( } fn map_color_write_flags(flags: pipeline::ColorWriteFlags) -> hal::pso::ColorMask { - use pipeline::ColorWriteFlags as F; use hal::pso::ColorMask as H; + use crate::pipeline::ColorWriteFlags as F; let mut value = H::empty(); if flags.contains(F::RED) { @@ -155,7 +149,7 @@ fn map_color_write_flags(flags: pipeline::ColorWriteFlags) -> hal::pso::ColorMas fn map_blend_descriptor(blend_desc: &pipeline::BlendDescriptor) -> hal::pso::BlendOp { use hal::pso::BlendOp as H; - use pipeline::BlendOperation::*; + use crate::pipeline::BlendOperation::*; match blend_desc.operation { Add => H::Add { src: map_blend_factor(blend_desc.src_factor), @@ -176,7 +170,7 @@ fn map_blend_descriptor(blend_desc: &pipeline::BlendDescriptor) -> hal::pso::Ble fn map_blend_factor(blend_factor: pipeline::BlendFactor) -> hal::pso::Factor { use hal::pso::Factor as H; - use pipeline::BlendFactor::*; + use crate::pipeline::BlendFactor::*; match blend_factor { Zero => H::Zero, One => H::One, @@ -230,7 +224,7 @@ fn map_stencil_face( fn map_compare_function(compare_function: resource::CompareFunction) -> hal::pso::Comparison { use hal::pso::Comparison as H; - use resource::CompareFunction::*; + use crate::resource::CompareFunction::*; match compare_function { Never => H::Never, Less => H::Less, @@ -245,7 +239,7 @@ fn map_compare_function(compare_function: resource::CompareFunction) -> hal::pso fn map_stencil_operation(stencil_operation: pipeline::StencilOperation) -> hal::pso::StencilOp { use hal::pso::StencilOp as H; - use pipeline::StencilOperation::*; + use crate::pipeline::StencilOperation::*; match stencil_operation { Keep => H::Keep, Zero => H::Zero, @@ -260,7 +254,7 @@ fn map_stencil_operation(stencil_operation: pipeline::StencilOperation) -> hal:: pub fn map_texture_format(texture_format: resource::TextureFormat) -> hal::format::Format { use hal::format::Format as H; - use resource::TextureFormat::*; + use crate::resource::TextureFormat::*; match texture_format { R8g8b8a8Unorm => H::Rgba8Unorm, R8g8b8a8Uint => H::Rgba8Uint, @@ -276,10 +270,14 @@ fn checked_u32_as_u16(value: u32) -> u16 { pub fn map_texture_dimension_size( dimension: resource::TextureDimension, - Extent3d { width, height, depth }: Extent3d, + Extent3d { + width, + height, + depth, + }: Extent3d, ) -> hal::image::Kind { use hal::image::Kind as H; - use resource::TextureDimension::*; + use crate::resource::TextureDimension::*; match dimension { D1 => { assert_eq!(height, 1); @@ -294,7 +292,7 @@ pub fn map_texture_view_dimension( dimension: resource::TextureViewDimension, ) -> hal::image::ViewKind { use hal::image::ViewKind as H; - use resource::TextureViewDimension::*; + use crate::resource::TextureViewDimension::*; match dimension { D1 => H::D1, D2 => H::D2, @@ -305,11 +303,9 @@ pub fn map_texture_view_dimension( } } -pub fn map_texture_aspect_flags( - aspect: resource::TextureAspectFlags -) -> hal::format::Aspects { - use resource::TextureAspectFlags as Taf; +pub fn map_texture_aspect_flags(aspect: resource::TextureAspectFlags) -> hal::format::Aspects { use hal::format::Aspects; + use crate::resource::TextureAspectFlags as Taf; let mut flags = Aspects::empty(); if aspect.contains(Taf::COLOR) { @@ -324,11 +320,9 @@ pub fn map_texture_aspect_flags( flags } -pub fn map_buffer_state( - usage: resource::BufferUsageFlags, -) -> hal::buffer::State { +pub fn map_buffer_state(usage: resource::BufferUsageFlags) -> hal::buffer::State { use hal::buffer::Access as A; - use resource::BufferUsageFlags as W; + use crate::resource::BufferUsageFlags as W; let mut access = A::empty(); if usage.contains(W::TRANSFER_SRC) { @@ -358,7 +352,7 @@ pub fn map_texture_state( aspects: hal::format::Aspects, ) -> hal::image::State { use hal::image::{Access as A, Layout as L}; - use resource::TextureUsageFlags as W; + use crate::resource::TextureUsageFlags as W; let is_color = aspects.contains(hal::format::Aspects::COLOR); let layout = match usage { @@ -386,13 +380,20 @@ pub fn map_texture_state( } if usage.contains(W::OUTPUT_ATTACHMENT) { //TODO: read-only attachments - access |= if is_color { A::COLOR_ATTACHMENT_WRITE } else { A::DEPTH_STENCIL_ATTACHMENT_WRITE }; + access |= if is_color { + A::COLOR_ATTACHMENT_WRITE + } else { + A::DEPTH_STENCIL_ATTACHMENT_WRITE + }; } (access, layout) } -pub fn map_load_store_ops(load: command::LoadOp, store: command::StoreOp) -> hal::pass::AttachmentOps { +pub fn map_load_store_ops( + load: command::LoadOp, + store: command::StoreOp, +) -> hal::pass::AttachmentOps { hal::pass::AttachmentOps { load: match load { command::LoadOp::Clear => hal::pass::AttachmentLoadOp::Clear, diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index 0aa17c29b..ea32968fe 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -1,12 +1,10 @@ -use {back, binding_model, command, conv, pipeline, resource}; -use registry::{HUB, Items}; -use track::{BufferTracker, TextureTracker}; -use { - CommandBuffer, LifeGuard, RefCount, Stored, SubmissionIndex, WeaklyStored, - TextureUsageFlags, - BindGroupLayoutId, BlendStateId, BufferId, CommandBufferId, DepthStencilStateId, - DeviceId, PipelineLayoutId, QueueId, RenderPipelineId, ShaderModuleId, - TextureId, TextureViewId, +use crate::registry::{Items, HUB}; +use crate::track::{BufferTracker, TextureTracker}; +use crate::{back, binding_model, command, conv, pipeline, resource}; +use crate::{ + BindGroupLayoutId, BlendStateId, BufferId, CommandBuffer, CommandBufferId, DepthStencilStateId, + DeviceId, LifeGuard, PipelineLayoutId, QueueId, RefCount, RenderPipelineId, ShaderModuleId, + Stored, SubmissionIndex, TextureId, TextureUsageFlags, TextureViewId, WeaklyStored, }; use hal::command::RawCommandBuffer; @@ -14,13 +12,12 @@ use hal::queue::RawCommandQueue; use hal::{self, Device as _Device}; //use rendy_memory::{allocator, Config, Heaps}; -use std::{ffi, slice}; use std::collections::hash_map::{Entry, HashMap}; +use std::{ffi, slice}; use parking_lot::Mutex; use std::sync::atomic::Ordering; - #[derive(Hash, PartialEq)] pub(crate) struct RenderPassKey { pub attachments: Vec, @@ -66,16 +63,16 @@ unsafe impl Sync for DestroyedResources {} impl DestroyedResources { fn add(&mut self, resource_id: ResourceId, life_guard: &LifeGuard) { - self.referenced.push((resource_id, life_guard.ref_count.clone())); + self.referenced + .push((resource_id, life_guard.ref_count.clone())); } - fn triage_referenced( - &mut self, buffer_guard: &mut Gb, texture_guard: &mut Gt, - ) where + fn triage_referenced(&mut self, buffer_guard: &mut Gb, texture_guard: &mut Gt) + where Gb: Items>, Gt: Items>, { - for i in (0 .. self.referenced.len()).rev() { + for i in (0..self.referenced.len()).rev() { // one in resource itself, and one here in this list let num_refs = self.referenced[i].1.load(); if num_refs <= 2 { @@ -93,7 +90,8 @@ impl DestroyedResources { (si, Resource::Texture(tex)) } }; - match self.active + match self + .active .iter_mut() .find(|af| af.submission_index == submit_index) { @@ -105,21 +103,21 @@ impl DestroyedResources { } fn cleanup(&mut self, raw: &B::Device) { - for i in (0 .. self.active.len()).rev() { - if raw.get_fence_status(&self.active[i].fence).unwrap() { + for i in (0..self.active.len()).rev() { + if unsafe { raw.get_fence_status(&self.active[i].fence) }.unwrap() { let af = self.active.swap_remove(i); self.free.extend(af.resources); - raw.destroy_fence(af.fence); + unsafe { raw.destroy_fence(af.fence) }; } } for resource in self.free.drain(..) { match resource { Resource::Buffer(buf) => { - raw.destroy_buffer(buf.raw); + unsafe { raw.destroy_buffer(buf.raw) }; } Resource::Texture(tex) => { - raw.destroy_image(tex.raw); + unsafe { raw.destroy_image(tex.raw) }; } } } @@ -193,7 +191,6 @@ pub(crate) struct ShaderModule { pub raw: B::ShaderModule, } - #[no_mangle] pub extern "C" fn wgpu_device_create_texture( device_id: DeviceId, @@ -205,9 +202,8 @@ pub extern "C" fn wgpu_device_create_texture( let usage = conv::map_texture_usage(desc.usage, aspects); let device_guard = HUB.devices.read(); let device = &device_guard.get(device_id); - let image_unbound = device - .raw - .create_image( + let mut image_unbound = unsafe { + device.raw.create_image( kind, 1, // TODO: mips format, @@ -215,53 +211,59 @@ pub extern "C" fn wgpu_device_create_texture( usage, hal::image::ViewCapabilities::empty(), // TODO: format, 2d array, cube ) - .unwrap(); - let image_req = device.raw.get_image_requirements(&image_unbound); + } + .unwrap(); + let image_req = unsafe { device.raw.get_image_requirements(&image_unbound) }; let device_type = device .mem_props .memory_types .iter() .enumerate() - .position(|(id, memory_type)| { // TODO + .position(|(id, memory_type)| { + // TODO image_req.type_mask & (1 << id) != 0 - && memory_type.properties.contains(hal::memory::Properties::DEVICE_LOCAL) + && memory_type + .properties + .contains(hal::memory::Properties::DEVICE_LOCAL) }) .unwrap() .into(); // TODO: allocate with rendy - let image_memory = device.raw.allocate_memory(device_type, image_req.size).unwrap(); - let bound_image = device - .raw - .bind_image_memory(&image_memory, 0, image_unbound) - .unwrap(); + let image_memory = unsafe { device.raw.allocate_memory(device_type, image_req.size) }.unwrap(); + unsafe { + device + .raw + .bind_image_memory(&image_memory, 0, &mut image_unbound) + } + .unwrap(); + let bound_image = image_unbound; //TODO: Maybe call this image the same way in the first place let full_range = hal::image::SubresourceRange { aspects, - levels: 0 .. 1, //TODO: mips - layers: 0 .. 1, //TODO + levels: 0..1, //TODO: mips + layers: 0..1, //TODO }; let life_guard = LifeGuard::new(); let ref_count = life_guard.ref_count.clone(); - let id = HUB.textures - .write() - .register(resource::Texture { - raw: bound_image, - device_id: Stored { - value: device_id, - ref_count: device.life_guard.ref_count.clone(), - }, - kind, - format: desc.format, - full_range, - life_guard, - }); - let query = device.texture_tracker - .lock() - .query( - &Stored { value: id, ref_count }, - TextureUsageFlags::WRITE_ALL, - ); + let id = HUB.textures.write().register(resource::Texture { + raw: bound_image, + device_id: Stored { + value: device_id, + ref_count: device.life_guard.ref_count.clone(), + }, + kind, + format: desc.format, + full_range, + life_guard, + }); + let query = device.texture_tracker.lock().query( + &Stored { + value: id, + ref_count, + }, + TextureUsageFlags::WRITE_ALL, + ); assert!(query.initialized); id @@ -275,42 +277,42 @@ pub extern "C" fn wgpu_texture_create_texture_view( let texture_guard = HUB.textures.read(); let texture = texture_guard.get(texture_id); - let raw = HUB.devices - .read() - .get(texture.device_id.value) - .raw - .create_image_view( - &texture.raw, - conv::map_texture_view_dimension(desc.dimension), - conv::map_texture_format(desc.format), - hal::format::Swizzle::NO, - hal::image::SubresourceRange { - aspects: conv::map_texture_aspect_flags(desc.aspect), - levels: desc.base_mip_level as u8 .. (desc.base_mip_level + desc.level_count) as u8, - layers: desc.base_array_layer as u16 .. (desc.base_array_layer + desc.array_count) as u16, - }, - ) - .unwrap(); + let raw = unsafe { + HUB.devices + .read() + .get(texture.device_id.value) + .raw + .create_image_view( + &texture.raw, + conv::map_texture_view_dimension(desc.dimension), + conv::map_texture_format(desc.format), + hal::format::Swizzle::NO, + hal::image::SubresourceRange { + aspects: conv::map_texture_aspect_flags(desc.aspect), + levels: desc.base_mip_level as u8 + ..(desc.base_mip_level + desc.level_count) as u8, + layers: desc.base_array_layer as u16 + ..(desc.base_array_layer + desc.array_count) as u16, + }, + ) + } + .unwrap(); - HUB.texture_views - .write() - .register(resource::TextureView { - raw, - texture_id: Stored { - value: texture_id, - ref_count: texture.life_guard.ref_count.clone(), - }, - format: texture.format, - extent: texture.kind.extent(), - samples: texture.kind.num_samples(), - life_guard: LifeGuard::new(), - }) + HUB.texture_views.write().register(resource::TextureView { + raw, + texture_id: Stored { + value: texture_id, + ref_count: texture.life_guard.ref_count.clone(), + }, + format: texture.format, + extent: texture.kind.extent(), + samples: texture.kind.num_samples(), + life_guard: LifeGuard::new(), + }) } #[no_mangle] -pub extern "C" fn wgpu_texture_create_default_texture_view( - texture_id: TextureId, -) -> TextureViewId { +pub extern "C" fn wgpu_texture_create_default_texture_view(texture_id: TextureId) -> TextureViewId { let texture_guard = HUB.textures.read(); let texture = texture_guard.get(texture_id); @@ -320,38 +322,36 @@ pub extern "C" fn wgpu_texture_create_default_texture_view( hal::image::Kind::D3(..) => hal::image::ViewKind::D3, }; - let raw = HUB.devices - .read() - .get(texture.device_id.value) - .raw - .create_image_view( - &texture.raw, - view_kind, - conv::map_texture_format(texture.format), - hal::format::Swizzle::NO, - texture.full_range.clone(), - ) - .unwrap(); + let raw = unsafe { + HUB.devices + .read() + .get(texture.device_id.value) + .raw + .create_image_view( + &texture.raw, + view_kind, + conv::map_texture_format(texture.format), + hal::format::Swizzle::NO, + texture.full_range.clone(), + ) + } + .unwrap(); - HUB.texture_views - .write() - .register(resource::TextureView { - raw, - texture_id: Stored { - value: texture_id, - ref_count: texture.life_guard.ref_count.clone(), - }, - format: texture.format, - extent: texture.kind.extent(), - samples: texture.kind.num_samples(), - life_guard: LifeGuard::new(), - }) + HUB.texture_views.write().register(resource::TextureView { + raw, + texture_id: Stored { + value: texture_id, + ref_count: texture.life_guard.ref_count.clone(), + }, + format: texture.format, + extent: texture.kind.extent(), + samples: texture.kind.num_samples(), + life_guard: LifeGuard::new(), + }) } #[no_mangle] -pub extern "C" fn wgpu_texture_destroy( - texture_id: TextureId, -) { +pub extern "C" fn wgpu_texture_destroy(texture_id: TextureId) { let texture_guard = HUB.textures.read(); let texture = texture_guard.get(texture_id); let device_guard = HUB.devices.write(); @@ -363,9 +363,7 @@ pub extern "C" fn wgpu_texture_destroy( } #[no_mangle] -pub extern "C" fn wgpu_texture_view_destroy( - _texture_view_id: TextureViewId, -) { +pub extern "C" fn wgpu_texture_view_destroy(_texture_view_id: TextureViewId) { unimplemented!() } @@ -376,23 +374,25 @@ pub extern "C" fn wgpu_device_create_bind_group_layout( ) -> BindGroupLayoutId { let bindings = unsafe { slice::from_raw_parts(desc.bindings, desc.bindings_length) }; - let descriptor_set_layout = HUB.devices - .read() - .get(device_id) - .raw - .create_descriptor_set_layout( - bindings.iter().map(|binding| { - hal::pso::DescriptorSetLayoutBinding { - binding: binding.binding, - ty: conv::map_binding_type(binding.ty), - count: bindings.len(), - stage_flags: conv::map_shader_stage_flags(binding.visibility), - immutable_samplers: false, // TODO - } - }), - &[], - ) - .unwrap(); + let descriptor_set_layout = unsafe { + HUB.devices + .read() + .get(device_id) + .raw + .create_descriptor_set_layout( + bindings.iter().map(|binding| { + hal::pso::DescriptorSetLayoutBinding { + binding: binding.binding, + ty: conv::map_binding_type(binding.ty), + count: bindings.len(), + stage_flags: conv::map_shader_stage_flags(binding.visibility), + immutable_samplers: false, // TODO + } + }), + &[], + ) + } + .unwrap(); HUB.bind_group_layouts .write() @@ -406,21 +406,22 @@ pub extern "C" fn wgpu_device_create_pipeline_layout( device_id: DeviceId, desc: &binding_model::PipelineLayoutDescriptor, ) -> PipelineLayoutId { - let bind_group_layouts = unsafe { - slice::from_raw_parts(desc.bind_group_layouts, desc.bind_group_layouts_length) - }; + let bind_group_layouts = + unsafe { slice::from_raw_parts(desc.bind_group_layouts, desc.bind_group_layouts_length) }; let bind_group_layout_guard = HUB.bind_group_layouts.read(); let descriptor_set_layouts = bind_group_layouts .iter() .map(|&id| &bind_group_layout_guard.get(id).raw); // TODO: push constants - let pipeline_layout = HUB.devices - .read() - .get(device_id) - .raw - .create_pipeline_layout(descriptor_set_layouts, &[]) - .unwrap(); + let pipeline_layout = unsafe { + HUB.devices + .read() + .get(device_id) + .raw + .create_pipeline_layout(descriptor_set_layouts, &[]) + } + .unwrap(); HUB.pipeline_layouts .write() @@ -434,11 +435,9 @@ pub extern "C" fn wgpu_device_create_blend_state( _device_id: DeviceId, desc: &pipeline::BlendStateDescriptor, ) -> BlendStateId { - HUB.blend_states - .write() - .register(pipeline::BlendState { - raw: conv::map_blend_state_descriptor(desc), - }) + HUB.blend_states.write().register(pipeline::BlendState { + raw: conv::map_blend_state_descriptor(desc), + }) } #[no_mangle] @@ -458,15 +457,15 @@ pub extern "C" fn wgpu_device_create_shader_module( device_id: DeviceId, desc: &pipeline::ShaderModuleDescriptor, ) -> ShaderModuleId { - let spv = unsafe { - slice::from_raw_parts(desc.code.bytes, desc.code.length) - }; - let shader = HUB.devices - .read() - .get(device_id) - .raw - .create_shader_module(spv) - .unwrap(); + let spv = unsafe { slice::from_raw_parts(desc.code.bytes, desc.code.length) }; + let shader = unsafe { + HUB.devices + .read() + .get(device_id) + .raw + .create_shader_module(spv) + } + .unwrap(); HUB.shader_modules .write() @@ -486,10 +485,12 @@ pub extern "C" fn wgpu_device_create_command_buffer( ref_count: device.life_guard.ref_count.clone(), }; let mut cmd_buf = device.com_allocator.allocate(dev_stored, &device.raw); - cmd_buf.raw.last_mut().unwrap().begin( - hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, - hal::command::CommandBufferInheritanceInfo::default(), - ); + unsafe { + cmd_buf.raw.last_mut().unwrap().begin( + hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, + hal::command::CommandBufferInheritanceInfo::default(), + ); + } HUB.command_buffers.write().register(cmd_buf) } @@ -510,13 +511,15 @@ pub extern "C" fn wgpu_queue_submit( let mut texture_tracker = device.texture_tracker.lock(); let mut command_buffer_guard = HUB.command_buffers.write(); - let command_buffer_ids = unsafe { - slice::from_raw_parts(command_buffer_ptr, command_buffer_count) - }; + let command_buffer_ids = + unsafe { slice::from_raw_parts(command_buffer_ptr, command_buffer_count) }; let mut buffer_guard = HUB.buffers.write(); let mut texture_guard = HUB.textures.write(); - let old_submit_index = device.life_guard.submission_index.fetch_add(1, Ordering::Relaxed); + let old_submit_index = device + .life_guard + .submission_index + .fetch_add(1, Ordering::Relaxed); //TODO: if multiple command buffers are submitted, we can re-use the last // native command buffer of the previous chain instead of always creating @@ -527,18 +530,28 @@ pub extern "C" fn wgpu_queue_submit( let comb = command_buffer_guard.get_mut(cmb_id); // update submission IDs for id in comb.buffer_tracker.used() { - buffer_guard.get(id).life_guard.submission_index.store(old_submit_index, Ordering::Release); + buffer_guard + .get(id) + .life_guard + .submission_index + .store(old_submit_index, Ordering::Release); } for id in comb.texture_tracker.used() { - texture_guard.get(id).life_guard.submission_index.store(old_submit_index, Ordering::Release); + texture_guard + .get(id) + .life_guard + .submission_index + .store(old_submit_index, Ordering::Release); } // execute resource transitions let mut transit = device.com_allocator.extend(comb); - transit.begin( - hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, - hal::command::CommandBufferInheritanceInfo::default(), - ); + unsafe { + transit.begin( + hal::command::CommandBufferFlags::ONE_TIME_SUBMIT, + hal::command::CommandBufferInheritanceInfo::default(), + ); + } //TODO: fix the consume CommandBuffer::insert_barriers( &mut transit, @@ -547,30 +560,31 @@ pub extern "C" fn wgpu_queue_submit( &*buffer_guard, &*texture_guard, ); - transit.finish(); + unsafe { + transit.finish(); + } comb.raw.insert(0, transit); - comb.raw - .last_mut() - .unwrap() - .finish(); + unsafe { + comb.raw.last_mut().unwrap().finish(); + } } // now prepare the GPU submission let fence = device.raw.create_fence(false).unwrap(); { - let submission = hal::queue::RawSubmission { - cmd_buffers: command_buffer_ids - .iter() - .flat_map(|&cmb_id| { - &command_buffer_guard.get(cmb_id).raw - }), - wait_semaphores: &[], - signal_semaphores: &[], - }; + let submission = + hal::queue::Submission::<_, _, &[::Semaphore]> { + //TODO: may `OneShot` be enough? + command_buffers: command_buffer_ids + .iter() + .flat_map(|&cmb_id| &command_buffer_guard.get(cmb_id).raw), + wait_semaphores: Vec::new(), + signal_semaphores: &[], + }; unsafe { device.queue_group.queues[0] .as_raw_mut() - .submit_raw(submission, Some(&fence)); + .submit(submission, Some(&fence)); } } @@ -622,22 +636,21 @@ pub extern "C" fn wgpu_device_create_render_pipeline( desc.attachments_state.color_attachments_length, ) }; - let depth_stencil_attachment = unsafe { - desc.attachments_state.depth_stencil_attachment.as_ref() - }; + let depth_stencil_attachment = + unsafe { desc.attachments_state.depth_stencil_attachment.as_ref() }; let color_keys = color_attachments.iter().map(|at| hal::pass::Attachment { format: Some(conv::map_texture_format(at.format)), samples: at.samples as u8, ops: op_keep, stencil_ops: hal::pass::AttachmentOps::DONT_CARE, - layouts: hal::image::Layout::General .. hal::image::Layout::General, + layouts: hal::image::Layout::General..hal::image::Layout::General, }); let depth_stencil_key = depth_stencil_attachment.map(|at| hal::pass::Attachment { format: Some(conv::map_texture_format(at.format)), samples: at.samples as u8, ops: op_keep, stencil_ops: op_keep, - layouts: hal::image::Layout::General .. hal::image::Layout::General, + layouts: hal::image::Layout::General..hal::image::Layout::General, }); RenderPassKey { attachments: color_keys.chain(depth_stencil_key).collect(), @@ -654,10 +667,13 @@ pub extern "C" fn wgpu_device_create_render_pipeline( (2, hal::image::Layout::ColorAttachmentOptimal), (3, hal::image::Layout::ColorAttachmentOptimal), ]; - let depth_id = (desc.attachments_state.color_attachments_length, hal::image::Layout::DepthStencilAttachmentOptimal); + let depth_id = ( + desc.attachments_state.color_attachments_length, + hal::image::Layout::DepthStencilAttachmentOptimal, + ); let subpass = hal::pass::SubpassDesc { - colors: &color_ids[.. desc.attachments_state.color_attachments_length], + colors: &color_ids[..desc.attachments_state.color_attachments_length], depth_stencil: if desc.attachments_state.depth_stencil_attachment.is_null() { None } else { @@ -668,11 +684,12 @@ pub extern "C" fn wgpu_device_create_render_pipeline( preserves: &[], }; - let pass = device.raw.create_render_pass( - &e.key().attachments, - &[subpass], - &[], - ).unwrap(); + let pass = unsafe { + device + .raw + .create_render_pass(&e.key().attachments, &[subpass], &[]) + } + .unwrap(); e.insert(pass) } }; @@ -735,10 +752,11 @@ pub extern "C" fn wgpu_device_create_render_pipeline( }; let blend_state_guard = HUB.blend_states.read(); - let blend_states = unsafe { slice::from_raw_parts(desc.blend_states, desc.blend_states_length) } - .iter() - .map(|id| blend_state_guard.get(id.clone()).raw) - .collect(); + let blend_states = + unsafe { slice::from_raw_parts(desc.blend_states, desc.blend_states_length) } + .iter() + .map(|id| blend_state_guard.get(id.clone()).raw) + .collect(); let blender = hal::pso::BlendDesc { logic_op: None, // TODO @@ -799,9 +817,7 @@ pub extern "C" fn wgpu_device_create_render_pipeline( }; // TODO: cache - let pipeline = device.raw - .create_graphics_pipeline(&pipeline_desc, None) - .unwrap(); + let pipeline = unsafe { device.raw.create_graphics_pipeline(&pipeline_desc, None) }.unwrap(); HUB.render_pipelines .write() diff --git a/wgpu-native/src/instance.rs b/wgpu-native/src/instance.rs index 922ff500e..2cba38c1e 100644 --- a/wgpu-native/src/instance.rs +++ b/wgpu-native/src/instance.rs @@ -1,7 +1,7 @@ -use hal::{self, Instance as _Instance, PhysicalDevice as _PhysicalDevice}; +use hal::{Instance as _Instance, PhysicalDevice as _PhysicalDevice}; -use registry::{HUB, Items}; -use {AdapterId, Device, DeviceId, InstanceId}; +use crate::registry::{Items, HUB}; +use crate::{AdapterId, Device, DeviceId, InstanceId}; #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] @@ -67,9 +67,7 @@ pub extern "C" fn wgpu_instance_get_adapter( PowerPreference::LowPower => low.or(high), PowerPreference::HighPerformance | PowerPreference::Default => high.or(low), }; - HUB.adapters - .write() - .register(some.or(other).unwrap()) + HUB.adapters.write().register(some.or(other).unwrap()) } #[no_mangle] diff --git a/wgpu-native/src/lib.rs b/wgpu-native/src/lib.rs index f90186e54..ef9b12399 100644 --- a/wgpu-native/src/lib.rs +++ b/wgpu-native/src/lib.rs @@ -1,11 +1,3 @@ -#[macro_use] -extern crate bitflags; -#[macro_use] -extern crate lazy_static; -#[macro_use] -extern crate log; -extern crate parking_lot; - #[cfg(feature = "gfx-backend-dx12")] extern crate gfx_backend_dx12 as back; #[cfg(not(any( @@ -40,12 +32,11 @@ pub use self::pipeline::*; pub use self::resource::*; use back::Backend as B; -pub use registry::Id; +pub use crate::registry::Id; use std::ptr; use std::sync::atomic::{AtomicUsize, Ordering}; - type SubmissionIndex = usize; #[derive(Debug)] @@ -109,7 +100,6 @@ struct WeaklyStored(T); unsafe impl Send for WeaklyStored {} unsafe impl Sync for WeaklyStored {} - #[repr(C)] #[derive(Clone, Copy, Debug)] pub struct Color { @@ -120,12 +110,42 @@ pub struct Color { } impl Color { - pub const TRANSPARENT : Self = Color { r: 0.0, g: 0.0, b: 0.0, a: 0.0 }; - pub const BLACK : Self = Color { r: 0.0, g: 0.0, b: 0.0, a: 1.0 }; - pub const WHITE : Self = Color { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }; - pub const RED : Self = Color { r: 1.0, g: 0.0, b: 0.0, a: 1.0 }; - pub const GREEN : Self = Color { r: 0.0, g: 1.0, b: 0.0, a: 1.0 }; - pub const BLUE : Self = Color { r: 0.0, g: 0.0, b: 1.0, a: 1.0 }; + pub const TRANSPARENT: Self = Color { + r: 0.0, + g: 0.0, + b: 0.0, + a: 0.0, + }; + pub const BLACK: Self = Color { + r: 0.0, + g: 0.0, + b: 0.0, + a: 1.0, + }; + pub const WHITE: Self = Color { + r: 1.0, + g: 1.0, + b: 1.0, + a: 1.0, + }; + pub const RED: Self = Color { + r: 1.0, + g: 0.0, + b: 0.0, + a: 1.0, + }; + pub const GREEN: Self = Color { + r: 0.0, + g: 1.0, + b: 0.0, + a: 1.0, + }; + pub const BLUE: Self = Color { + r: 0.0, + g: 0.0, + b: 1.0, + a: 1.0, + }; } #[repr(C)] diff --git a/wgpu-native/src/pipeline.rs b/wgpu-native/src/pipeline.rs index 7e98b95d3..eb918fd40 100644 --- a/wgpu-native/src/pipeline.rs +++ b/wgpu-native/src/pipeline.rs @@ -1,10 +1,8 @@ -use hal; -use resource; +use crate::resource; -use { - BlendStateId, ByteArray, DepthStencilStateId, PipelineLayoutId, - ShaderModuleId, -}; +use crate::{BlendStateId, ByteArray, DepthStencilStateId, PipelineLayoutId, ShaderModuleId}; + +use bitflags::bitflags; #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] diff --git a/wgpu-native/src/registry/local.rs b/wgpu-native/src/registry/local.rs index 6f7b26395..7c14aeb75 100644 --- a/wgpu-native/src/registry/local.rs +++ b/wgpu-native/src/registry/local.rs @@ -1,7 +1,6 @@ use std::marker::PhantomData; use std::os::raw::c_void; - pub type Id = *mut c_void; pub struct Items { diff --git a/wgpu-native/src/registry/mod.rs b/wgpu-native/src/registry/mod.rs index caa9801f5..5028ee6ff 100644 --- a/wgpu-native/src/registry/mod.rs +++ b/wgpu-native/src/registry/mod.rs @@ -2,14 +2,14 @@ use std::sync::Arc; use parking_lot::RwLock; -use { - AdapterHandle, BindGroupLayoutHandle, BindGroupHandle, - BlendStateHandle, CommandBufferHandle, DepthStencilStateHandle, DeviceHandle, InstanceHandle, - RenderPassHandle, ComputePassHandle, - PipelineLayoutHandle, RenderPipelineHandle, ComputePipelineHandle, ShaderModuleHandle, - BufferHandle, TextureHandle, TextureViewHandle, -}; +use lazy_static::lazy_static; +use crate::{ + AdapterHandle, BindGroupHandle, BindGroupLayoutHandle, BlendStateHandle, BufferHandle, + CommandBufferHandle, ComputePassHandle, ComputePipelineHandle, DepthStencilStateHandle, + DeviceHandle, InstanceHandle, PipelineLayoutHandle, RenderPassHandle, RenderPipelineHandle, + ShaderModuleHandle, TextureHandle, TextureViewHandle, +}; #[cfg(not(feature = "remote"))] mod local; @@ -21,7 +21,6 @@ pub use self::local::{Id, Items as ConcreteItems}; #[cfg(feature = "remote")] pub use self::remote::{Id, Items as ConcreteItems}; - pub trait Items: Default { fn register(&mut self, handle: T) -> Id; fn get(&self, id: Id) -> &T; diff --git a/wgpu-native/src/registry/remote.rs b/wgpu-native/src/registry/remote.rs index e3c0fde30..b1c2222b9 100644 --- a/wgpu-native/src/registry/remote.rs +++ b/wgpu-native/src/registry/remote.rs @@ -1,6 +1,5 @@ use hal::backend::FastHashMap; - pub type Id = u32; pub struct Items { diff --git a/wgpu-native/src/resource.rs b/wgpu-native/src/resource.rs index bfe0903e6..2677625d4 100644 --- a/wgpu-native/src/resource.rs +++ b/wgpu-native/src/resource.rs @@ -1,10 +1,6 @@ -use { - Extent3d, LifeGuard, Stored, - DeviceId, TextureId, -}; - -use hal; +use crate::{DeviceId, Extent3d, LifeGuard, Stored, TextureId}; +use bitflags::bitflags; bitflags! { #[repr(transparent)] @@ -36,7 +32,6 @@ pub(crate) struct Buffer { // TODO: mapping, unmap() } - #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] pub enum TextureDimension { @@ -86,7 +81,6 @@ pub(crate) struct Texture { pub life_guard: LifeGuard, } - bitflags! { #[repr(transparent)] pub struct TextureAspectFlags: u32 { @@ -127,7 +121,6 @@ pub(crate) struct TextureView { pub life_guard: LifeGuard, } - #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] pub enum AddressMode { diff --git a/wgpu-native/src/track.rs b/wgpu-native/src/track.rs index afa585749..9327509c9 100644 --- a/wgpu-native/src/track.rs +++ b/wgpu-native/src/track.rs @@ -1,11 +1,12 @@ -use {RefCount, Stored, WeaklyStored, BufferId, TextureId}; -use resource::{BufferUsageFlags, TextureUsageFlags}; +use crate::resource::{BufferUsageFlags, TextureUsageFlags}; +use crate::{BufferId, RefCount, Stored, TextureId, WeaklyStored}; use std::collections::hash_map::{Entry, HashMap}; use std::hash::Hash; use std::mem; use std::ops::{BitOr, Range}; +use bitflags::bitflags; #[derive(Clone, Debug, PartialEq)] #[allow(unused)] @@ -29,7 +30,6 @@ bitflags! { } } - pub trait GenericUsage { fn is_exclusive(&self) -> bool; } @@ -61,10 +61,7 @@ pub struct Tracker { pub type BufferTracker = Tracker; pub type TextureTracker = Tracker; -impl< - I: Clone + Hash + Eq, - U: Copy + GenericUsage + BitOr + PartialEq, -> Tracker { +impl + PartialEq> Tracker { pub(crate) fn new() -> Self { Tracker { map: HashMap::new(), @@ -72,9 +69,7 @@ impl< } /// Get the last usage on a resource. - pub(crate) fn query( - &mut self, stored: &Stored, default: U - ) -> Query { + pub(crate) fn query(&mut self, stored: &Stored, default: U) -> Query { match self.map.entry(WeaklyStored(stored.value.clone())) { Entry::Vacant(e) => { e.insert(Track { @@ -87,18 +82,20 @@ impl< initialized: true, } } - Entry::Occupied(e) => { - Query { - usage: e.get().last, - initialized: false, - } - } + Entry::Occupied(e) => Query { + usage: e.get().last, + initialized: false, + }, } } /// Transit a specified resource into a different usage. pub(crate) fn transit( - &mut self, id: I, ref_count: &RefCount, usage: U, permit: TrackPermit + &mut self, + id: I, + ref_count: &RefCount, + usage: U, + permit: TrackPermit, ) -> Result, U> { match self.map.entry(WeaklyStored(id)) { Entry::Vacant(e) => { @@ -127,12 +124,9 @@ impl< } /// Consume another tacker, adding it's transitions to `self`. - pub fn consume<'a>( - &'a mut self, other: &'a Self - ) -> impl 'a + Iterator)> { - other.map - .iter() - .flat_map(move |(id, new)| match self.map.entry(WeaklyStored(id.0.clone())) { + pub fn consume<'a>(&'a mut self, other: &'a Self) -> impl 'a + Iterator)> { + other.map.iter().flat_map(move |(id, new)| { + match self.map.entry(WeaklyStored(id.0.clone())) { Entry::Vacant(e) => { e.insert(new.clone()); None @@ -142,10 +136,11 @@ impl< if old == new.init { None } else { - Some((id.0.clone(), old .. new.last)) + Some((id.0.clone(), old..new.last)) } } - }) + } + }) } /// Return an iterator over used resources keys. diff --git a/wgpu-rs/Cargo.toml b/wgpu-rs/Cargo.toml index 90880b795..3a64e84e2 100644 --- a/wgpu-rs/Cargo.toml +++ b/wgpu-rs/Cargo.toml @@ -5,6 +5,7 @@ authors = [ "Dzmitry Malyshau ", "Joshua Groves ", ] +edition = "2018" [lib] diff --git a/wgpu-rs/src/lib.rs b/wgpu-rs/src/lib.rs index 738d0f181..f74343620 100644 --- a/wgpu-rs/src/lib.rs +++ b/wgpu-rs/src/lib.rs @@ -1,5 +1,5 @@ -extern crate wgpu_native as wgn; extern crate arrayvec; +extern crate wgpu_native as wgn; use arrayvec::ArrayVec; @@ -7,16 +7,14 @@ use std::ffi::CString; use std::ptr; pub use wgn::{ - AdapterDescriptor, Color, CommandBufferDescriptor, DeviceDescriptor, Extensions, Extent3d, - Origin3d, PowerPreference, ShaderModuleDescriptor, ShaderStage, ShaderStageFlags, - BindGroupLayoutBinding, BindingType, TextureDimension, TextureDescriptor, TextureFormat, - TextureUsageFlags, TextureViewDescriptor, - PrimitiveTopology, BlendStateDescriptor, ColorWriteFlags, DepthStencilStateDescriptor, - RenderPassDescriptor, RenderPassColorAttachmentDescriptor, RenderPassDepthStencilAttachmentDescriptor, - Attachment, LoadOp, StoreOp, + AdapterDescriptor, Attachment, BindGroupLayoutBinding, BindingType, BlendStateDescriptor, + Color, ColorWriteFlags, CommandBufferDescriptor, DepthStencilStateDescriptor, DeviceDescriptor, + Extensions, Extent3d, LoadOp, Origin3d, PowerPreference, PrimitiveTopology, + RenderPassColorAttachmentDescriptor, RenderPassDepthStencilAttachmentDescriptor, + RenderPassDescriptor, ShaderModuleDescriptor, ShaderStage, ShaderStageFlags, StoreOp, + TextureDescriptor, TextureDimension, TextureFormat, TextureUsageFlags, TextureViewDescriptor, }; - pub struct Instance { id: wgn::InstanceId, } @@ -115,7 +113,6 @@ pub struct RenderPipelineDescriptor<'a> { pub depth_stencil_state: &'a DepthStencilState, } - impl Instance { pub fn new() -> Self { Instance { @@ -165,24 +162,31 @@ impl Device { pub fn create_bind_group_layout(&self, desc: &BindGroupLayoutDescriptor) -> BindGroupLayout { BindGroupLayout { - id: wgn::wgpu_device_create_bind_group_layout(self.id, &wgn::BindGroupLayoutDescriptor { - bindings: desc.bindings.as_ptr(), - bindings_length: desc.bindings.len(), - }), + id: wgn::wgpu_device_create_bind_group_layout( + self.id, + &wgn::BindGroupLayoutDescriptor { + bindings: desc.bindings.as_ptr(), + bindings_length: desc.bindings.len(), + }, + ), } } pub fn create_pipeline_layout(&self, desc: &PipelineLayoutDescriptor) -> PipelineLayout { //TODO: avoid allocation here - let temp_layouts = desc.bind_group_layouts + let temp_layouts = desc + .bind_group_layouts .iter() .map(|bgl| bgl.id) .collect::>(); PipelineLayout { - id: wgn::wgpu_device_create_pipeline_layout(self.id, &wgn::PipelineLayoutDescriptor { - bind_group_layouts: temp_layouts.as_ptr(), - bind_group_layouts_length: temp_layouts.len(), - }), + id: wgn::wgpu_device_create_pipeline_layout( + self.id, + &wgn::PipelineLayoutDescriptor { + bind_group_layouts: temp_layouts.as_ptr(), + bind_group_layouts_length: temp_layouts.len(), + }, + ), } } @@ -192,18 +196,23 @@ impl Device { } } - pub fn create_depth_stencil_state(&self, desc: &DepthStencilStateDescriptor) -> DepthStencilState { + pub fn create_depth_stencil_state( + &self, + desc: &DepthStencilStateDescriptor, + ) -> DepthStencilState { DepthStencilState { id: wgn::wgpu_device_create_depth_stencil_state(self.id, desc), } } pub fn create_render_pipeline(&self, desc: &RenderPipelineDescriptor) -> RenderPipeline { - let entry_points = desc.stages + let entry_points = desc + .stages .iter() .map(|ps| CString::new(ps.entry_point).unwrap()) .collect::>(); - let stages = desc.stages + let stages = desc + .stages .iter() .zip(&entry_points) .map(|(ps, ep_name)| wgn::PipelineStageDescriptor { @@ -213,26 +222,31 @@ impl Device { }) .collect::>(); - let temp_blend_states = desc.blend_states - .iter() - .map(|bs| bs.id) - .collect::>(); + let temp_blend_states = desc.blend_states.iter().map(|bs| bs.id).collect::>(); RenderPipeline { - id: wgn::wgpu_device_create_render_pipeline(self.id, &wgn::RenderPipelineDescriptor { - layout: desc.layout.id, - stages: stages.as_ptr(), - stages_length: stages.len(), - primitive_topology: desc.primitive_topology, - attachments_state: wgn::AttachmentsState { - color_attachments: desc.attachments_state.color_attachments.as_ptr(), - color_attachments_length: desc.attachments_state.color_attachments.len(), - depth_stencil_attachment: desc.attachments_state.depth_stencil_attachment.as_ref().map(|at| at as *const _).unwrap_or(ptr::null()), + id: wgn::wgpu_device_create_render_pipeline( + self.id, + &wgn::RenderPipelineDescriptor { + layout: desc.layout.id, + stages: stages.as_ptr(), + stages_length: stages.len(), + primitive_topology: desc.primitive_topology, + attachments_state: wgn::AttachmentsState { + color_attachments: desc.attachments_state.color_attachments.as_ptr(), + color_attachments_length: desc.attachments_state.color_attachments.len(), + depth_stencil_attachment: desc + .attachments_state + .depth_stencil_attachment + .as_ref() + .map(|at| at as *const _) + .unwrap_or(ptr::null()), + }, + blend_states: temp_blend_states.as_ptr(), + blend_states_length: temp_blend_states.len(), + depth_stencil_state: desc.depth_stencil_state.id, }, - blend_states: temp_blend_states.as_ptr(), - blend_states_length: temp_blend_states.len(), - depth_stencil_state: desc.depth_stencil_state.id, - }), + ), } } @@ -259,7 +273,8 @@ impl Texture { impl CommandBuffer { pub fn begin_render_pass(&mut self, desc: &RenderPassDescriptor<&TextureView>) -> RenderPass { - let colors = desc.color_attachments + let colors = desc + .color_attachments .iter() .map(|ca| RenderPassColorAttachmentDescriptor { attachment: ca.attachment.id, @@ -269,9 +284,8 @@ impl CommandBuffer { }) .collect::>(); - let depth_stencil = desc.depth_stencil_attachment - .as_ref() - .map(|dsa| RenderPassDepthStencilAttachmentDescriptor { + let depth_stencil = desc.depth_stencil_attachment.as_ref().map(|dsa| { + RenderPassDepthStencilAttachmentDescriptor { attachment: dsa.attachment.id, depth_load_op: dsa.depth_load_op, depth_store_op: dsa.depth_store_op, @@ -279,13 +293,17 @@ impl CommandBuffer { stencil_load_op: dsa.stencil_load_op, stencil_store_op: dsa.stencil_store_op, clear_stencil: dsa.clear_stencil, - }); + } + }); RenderPass { - id: wgn::wgpu_command_buffer_begin_render_pass(self.id, RenderPassDescriptor { - color_attachments: &colors, - depth_stencil_attachment: depth_stencil, - }), + id: wgn::wgpu_command_buffer_begin_render_pass( + self.id, + RenderPassDescriptor { + color_attachments: &colors, + depth_stencil_attachment: depth_stencil, + }, + ), parent: self, } }