diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 164e243d1..662eb9990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,14 @@ jobs: runs-on: ubuntu-18.04 env: TARGET: aarch64-linux-android + PKG_CONFIG_ALLOW_CROSS: 1 steps: - uses: actions/checkout@v2 - - name: Install NDK - run: echo "$ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH + - name: Prepare + run: | + sudo apt-get update -y -qq + sudo apt-get install -y -qq libegl1-mesa-dev + echo "$ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH - run: rustup component add clippy - run: rustup target add ${{ env.TARGET }} - run: cargo clippy --target ${{ env.TARGET }} @@ -45,40 +49,44 @@ jobs: - name: MacOS Stable channel: stable os: macos-10.15 - build_command: cargo clippy + prepare_command: additional_core_features: trace additional_player_features: winit - name: MacOS Nightly os: macos-10.15 channel: nightly - build_command: cargo test -- --nocapture + prepare_command: additional_core_features: additional_player_features: - name: Ubuntu Stable os: ubuntu-18.04 channel: stable - build_command: cargo clippy + prepare_command: | + sudo apt-get update -y -qq + sudo apt-get install -y -qq libegl1-mesa-dev additional_core_features: trace,replay additional_player_features: - name: Ubuntu Nightly os: ubuntu-18.04 channel: nightly - build_command: | - sudo add-apt-repository ppa:oibaf/graphics-drivers; - sudo apt-get install mesa-vulkan-drivers; - cargo test -- --nocapture; + prepare_command: | + sudo apt-get update -y -qq + echo "Installing EGL" + sudo apt-get install -y -qq libegl1-mesa-dev + echo "Installing Vulkan" + sudo apt-get install -y -qq mesa-vulkan-drivers additional_core_features: serial-pass additional_player_features: winit - name: Windows Stable os: windows-2019 channel: stable - build_command: rustup default stable-msvc; cargo clippy + prepare_command: rustup default stable-msvc additional_core_features: trace,serial-pass additional_player_features: renderdoc - name: Windows Nightly os: windows-2019 channel: nightly - build_command: rustup default nightly-msvc; cargo test -- --nocapture + prepare_command: rustup default nightly-msvc additional_core_features: additional_player_features: steps: @@ -91,6 +99,9 @@ jobs: override: true - if: matrix.channel == 'stable' run: rustup component add clippy + # prepare + - if: matrix.prepare_command != '' + run: ${{ matrix.prepare_command }} # build with no features first - if: matrix.additional_core_features == '' run: cargo check --manifest-path wgpu-core/Cargo.toml --no-default-features @@ -98,4 +109,7 @@ jobs: run: cargo check --manifest-path wgpu-core/Cargo.toml --features ${{ matrix.additional_core_features }} - if: matrix.additional_player_features != '' run: cargo check --manifest-path player/Cargo.toml --features ${{ matrix.additional_player_features }} - - run: ${{ matrix.build_command }} + - if: matrix.channel == 'stable' + run: cargo clippy + - if: matrix.channel == 'nightly' + run: cargo test -- --nocapture diff --git a/Cargo.lock b/Cargo.lock index 47eaac07d..581d27072 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,20 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" - [[package]] name = "ahash" version = "0.4.6" @@ -44,12 +29,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "android_glue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" - [[package]] name = "android_log-sys" version = "0.1.2" @@ -99,7 +78,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", - "libc", + "libc 0.2.80", "winapi 0.3.9", ] @@ -109,20 +88,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -[[package]] -name = "backtrace" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" -dependencies = [ - "addr2line", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.12.3" @@ -206,22 +171,13 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" -[[package]] -name = "cgl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" -dependencies = [ - "libc", -] - [[package]] name = "chrono" version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ - "libc", + "libc 0.2.80", "num-integer", "num-traits", "time", @@ -246,36 +202,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "cocoa" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54" -dependencies = [ - "bitflags", - "block", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29f7768b2d1be17b96158e3285951d366b40211320fb30826a76cb7a0da6400" -dependencies = [ - "bitflags", - "block", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "foreign-types", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.20.2" @@ -285,9 +211,9 @@ dependencies = [ "bitflags", "block", "core-foundation 0.7.0", - "core-graphics 0.19.2", + "core-graphics", "foreign-types", - "libc", + "libc 0.2.80", "objc", ] @@ -302,7 +228,7 @@ dependencies = [ "core-foundation 0.9.1", "core-graphics-types", "foreign-types", - "libc", + "libc 0.2.80", "objc", ] @@ -312,16 +238,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" -[[package]] -name = "core-foundation" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -dependencies = [ - "core-foundation-sys 0.6.2", - "libc", -] - [[package]] name = "core-foundation" version = "0.7.0" @@ -329,7 +245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ "core-foundation-sys 0.7.0", - "libc", + "libc 0.2.80", ] [[package]] @@ -339,15 +255,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" dependencies = [ "core-foundation-sys 0.8.2", - "libc", + "libc 0.2.80", ] -[[package]] -name = "core-foundation-sys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" - [[package]] name = "core-foundation-sys" version = "0.7.0" @@ -360,18 +270,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" -[[package]] -name = "core-graphics" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" -dependencies = [ - "bitflags", - "core-foundation 0.6.4", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics" version = "0.19.2" @@ -381,7 +279,7 @@ dependencies = [ "bitflags", "core-foundation 0.7.0", "foreign-types", - "libc", + "libc 0.2.80", ] [[package]] @@ -393,7 +291,7 @@ dependencies = [ "bitflags", "core-foundation 0.9.1", "foreign-types", - "libc", + "libc 0.2.80", ] [[package]] @@ -404,8 +302,8 @@ checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" dependencies = [ "cfg-if 0.1.10", "core-foundation-sys 0.7.0", - "core-graphics 0.19.2", - "libc", + "core-graphics", + "libc 0.2.80", "objc", ] @@ -437,18 +335,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "display-link" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303de632386f9c82eb7823456f5932bd40b4de9521078901767bf16a9f331491" -dependencies = [ - "foreign-types", - "objc", - "objc-foundation", - "time-point", -] - [[package]] name = "dlib" version = "0.4.2" @@ -484,15 +370,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "euclid" -version = "0.20.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad" -dependencies = [ - "num-traits", -] - [[package]] name = "fixedbitset" version = "0.2.0" @@ -555,7 +432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" dependencies = [ "cc", - "libc", + "libc 0.2.80", "log", "rustc_version", "winapi 0.3.9", @@ -563,9 +440,8 @@ dependencies = [ [[package]] name = "gfx-auxil" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cd956b592970f08545b9325b87580eb95a51843b6f39da27b8667fec1a1216" +version = "0.5.0" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "fxhash", "gfx-hal", @@ -574,9 +450,8 @@ dependencies = [ [[package]] name = "gfx-backend-dx11" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b0c3b8b2e0a60c1380a7c27652cd86b791e5d8312fb9592a7a59bd437e9532" +version = "0.6.0" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "arrayvec", "bitflags", @@ -587,7 +462,7 @@ dependencies = [ "parking_lot 0.11.0", "range-alloc", "raw-window-handle", - "smallvec 1.4.2", + "smallvec", "spirv_cross", "thunderdome", "winapi 0.3.9", @@ -596,9 +471,8 @@ dependencies = [ [[package]] name = "gfx-backend-dx12" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375014deed24d76b03604736dd899f0925158a1a96db90cbefb9cce070f71af7" +version = "0.6.2" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "arrayvec", "bit-set", @@ -607,9 +481,10 @@ dependencies = [ "gfx-auxil", "gfx-hal", "log", + "parking_lot 0.11.0", "range-alloc", "raw-window-handle", - "smallvec 1.4.2", + "smallvec", "spirv_cross", "winapi 0.3.9", ] @@ -617,8 +492,7 @@ dependencies = [ [[package]] name = "gfx-backend-empty" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2085227c12b78f6657a900c829f2d0deb46a9be3eaf86844fde263cdc218f77c" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "gfx-hal", "log", @@ -627,33 +501,30 @@ dependencies = [ [[package]] name = "gfx-backend-gl" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ff8f4774c8c123b2faa0bdd59ed9152be0e43448063fa5db392ff09b0e9d1" +version = "0.6.0" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "arrayvec", "bitflags", - "cfg_aliases", "gfx-auxil", "gfx-hal", "glow", "js-sys", + "khronos-egl", "lazy_static", "log", "parking_lot 0.11.0", "raw-window-handle", - "smallvec 1.4.2", + "smallvec", "spirv_cross", - "surfman", "wasm-bindgen", "web-sys", ] [[package]] name = "gfx-backend-metal" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ba1c77c112e7d35786dbd49ed26f2a76ce53a44bc09fe964935e4e35ed7f2b" +version = "0.6.0" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "arrayvec", "bitflags", @@ -665,12 +536,11 @@ dependencies = [ "gfx-hal", "lazy_static", "log", - "metal 0.20.0", + "metal", "objc", "parking_lot 0.11.0", "range-alloc", "raw-window-handle", - "smallvec 1.4.2", "spirv_cross", "storage-map", ] @@ -678,8 +548,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3a63cf61067a09b7d1ac480af3cb2ae0c5ede5bed294607bbd814cb1666c45" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "arrayvec", "ash", @@ -691,58 +560,19 @@ dependencies = [ "log", "objc", "raw-window-handle", - "smallvec 1.4.2", + "smallvec", "winapi 0.3.9", - "x11", ] [[package]] name = "gfx-hal" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d0754f5b7a43915fd7466883b2d1bb0800d7cc4609178d0b27bf143b9e5123" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" dependencies = [ "bitflags", "raw-window-handle", ] -[[package]] -name = "gimli" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" - -[[package]] -name = "gl_generator" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] -name = "gleam" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea4f9ba7411ae3f00516401fb811b4f4f37f5c926357f2a033d27f96b74c849" -dependencies = [ - "gl_generator 0.13.1", -] - [[package]] name = "glow" version = "0.6.1" @@ -805,7 +635,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" dependencies = [ - "libc", + "libc 0.2.80", ] [[package]] @@ -842,26 +672,13 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "io-surface" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2279a6faecd06034f88218f77f7a767693e0957bce0323a96d92747e2760b445" -dependencies = [ - "cgl", - "core-foundation 0.6.4", - "gleam", - "leaky-cow", - "libc", -] - [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc", + "libc 0.2.80", ] [[package]] @@ -882,7 +699,7 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" dependencies = [ - "libc", + "libc 0.2.80", ] [[package]] @@ -905,10 +722,24 @@ dependencies = [ ] [[package]] -name = "khronos_api" -version = "3.1.0" +name = "khronos" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +checksum = "c0711aaa80e6ba6eb1fa8978f1f46bfcb38ceb2f3f33f3736efbff39dac89f50" +dependencies = [ + "libc 0.1.12", +] + +[[package]] +name = "khronos-egl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ba35280f59eaad0529951ae6ce84357cc954af38c6c74319884f7bdda4df53d" +dependencies = [ + "khronos", + "libc 0.2.80", + "pkg-config", +] [[package]] name = "lazy_static" @@ -923,19 +754,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "leak" -version = "0.1.2" +name = "libc" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73" - -[[package]] -name = "leaky-cow" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc" -dependencies = [ - "leak", -] +checksum = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122" [[package]] name = "libc" @@ -1002,22 +824,13 @@ dependencies = [ "serde_json", ] -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" dependencies = [ - "libc", + "libc 0.2.80", ] [[package]] @@ -1047,25 +860,10 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" dependencies = [ - "libc", + "libc 0.2.80", "winapi 0.3.9", ] -[[package]] -name = "metal" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e198a0ee42bdbe9ef2c09d0b9426f3b2b47d90d93a4a9b0395c4cea605e92dc0" -dependencies = [ - "bitflags", - "block", - "cocoa 0.20.2", - "core-graphics 0.19.2", - "foreign-types", - "log", - "objc", -] - [[package]] name = "metal" version = "0.20.0" @@ -1080,16 +878,6 @@ dependencies = [ "objc", ] -[[package]] -name = "miniz_oxide" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" -dependencies = [ - "adler", - "autocfg", -] - [[package]] name = "mio" version = "0.6.22" @@ -1101,7 +889,7 @@ dependencies = [ "fuchsia-zircon-sys", "iovec", "kernel32-sys", - "libc", + "libc 0.2.80", "log", "miow", "net2", @@ -1166,7 +954,7 @@ checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" dependencies = [ "android_log-sys", "lazy_static", - "libc", + "libc 0.2.80", "log", "ndk", "ndk-sys", @@ -1185,7 +973,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" dependencies = [ "cfg-if 0.1.10", - "libc", + "libc 0.2.80", "winapi 0.3.9", ] @@ -1198,7 +986,7 @@ dependencies = [ "bitflags", "cc", "cfg-if 0.1.10", - "libc", + "libc 0.2.80", "void", ] @@ -1253,17 +1041,6 @@ dependencies = [ "objc_exception", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc_exception" version = "0.1.2" @@ -1273,21 +1050,6 @@ dependencies = [ "cc", ] -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "object" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" - [[package]] name = "once_cell" version = "1.5.2" @@ -1303,17 +1065,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version", -] - [[package]] name = "parking_lot" version = "0.10.2" @@ -1335,21 +1086,6 @@ dependencies = [ "parking_lot_core 0.8.0", ] -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.0.3", - "libc", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.9", -] - [[package]] name = "parking_lot_core" version = "0.7.2" @@ -1358,9 +1094,9 @@ checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if 0.1.10", "cloudabi 0.0.3", - "libc", + "libc 0.2.80", "redox_syscall", - "smallvec 1.4.2", + "smallvec", "winapi 0.3.9", ] @@ -1373,9 +1109,9 @@ dependencies = [ "cfg-if 0.1.10", "cloudabi 0.1.0", "instant", - "libc", + "libc 0.2.80", "redox_syscall", - "smallvec 1.4.2", + "smallvec", "winapi 0.3.9", ] @@ -1412,7 +1148,6 @@ name = "player" version = "0.1.0" dependencies = [ "env_logger", - "gfx-backend-vulkan", "log", "raw-window-handle", "renderdoc", @@ -1421,7 +1156,7 @@ dependencies = [ "wgpu-core", "wgpu-subscriber", "wgpu-types", - "winit 0.22.2", + "winit", ] [[package]] @@ -1478,8 +1213,7 @@ dependencies = [ [[package]] name = "range-alloc" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a871f1e45a3a3f0c73fb60343c811238bb5143a81642e27c2ac7aac27ff01a63" +source = "git+https://github.com/gfx-rs/gfx?rev=1d14789011cb892f4c1a205d3f8a87d479c2e354#1d14789011cb892f4c1a205d3f8a87d479c2e354" [[package]] name = "raw-window-handle" @@ -1487,7 +1221,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" dependencies = [ - "libc", + "libc 0.2.80", ] [[package]] @@ -1556,12 +1290,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rustc-demangle" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" - [[package]] name = "rustc_version" version = "0.2.3" @@ -1686,38 +1414,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c46a3482db8f247956e464d783693ece164ca056e6e67563ee5505bdb86452cd" -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smallvec" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" -[[package]] -name = "smithay-client-toolkit" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa" -dependencies = [ - "andrew", - "bitflags", - "dlib", - "lazy_static", - "memmap", - "nix", - "wayland-client 0.21.13", - "wayland-commons 0.21.13", - "wayland-protocols 0.21.13", -] - [[package]] name = "smithay-client-toolkit" version = "0.6.6" @@ -1730,8 +1432,8 @@ dependencies = [ "lazy_static", "memmap", "nix", - "wayland-client 0.23.6", - "wayland-protocols 0.23.6", + "wayland-client", + "wayland-protocols", ] [[package]] @@ -1773,36 +1475,6 @@ dependencies = [ "lock_api 0.4.1", ] -[[package]] -name = "surfman" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3d85bf0eb91b66b93dda5c04627f00074ea1fa008c2980b132a065fafe7a1ab" -dependencies = [ - "bitflags", - "cfg_aliases", - "cgl", - "cocoa 0.19.1", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "display-link", - "euclid", - "gl_generator 0.14.0", - "io-surface", - "lazy_static", - "libc", - "log", - "mach", - "metal 0.18.0", - "objc", - "parking_lot 0.10.2", - "raw-window-handle", - "wayland-sys 0.24.1", - "winapi 0.3.9", - "winit 0.19.3", - "wio", -] - [[package]] name = "syn" version = "1.0.48" @@ -1849,7 +1521,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" dependencies = [ - "libc", + "libc 0.2.80", "redox_syscall", "winapi 0.3.9", ] @@ -1875,17 +1547,11 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "libc", + "libc 0.2.80", "wasi", "winapi 0.3.9", ] -[[package]] -name = "time-point" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06535c958d6abe68dc4b4ef9e6845f758fc42fe463d0093d0aca40254f03fb14" - [[package]] name = "toml" version = "0.5.7" @@ -1962,7 +1628,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.4.2", + "smallvec", "thread_local", "tracing", "tracing-core", @@ -2059,21 +1725,6 @@ version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" -[[package]] -name = "wayland-client" -version = "0.21.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713" -dependencies = [ - "bitflags", - "downcast-rs", - "libc", - "nix", - "wayland-commons 0.21.13", - "wayland-scanner 0.21.13", - "wayland-sys 0.21.13", -] - [[package]] name = "wayland-client" version = "0.23.6" @@ -2083,22 +1734,12 @@ dependencies = [ "bitflags", "calloop", "downcast-rs", - "libc", + "libc 0.2.80", "mio", "nix", - "wayland-commons 0.23.6", - "wayland-scanner 0.23.6", - "wayland-sys 0.23.6", -] - -[[package]] -name = "wayland-commons" -version = "0.21.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec" -dependencies = [ - "nix", - "wayland-sys 0.21.13", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] @@ -2108,20 +1749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" dependencies = [ "nix", - "wayland-sys 0.23.6", -] - -[[package]] -name = "wayland-protocols" -version = "0.21.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afde2ea2a428eee6d7d2c8584fdbe8b82eee8b6c353e129a434cd6e07f42145" -dependencies = [ - "bitflags", - "wayland-client 0.21.13", - "wayland-commons 0.21.13", - "wayland-scanner 0.21.13", - "wayland-sys 0.21.13", + "wayland-sys", ] [[package]] @@ -2131,20 +1759,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" dependencies = [ "bitflags", - "wayland-client 0.23.6", - "wayland-commons 0.23.6", - "wayland-scanner 0.23.6", -] - -[[package]] -name = "wayland-scanner" -version = "0.21.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3828c568714507315ee425a9529edc4a4aa9901409e373e9e0027e7622b79e" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "xml-rs", + "wayland-client", + "wayland-commons", + "wayland-scanner", ] [[package]] @@ -2158,16 +1775,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "wayland-sys" -version = "0.21.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628" -dependencies = [ - "dlib", - "lazy_static", -] - [[package]] name = "wayland-sys" version = "0.23.6" @@ -2178,16 +1785,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "wayland-sys" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537500923d50be11d95a63c4cb538145e4c82edf61296b7debc1f94a1a6514ed" -dependencies = [ - "dlib", - "lazy_static", -] - [[package]] name = "web-sys" version = "0.3.45" @@ -2222,7 +1819,7 @@ dependencies = [ "raw-window-handle", "ron", "serde", - "smallvec 1.4.2", + "smallvec", "thiserror", "tracing", "wgpu-types", @@ -2291,30 +1888,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "winit" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0da905e61ae52d55c5ca6f8bea1e09daf5e325b6c77b0947c65a5179b49f5f" -dependencies = [ - "android_glue", - "backtrace", - "bitflags", - "cocoa 0.18.5", - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "lazy_static", - "libc", - "log", - "objc", - "parking_lot 0.9.0", - "percent-encoding", - "smithay-client-toolkit 0.4.6", - "wayland-client 0.21.13", - "winapi 0.3.9", - "x11-dl", -] - [[package]] name = "winit" version = "0.22.2" @@ -2322,14 +1895,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e4ccbf7ddb6627828eace16cacde80fc6bf4dbb3469f88487262a02cf8e7862" dependencies = [ "bitflags", - "cocoa 0.20.2", + "cocoa", "core-foundation 0.7.0", - "core-graphics 0.19.2", + "core-graphics", "core-video-sys", "dispatch", "instant", "lazy_static", - "libc", + "libc 0.2.80", "log", "mio", "mio-extras", @@ -2340,8 +1913,8 @@ dependencies = [ "parking_lot 0.10.2", "percent-encoding", "raw-window-handle", - "smithay-client-toolkit 0.6.6", - "wayland-client 0.23.6", + "smithay-client-toolkit", + "wayland-client", "winapi 0.3.9", "x11-dl", ] @@ -2365,16 +1938,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "x11" -version = "2.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ecd092546cb16f25783a5451538e73afc8d32e242648d54f4ae5459ba1e773" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "x11-dl" version = "2.18.5" @@ -2382,7 +1945,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" dependencies = [ "lazy_static", - "libc", + "libc 0.2.80", "maybe-uninit", "pkg-config", ] diff --git a/player/Cargo.toml b/player/Cargo.toml index 8db88ace2..7e4a766be 100644 --- a/player/Cargo.toml +++ b/player/Cargo.toml @@ -39,8 +39,5 @@ git = "https://github.com/gfx-rs/subscriber.git" rev = "cdc9feb53f152f9c41905ed9efeff2c1ed214361" version = "0.1" -[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies] -gfx-backend-vulkan = { version = "0.6", features = ["x11"] } - [dev-dependencies] serde = "1" diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 1e591f304..7aad0a8ec 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -25,8 +25,8 @@ arrayvec = "0.5" bitflags = "1.0" copyless = "0.1" fxhash = "0.2" -hal = { package = "gfx-hal", version = "0.6" } -gfx-backend-empty = "0.6" +hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } +gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } parking_lot = "0.11" raw-window-handle = { version = "0.3", optional = true } ron = { version = "0.6", optional = true } @@ -48,20 +48,18 @@ path = "../wgpu-types" package = "wgpu-types" version = "0.6" -[target.'cfg(all(unix, not(any(target_os = "ios", target_os = "macos"))))'.dependencies] -gfx-backend-gl = { version = "0.6" } +[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies] +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } +gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } [target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies] -gfx-backend-metal = { version = "0.6" } -gfx-backend-vulkan = { version = "0.6.4", optional = true } - -[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies] -gfx-backend-vulkan = { version = "0.6.4" } +gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354", optional = true } [target.'cfg(windows)'.dependencies] -gfx-backend-dx12 = { version = "0.6" } -gfx-backend-dx11 = { version = "0.6" } -gfx-backend-vulkan = { version = "0.6.4" } +gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } +gfx-backend-dx11 = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } +gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "1d14789011cb892f4c1a205d3f8a87d479c2e354" } [dev-dependencies] loom = "0.3" diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index 591eb574f..19c11c713 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -534,16 +534,11 @@ impl RenderBundle { .raw .as_ref() .ok_or(ExecutionError::DestroyedBuffer(buffer_id))?; - let view = hal::buffer::IndexBufferView { - buffer, - range: hal::buffer::SubRange { - offset, - size: size.map(|s| s.get()), - }, - index_type, + let range = hal::buffer::SubRange { + offset, + size: size.map(|s| s.get()), }; - - cmd_buf.bind_index_buffer(view); + cmd_buf.bind_index_buffer(buffer, range, index_type); } RenderCommand::SetVertexBuffer { slot, diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 2fe621c17..d8ab62f46 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1164,17 +1164,13 @@ impl Global { if let Some((buffer_id, ref range)) = state.index.bound_buffer_view { let &(ref buffer, _) = buffer_guard[buffer_id].raw.as_ref().unwrap(); - let view = hal::buffer::IndexBufferView { - buffer, - range: hal::buffer::SubRange { - offset: range.start, - size: Some(range.end - range.start), - }, - index_type: conv::map_index_format(state.index.format), + let range = hal::buffer::SubRange { + offset: range.start, + size: Some(range.end - range.start), }; - + let index_type = conv::map_index_format(state.index.format); unsafe { - raw.bind_index_buffer(view); + raw.bind_index_buffer(buffer, range, index_type); } } } @@ -1217,17 +1213,13 @@ impl Global { state.index.bound_buffer_view = Some((id::Valid(buffer_id), offset..end)); state.index.update_limit(); - let view = hal::buffer::IndexBufferView { - buffer: buf_raw, - range: hal::buffer::SubRange { - offset, - size: Some(end - offset), - }, - index_type: conv::map_index_format(state.index.format), + let range = hal::buffer::SubRange { + offset, + size: Some(end - offset), }; - + let index_type = conv::map_index_format(state.index.format); unsafe { - raw.bind_index_buffer(view); + raw.bind_index_buffer(buf_raw, range, index_type); } } RenderCommand::SetVertexBuffer { diff --git a/wgpu-core/src/device/alloc.rs b/wgpu-core/src/device/alloc.rs index 28fe81d90..893830ace 100644 --- a/wgpu-core/src/device/alloc.rs +++ b/wgpu-core/src/device/alloc.rs @@ -45,7 +45,7 @@ impl MemoryAllocator { mem_props .memory_heaps .iter() - .map(|mh| gpu_alloc::MemoryHeap { size: *mh }) + .map(|mh| gpu_alloc::MemoryHeap { size: mh.size }) .collect::>(), ), max_memory_allocation_count: if limits.max_memory_allocation_count == 0 { diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index a632f06e5..b1b7105fe 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -787,14 +787,13 @@ impl Device { None }; - let actual_border: hal::image::PackedColor = desc - .border_color - .map(|c| match c { - wgt::SamplerBorderColor::TransparentBlack => [0., 0., 0., 0.].into(), - wgt::SamplerBorderColor::OpaqueBlack => [0., 0., 0., 1.].into(), - wgt::SamplerBorderColor::OpaqueWhite => [1., 1., 1., 1.].into(), - }) - .unwrap_or([0., 0., 0., 0.].into()); + let border = match desc.border_color { + None | Some(wgt::SamplerBorderColor::TransparentBlack) => { + hal::image::BorderColor::TransparentBlack + } + Some(wgt::SamplerBorderColor::OpaqueBlack) => hal::image::BorderColor::OpaqueBlack, + Some(wgt::SamplerBorderColor::OpaqueWhite) => hal::image::BorderColor::OpaqueWhite, + }; let info = hal::image::SamplerDesc { min_filter: conv::map_filter(desc.min_filter), @@ -808,7 +807,7 @@ impl Device { lod_bias: hal::image::Lod(0.0), lod_range: hal::image::Lod(desc.lod_min_clamp)..hal::image::Lod(desc.lod_max_clamp), comparison: desc.compare.map(conv::map_compare_function), - border: actual_border, + border, normalized: true, anisotropy_clamp: actual_clamp, };