diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41363271a9..cf93ffe92d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,30 +27,44 @@ jobs: name: iOS Stable channel: stable build_command: rustup target add aarch64-apple-ios; cargo clippy --target aarch64-apple-ios + additional_core_features: + additional_player_features: - os: macos-10.15 name: MacOS Stable channel: stable build_command: cargo clippy + additional_core_features: trace + additional_player_features: winit - os: macos-10.15 name: MacOS Nightly channel: nightly build_command: cargo test + additional_core_features: + additional_player_features: - os: ubuntu-18.04 name: Ubuntu Stable channel: stable build_command: cargo clippy + additional_core_features: trace,replay + additional_player_features: - os: ubuntu-18.04 name: Ubuntu Nightly channel: nightly build_command: cargo test + additional_core_features: + additional_player_features: winit - os: windows-2019 name: Windows Stable channel: stable build_command: rustup default stable-msvc; cargo clippy + additional_core_features: trace + additional_player_features: - os: windows-2019 name: Windows Nightly channel: nightly build_command: rustup default nightly-msvc; cargo test + additional_core_features: + additional_player_features: steps: - uses: actions/checkout@v2 - if: matrix.channel == 'nightly' @@ -63,3 +77,7 @@ jobs: run: rustup component add clippy - name: cargo clippy/test run: ${{ matrix.build_command }} + - if: matrix.additional_core_features != '' + 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 }} diff --git a/.gitignore b/.gitignore index 70f37a548c..0dd6fef443 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -Cargo.lock /target **/*.rs.bk #Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000000..68c68f58b9 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1420 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "aho-corasick" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" +dependencies = [ + "memchr", +] + +[[package]] +name = "andrew" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" +dependencies = [ + "bitflags", + "line_drawing", + "rusttype 0.7.9", + "walkdir", + "xdg", + "xml-rs", +] + +[[package]] +name = "android_glue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "ash" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69daec0742947f33a85931fa3cb0ce5f07929159dcbd1f0cbb5b2912e2978509" +dependencies = [ + "libloading", +] + +[[package]] +name = "atom" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c86699c3f02778ec07158376991c8f783dd1f2f95c579ffaf0738dc984b2fe2" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + +[[package]] +name = "battery" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36a698e449024a5d18994a815998bf5e2e4bc1883e35a7d7ba95b6b69ee45907" +dependencies = [ + "cfg-if", + "core-foundation 0.6.4", + "lazycell", + "libc", + "mach", + "nix 0.15.0", + "num-traits", + "uom", + "winapi 0.3.8", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "bumpalo" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "calloop" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" +dependencies = [ + "mio", + "mio-extras", + "nix 0.14.1", +] + +[[package]] +name = "cc" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4736c86d51bd878b474400d9ec888156f4037015f5d09794fab9f26eab1ad4" +dependencies = [ + "bitflags", + "block", + "core-foundation 0.7.0", + "core-graphics 0.19.0", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "copyless" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +dependencies = [ + "core-foundation-sys 0.7.0", + "libc", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd" +dependencies = [ + "bitflags", + "core-foundation 0.7.0", + "foreign-types", + "libc", +] + +[[package]] +name = "core-video-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc065219542086f72d1e9f7aadbbab0989e980263695d129d502082d063a9d0" +dependencies = [ + "cfg-if", + "core-foundation-sys 0.6.2", + "core-graphics 0.17.3", + "libc", + "objc", +] + +[[package]] +name = "d3d12" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7ed48e89905e5e146bcc1951cc3facb9e44aea9adf5dc01078cda1bd24b662" +dependencies = [ + "bitflags", + "libloading", + "winapi 0.3.8", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a" +dependencies = [ + "libloading", +] + +[[package]] +name = "downcast-rs" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gfx-auxil" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b46e6f0031330a0be08d17820f2dcaaa91cb36710a97a9500cb4f1c36e785c8" +dependencies = [ + "fxhash", + "gfx-hal", + "spirv_cross", +] + +[[package]] +name = "gfx-backend-dx11" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b148219292624126f78245e50a9720d95ea149a415ce8ce73ab7014205301b88" +dependencies = [ + "bitflags", + "gfx-auxil", + "gfx-hal", + "libloading", + "log", + "parking_lot", + "range-alloc", + "raw-window-handle", + "smallvec", + "spirv_cross", + "winapi 0.3.8", + "wio", +] + +[[package]] +name = "gfx-backend-dx12" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0e526746379e974501551b08958947e67a81b5ea8cdc717a000cdd72577da05" +dependencies = [ + "bitflags", + "d3d12", + "gfx-auxil", + "gfx-hal", + "log", + "range-alloc", + "raw-window-handle", + "smallvec", + "spirv_cross", + "winapi 0.3.8", +] + +[[package]] +name = "gfx-backend-empty" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67bd2d7bc022b257ddbdabc5fa3b10c29c292372c3409f2b6a6e3f4e11cdb85" +dependencies = [ + "gfx-hal", + "raw-window-handle", +] + +[[package]] +name = "gfx-backend-metal" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe128c29675b5afc8acdda1dfe096d6abd5e3528059ab0b98bda8215d8beed9" +dependencies = [ + "arrayvec", + "bitflags", + "block", + "cocoa 0.20.0", + "copyless", + "core-graphics 0.19.0", + "foreign-types", + "gfx-auxil", + "gfx-hal", + "lazy_static", + "log", + "metal", + "objc", + "parking_lot", + "range-alloc", + "raw-window-handle", + "smallvec", + "spirv_cross", + "storage-map", +] + +[[package]] +name = "gfx-backend-vulkan" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ff36feae801fa23d29acd74082603a0145a697a23595757dd4e78828ab33da" +dependencies = [ + "arrayvec", + "ash", + "byteorder", + "core-graphics 0.19.0", + "gfx-hal", + "lazy_static", + "log", + "objc", + "raw-window-handle", + "smallvec", + "winapi 0.3.8", + "x11", +] + +[[package]] +name = "gfx-descriptor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf35f5d66d1bc56e63e68d7528441453f25992bd954b84309d23c659df2c5da" +dependencies = [ + "fxhash", + "gfx-hal", + "log", +] + +[[package]] +name = "gfx-hal" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc96180204064c9493e0fe4a9efeb721e0ac59fe8e1906d0c659142a93114fb1" +dependencies = [ + "bitflags", + "raw-window-handle", +] + +[[package]] +name = "gfx-memory" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2eed6cda674d9cd4d92229102dbd544292124533d236904f987e9afab456137" +dependencies = [ + "fxhash", + "gfx-hal", + "hibitset", + "log", + "slab", +] + +[[package]] +name = "hermit-abi" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" +dependencies = [ + "libc", +] + +[[package]] +name = "hibitset" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a1bb8316a44459a7d14253c4d28dd7395cbd23cc04a68c46e851b8e46d64b1" +dependencies = [ + "atom", +] + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "instant" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7152d2aed88aa566e7a342250f21ba2222c1ae230ad577499dbfa3c18475b80" + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" + +[[package]] +name = "libc" +version = "0.2.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" + +[[package]] +name = "libloading" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +dependencies = [ + "cc", + "winapi 0.3.8", +] + +[[package]] +name = "line_drawing" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" +dependencies = [ + "num-traits", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "mach" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" +dependencies = [ + "libc", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi 0.3.8", +] + +[[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.0", + "core-graphics 0.19.0", + "foreign-types", + "log", + "objc", +] + +[[package]] +name = "mio" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "net2" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "nix" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "void", +] + +[[package]] +name = "nix" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "void", +] + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +dependencies = [ + "autocfg", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", + "objc_exception", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "ordered-float" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" +dependencies = [ + "num-traits", +] + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.8", +] + +[[package]] +name = "peek-poke" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93fd6a575ebf1ac2668d08443c97a22872cfb463fd8b7ddd141e9f6be59af2f" +dependencies = [ + "peek-poke-derive", +] + +[[package]] +name = "peek-poke-derive" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb44a25c5bba983be0fc8592dfaf3e6d0935ce8be0c6b15b2a39507af34a926" +dependencies = [ + "proc-macro2 1.0.10", + "quote 1.0.3", + "syn", + "synstructure", + "unicode-xid 0.2.0", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pkg-config" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" + +[[package]] +name = "player" +version = "0.1.0" +dependencies = [ + "env_logger", + "log", + "raw-window-handle", + "ron", + "wgpu-core", + "wgpu-types", + "winit", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" +dependencies = [ + "unicode-xid 0.2.0", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" +dependencies = [ + "proc-macro2 1.0.10", +] + +[[package]] +name = "range-alloc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5927936723a9e8b715d37d7e4b390455087c4bdf25b9f702309460577b14f9" + +[[package]] +name = "raw-window-handle" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" +dependencies = [ + "libc", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" + +[[package]] +name = "regex" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" + +[[package]] +name = "ron" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5" +dependencies = [ + "base64", + "bitflags", + "serde", +] + +[[package]] +name = "rusttype" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" +dependencies = [ + "rusttype 0.8.3", +] + +[[package]] +name = "rusttype" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" +dependencies = [ + "approx", + "ordered-float", + "stb_truetype", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" +dependencies = [ + "proc-macro2 1.0.10", + "quote 1.0.3", + "syn", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" + +[[package]] +name = "smithay-client-toolkit" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" +dependencies = [ + "andrew", + "bitflags", + "dlib", + "lazy_static", + "memmap", + "nix 0.14.1", + "wayland-client", + "wayland-protocols", +] + +[[package]] +name = "spirv_cross" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "946216f8793f7199e3ea5b995ee8dc20a0ace1fcf46293a0ef4c17e1d046dbde" +dependencies = [ + "cc", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "stb_truetype" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" +dependencies = [ + "byteorder", +] + +[[package]] +name = "storage-map" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0a4829a5c591dc24a944a736d6b1e4053e51339a79fd5d4702c4c999a9c45e" +dependencies = [ + "lock_api", +] + +[[package]] +name = "syn" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213" +dependencies = [ + "proc-macro2 1.0.10", + "quote 1.0.3", + "unicode-xid 0.2.0", +] + +[[package]] +name = "synstructure" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" +dependencies = [ + "proc-macro2 1.0.10", + "quote 1.0.3", + "syn", + "unicode-xid 0.2.0", +] + +[[package]] +name = "termcolor" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "uom" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cec796ec5f7ac557631709079168286056205c51c60aac33f51764bdc7b8dc4" +dependencies = [ + "num-traits", + "typenum", +] + +[[package]] +name = "vec_map" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +dependencies = [ + "same-file", + "winapi 0.3.8", + "winapi-util", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.10", + "quote 1.0.3", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" +dependencies = [ + "quote 1.0.3", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" +dependencies = [ + "proc-macro2 1.0.10", + "quote 1.0.3", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" + +[[package]] +name = "wayland-client" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" +dependencies = [ + "bitflags", + "calloop", + "downcast-rs", + "libc", + "mio", + "nix 0.14.1", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" +dependencies = [ + "nix 0.14.1", + "wayland-sys", +] + +[[package]] +name = "wayland-protocols" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" +dependencies = [ + "dlib", + "lazy_static", +] + +[[package]] +name = "wgpu-core" +version = "0.5.0" +dependencies = [ + "arrayvec", + "battery", + "bitflags", + "copyless", + "fxhash", + "gfx-backend-dx11", + "gfx-backend-dx12", + "gfx-backend-empty", + "gfx-backend-metal", + "gfx-backend-vulkan", + "gfx-descriptor", + "gfx-hal", + "gfx-memory", + "log", + "parking_lot", + "peek-poke", + "raw-window-handle", + "ron", + "serde", + "smallvec", + "vec_map", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "0.5.0" +dependencies = [ + "bitflags", + "peek-poke", + "serde", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winit" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc53342d3d1a3d57f3949e0692d93d5a8adb7814d8683cef4a09c2b550e94246" +dependencies = [ + "android_glue", + "bitflags", + "cocoa 0.19.1", + "core-foundation 0.6.4", + "core-graphics 0.17.3", + "core-video-sys", + "dispatch", + "instant", + "lazy_static", + "libc", + "log", + "mio", + "mio-extras", + "objc", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "smithay-client-toolkit", + "wayland-client", + "winapi 0.3.8", + "x11-dl", +] + +[[package]] +name = "wio" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +dependencies = [ + "lazy_static", + "libc", + "maybe-uninit", + "pkg-config", +] + +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + +[[package]] +name = "xml-rs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" diff --git a/Cargo.toml b/Cargo.toml index 7958bd98a1..b9d820c1ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "player", "wgpu-core", "wgpu-types", ] diff --git a/README.md b/README.md index c59a93a37c..a16a36f769 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ The implementation consists of the following parts: - `wgpu-core` - internal Rust API for WebGPU implementations to use - `wgpu-types` - Rust types shared between `wgpu-core`, `wgpu-native`, and `wgpu-rs` + - `player` - application for replaying the API traces, uses `winit` This repository is not meant for direct use by applications. If you are looking for the user-facing Rust API, you need [wgpu-rs](https://github.com/gfx-rs/wgpu-rs). diff --git a/player/Cargo.toml b/player/Cargo.toml new file mode 100644 index 0000000000..a7d377fd0c --- /dev/null +++ b/player/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "player" +version = "0.1.0" +authors = [ + "Dzmitry Malyshau ", +] +edition = "2018" +description = "WebGPU trace player" +homepage = "https://github.com/gfx-rs/wgpu" +repository = "https://github.com/gfx-rs/wgpu" +keywords = ["graphics"] +license = "MPL-2.0" +publish = false + +[features] + +[dependencies] +env_logger = "0.7" +log = "0.4" +raw-window-handle = "0.3" +ron = "0.5" +winit = { version = "0.22", optional = true } + +[dependencies.wgt] +path = "../wgpu-types" +package = "wgpu-types" +version = "0.5" +features = ["replay"] + +[dependencies.wgc] +path = "../wgpu-core" +package = "wgpu-core" +version = "0.5" +features = ["replay", "raw-window-handle"] diff --git a/player/README.md b/player/README.md new file mode 100644 index 0000000000..bd73b8b71f --- /dev/null +++ b/player/README.md @@ -0,0 +1,12 @@ +# wgpu player + +This is application that allows replaying the `wgpu` workloads recorded elsewhere. + +Launch as: +```rust +player +``` + +When built with "winit" feature, it's able to replay the workloads that operate on a swapchain. It renders each frame consequently, then waits for the user to close the window. When built without "winit", it launches in console mode and can replay any trace that doesn't use swapchains. + +Note: replaying is currently restricted to the same backend, as one used for recording a trace. It is straightforward, however, to just replace the backend in RON, since it's serialized as plain text. Valid values are: Vulkan, Metal, Dx12, and Dx11. diff --git a/player/src/main.rs b/player/src/main.rs new file mode 100644 index 0000000000..96289d09e3 --- /dev/null +++ b/player/src/main.rs @@ -0,0 +1,559 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/*! This is a player for WebGPU traces. + * + * # Notes + * - we call device_maintain_ids() before creating any refcounted resource, + * which is basically everything except for BGL and shader modules, + * so that we don't accidentally try to use the same ID. +!*/ + +use wgc::device::trace; + +use std::{ + ffi::CString, + fmt::Debug, + fs::File, + marker::PhantomData, + path::{Path, PathBuf}, + ptr, +}; + +macro_rules! gfx_select { + ($id:expr => $global:ident.$method:ident( $($param:expr),+ )) => { + match $id.backend() { + #[cfg(not(any(target_os = "ios", target_os = "macos")))] + wgt::Backend::Vulkan => $global.$method::( $($param),+ ), + #[cfg(any(target_os = "ios", target_os = "macos"))] + wgt::Backend::Metal => $global.$method::( $($param),+ ), + #[cfg(windows)] + wgt::Backend::Dx12 => $global.$method::( $($param),+ ), + #[cfg(windows)] + wgt::Backend::Dx11 => $global.$method::( $($param),+ ), + _ => unreachable!() + } + }; +} + +struct Label(Option); +impl Label { + fn new(text: &str) -> Self { + Self(if text.is_empty() { + None + } else { + Some(CString::new(text).expect("invalid label")) + }) + } + + fn as_ptr(&self) -> *const std::os::raw::c_char { + match self.0 { + Some(ref c_string) => c_string.as_ptr(), + None => ptr::null(), + } + } +} + +struct OwnedProgrammableStage { + desc: wgc::pipeline::ProgrammableStageDescriptor, + #[allow(dead_code)] + entry_point: CString, +} + +impl From for OwnedProgrammableStage { + fn from(stage: trace::ProgrammableStageDescriptor) -> Self { + let entry_point = CString::new(stage.entry_point.as_str()).unwrap(); + OwnedProgrammableStage { + desc: wgc::pipeline::ProgrammableStageDescriptor { + module: stage.module, + entry_point: entry_point.as_ptr(), + }, + entry_point, + } + } +} + +#[derive(Debug)] +struct IdentityPassThrough(PhantomData); + +impl wgc::hub::IdentityHandler for IdentityPassThrough { + type Input = I; + fn process(&self, id: I, backend: wgt::Backend) -> I { + let (index, epoch, _backend) = id.unzip(); + I::zip(index, epoch, backend) + } + fn free(&self, _id: I) {} +} + +struct IdentityPassThroughFactory; + +impl wgc::hub::IdentityHandlerFactory + for IdentityPassThroughFactory +{ + type Filter = IdentityPassThrough; + fn spawn(&self, _min_index: u32) -> Self::Filter { + IdentityPassThrough(PhantomData) + } +} +impl wgc::hub::GlobalIdentityHandlerFactory for IdentityPassThroughFactory {} + +trait GlobalExt { + fn encode_commands( + &self, + encoder: wgc::id::CommandEncoderId, + commands: Vec, + ) -> wgc::id::CommandBufferId; + fn process( + &self, + device: wgc::id::DeviceId, + action: trace::Action, + dir: &PathBuf, + comb_manager: &mut wgc::hub::IdentityManager, + ); +} + +impl GlobalExt for wgc::hub::Global { + fn encode_commands( + &self, + encoder: wgc::id::CommandEncoderId, + commands: Vec, + ) -> wgc::id::CommandBufferId { + for command in commands { + match command { + trace::Command::CopyBufferToBuffer { + src, + src_offset, + dst, + dst_offset, + size, + } => self.command_encoder_copy_buffer_to_buffer::( + encoder, src, src_offset, dst, dst_offset, size, + ), + trace::Command::CopyBufferToTexture { src, dst, size } => { + self.command_encoder_copy_buffer_to_texture::(encoder, &src, &dst, size) + } + trace::Command::CopyTextureToBuffer { src, dst, size } => { + self.command_encoder_copy_texture_to_buffer::(encoder, &src, &dst, size) + } + trace::Command::CopyTextureToTexture { src, dst, size } => { + self.command_encoder_copy_texture_to_texture::(encoder, &src, &dst, size) + } + trace::Command::RunComputePass { + commands, + dynamic_offsets, + } => unsafe { + let mut offsets = &dynamic_offsets[..]; + let mut pass = wgc::command::RawPass::new_compute(encoder); + for com in commands { + pass.encode(&com); + if let wgc::command::ComputeCommand::SetBindGroup { + num_dynamic_offsets, + .. + } = com + { + pass.encode_slice(&offsets[..num_dynamic_offsets as usize]); + offsets = &offsets[num_dynamic_offsets as usize..]; + } + } + let (data, _) = pass.finish_compute(); + self.command_encoder_run_compute_pass::(encoder, &data); + }, + trace::Command::RunRenderPass { + target_colors, + target_depth_stencil, + commands, + dynamic_offsets, + } => unsafe { + let mut offsets = &dynamic_offsets[..]; + let mut pass = wgc::command::RawPass::new_render( + encoder, + &wgc::command::RenderPassDescriptor { + color_attachments: target_colors.as_ptr(), + color_attachments_length: target_colors.len(), + depth_stencil_attachment: target_depth_stencil.as_ref(), + }, + ); + for com in commands { + pass.encode(&com); + if let wgc::command::RenderCommand::SetBindGroup { + num_dynamic_offsets, + .. + } = com + { + pass.encode_slice(&offsets[..num_dynamic_offsets as usize]); + offsets = &offsets[num_dynamic_offsets as usize..]; + } + } + let (data, _) = pass.finish_render(); + self.command_encoder_run_render_pass::(encoder, &data); + }, + } + } + self.command_encoder_finish::(encoder, &wgt::CommandBufferDescriptor { todo: 0 }) + } + + fn process( + &self, + device: wgc::id::DeviceId, + action: trace::Action, + dir: &PathBuf, + comb_manager: &mut wgc::hub::IdentityManager, + ) { + use wgc::device::trace::Action as A; + match action { + A::Init { .. } => panic!("Unexpected Action::Init: has to be the first action only"), + A::CreateSwapChain { .. } | A::PresentSwapChain(_) => { + panic!("Unexpected SwapChain action: winit feature is not enabled") + } + A::CreateBuffer { id, desc } => { + let label = Label::new(&desc.label); + self.device_maintain_ids::(device); + self.device_create_buffer::(device, &desc.map_label(|_| label.as_ptr()), id); + } + A::DestroyBuffer(id) => { + self.buffer_destroy::(id); + } + A::CreateTexture { id, desc } => { + let label = Label::new(&desc.label); + self.device_maintain_ids::(device); + self.device_create_texture::(device, &desc.map_label(|_| label.as_ptr()), id); + } + A::DestroyTexture(id) => { + self.texture_destroy::(id); + } + A::CreateTextureView { + id, + parent_id, + desc, + } => { + let label = desc.as_ref().map_or(Label(None), |d| Label::new(&d.label)); + self.device_maintain_ids::(device); + self.texture_create_view::( + parent_id, + desc.map(|d| d.map_label(|_| label.as_ptr())).as_ref(), + id, + ); + } + A::DestroyTextureView(id) => { + self.texture_view_destroy::(id); + } + A::CreateSampler { id, desc } => { + let label = Label::new(&desc.label); + self.device_maintain_ids::(device); + self.device_create_sampler::(device, &desc.map_label(|_| label.as_ptr()), id); + } + A::DestroySampler(id) => { + self.sampler_destroy::(id); + } + A::GetSwapChainTexture { id, parent_id } => { + self.swap_chain_get_next_texture::(parent_id, id) + .unwrap(); + } + A::CreateBindGroupLayout { id, label, entries } => { + let label = Label::new(&label); + self.device_create_bind_group_layout::( + device, + &wgc::binding_model::BindGroupLayoutDescriptor { + label: label.as_ptr(), + entries: entries.as_ptr(), + entries_length: entries.len(), + }, + id, + ); + } + A::DestroyBindGroupLayout(id) => { + self.bind_group_layout_destroy::(id); + } + A::CreatePipelineLayout { + id, + bind_group_layouts, + } => { + self.device_maintain_ids::(device); + self.device_create_pipeline_layout::( + device, + &wgc::binding_model::PipelineLayoutDescriptor { + bind_group_layouts: bind_group_layouts.as_ptr(), + bind_group_layouts_length: bind_group_layouts.len(), + }, + id, + ); + } + A::DestroyPipelineLayout(id) => { + self.pipeline_layout_destroy::(id); + } + A::CreateBindGroup { + id, + label, + layout_id, + entries, + } => { + use wgc::binding_model as bm; + let label = Label::new(&label); + let entry_vec = entries + .into_iter() + .map(|(binding, res)| wgc::binding_model::BindGroupEntry { + binding, + resource: match res { + trace::BindingResource::Buffer { id, offset, size } => { + bm::BindingResource::Buffer(bm::BufferBinding { + buffer: id, + offset, + size, + }) + } + trace::BindingResource::Sampler(id) => bm::BindingResource::Sampler(id), + trace::BindingResource::TextureView(id) => { + bm::BindingResource::TextureView(id) + } + }, + }) + .collect::>(); + self.device_maintain_ids::(device); + self.device_create_bind_group::( + device, + &wgc::binding_model::BindGroupDescriptor { + label: label.as_ptr(), + layout: layout_id, + entries: entry_vec.as_ptr(), + entries_length: entry_vec.len(), + }, + id, + ); + } + A::DestroyBindGroup(id) => { + self.bind_group_destroy::(id); + } + A::CreateShaderModule { id, data } => { + let spv = wgt::read_spirv(File::open(dir.join(data)).unwrap()).unwrap(); + self.device_create_shader_module::( + device, + &wgc::pipeline::ShaderModuleDescriptor { + code: wgc::U32Array { + bytes: spv.as_ptr(), + length: spv.len(), + }, + }, + id, + ); + } + A::DestroyShaderModule(id) => { + self.shader_module_destroy::(id); + } + A::CreateComputePipeline { id, desc } => { + let cs_stage = OwnedProgrammableStage::from(desc.compute_stage); + self.device_maintain_ids::(device); + self.device_create_compute_pipeline::( + device, + &wgc::pipeline::ComputePipelineDescriptor { + layout: desc.layout, + compute_stage: cs_stage.desc, + }, + id, + ); + } + A::DestroyComputePipeline(id) => { + self.compute_pipeline_destroy::(id); + } + A::CreateRenderPipeline { id, desc } => { + let vs_stage = OwnedProgrammableStage::from(desc.vertex_stage); + let fs_stage = desc.fragment_stage.map(OwnedProgrammableStage::from); + let vertex_buffers = desc + .vertex_state + .vertex_buffers + .iter() + .map(|vb| wgc::pipeline::VertexBufferLayoutDescriptor { + array_stride: vb.array_stride, + step_mode: vb.step_mode, + attributes: vb.attributes.as_ptr(), + attributes_length: vb.attributes.len(), + }) + .collect::>(); + self.device_maintain_ids::(device); + self.device_create_render_pipeline::( + device, + &wgc::pipeline::RenderPipelineDescriptor { + layout: desc.layout, + vertex_stage: vs_stage.desc, + fragment_stage: fs_stage.as_ref().map_or(ptr::null(), |s| &s.desc), + primitive_topology: desc.primitive_topology, + rasterization_state: desc + .rasterization_state + .as_ref() + .map_or(ptr::null(), |rs| rs), + color_states: desc.color_states.as_ptr(), + color_states_length: desc.color_states.len(), + depth_stencil_state: desc + .depth_stencil_state + .as_ref() + .map_or(ptr::null(), |ds| ds), + vertex_state: wgc::pipeline::VertexStateDescriptor { + index_format: desc.vertex_state.index_format, + vertex_buffers: vertex_buffers.as_ptr(), + vertex_buffers_length: vertex_buffers.len(), + }, + sample_count: desc.sample_count, + sample_mask: desc.sample_mask, + alpha_to_coverage_enabled: desc.alpha_to_coverage_enabled, + }, + id, + ); + } + A::DestroyRenderPipeline(id) => { + self.render_pipeline_destroy::(id); + } + A::WriteBuffer { id, data, range } => { + let bin = std::fs::read(dir.join(data)).unwrap(); + let size = (range.end - range.start) as usize; + self.device_wait_for_buffer::(device, id); + self.device_set_buffer_sub_data::(device, id, range.start, &bin[..size]); + } + A::Submit(_index, commands) => { + let encoder = self.device_create_command_encoder::( + device, + &wgt::CommandEncoderDescriptor { label: ptr::null() }, + comb_manager.alloc(device.backend()), + ); + let comb = self.encode_commands::(encoder, commands); + self.queue_submit::(device, &[comb]); + } + } + } +} + +fn main() { + #[cfg(feature = "winit")] + use winit::{event_loop::EventLoop, window::WindowBuilder}; + + env_logger::init(); + + //TODO: setting for the backend bits + //TODO: setting for the target frame, or controls + + let dir = match std::env::args().nth(1) { + Some(arg) if Path::new(&arg).is_dir() => PathBuf::from(arg), + _ => panic!("Provide the dir path as the parameter"), + }; + + log::info!("Loading trace '{:?}'", dir); + let file = File::open(dir.join(trace::FILE_NAME)).unwrap(); + let mut actions: Vec = ron::de::from_reader(file).unwrap(); + actions.reverse(); // allows us to pop from the top + log::info!("Found {} actions", actions.len()); + + #[cfg(feature = "winit")] + let mut event_loop = { + log::info!("Creating a window"); + EventLoop::new() + }; + #[cfg(feature = "winit")] + let window = WindowBuilder::new() + .with_title("wgpu player") + .with_resizable(false) + .build(&event_loop) + .unwrap(); + + let global = wgc::hub::Global::new("player", IdentityPassThroughFactory); + let mut command_buffer_id_manager = wgc::hub::IdentityManager::default(); + + #[cfg(feature = "winit")] + let surface = global.instance_create_surface( + raw_window_handle::HasRawWindowHandle::raw_window_handle(&window), + wgc::id::TypedId::zip(0, 1, wgt::Backend::Empty), + ); + + let device = match actions.pop() { + Some(trace::Action::Init { desc, backend }) => { + log::info!("Initializing the device for backend: {:?}", backend); + let adapter = global + .pick_adapter( + &wgc::instance::RequestAdapterOptions { + power_preference: wgt::PowerPreference::Default, + #[cfg(feature = "winit")] + compatible_surface: Some(surface), + #[cfg(not(feature = "winit"))] + compatible_surface: None, + }, + wgc::instance::AdapterInputs::IdSet( + &[wgc::id::TypedId::zip(0, 0, backend)], + |id| id.backend(), + ), + ) + .expect("Unable to find an adapter for selected backend"); + gfx_select!(adapter => global.adapter_request_device( + adapter, + &desc, + None, + wgc::id::TypedId::zip(1, 0, wgt::Backend::Empty) + )) + } + _ => panic!("Expected Action::Init"), + }; + + log::info!("Executing actions"); + #[cfg(not(feature = "winit"))] + while let Some(action) = actions.pop() { + gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager)); + } + #[cfg(feature = "winit")] + { + use winit::{ + event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent}, + event_loop::ControlFlow, + platform::desktop::EventLoopExtDesktop, + }; + + let mut frame_count = 0; + event_loop.run(move |event, _, control_flow| { + *control_flow = ControlFlow::Poll; + match event { + Event::MainEventsCleared => { + window.request_redraw(); + } + Event::RedrawRequested(_) => loop { + match actions.pop() { + Some(trace::Action::CreateSwapChain { id, desc }) => { + log::info!("Initializing the swapchain"); + assert_eq!(id.to_surface_id(), surface); + window.set_inner_size(winit::dpi::PhysicalSize::new( + desc.width, + desc.height, + )); + gfx_select!(device => global.device_create_swap_chain(device, surface, &desc)); + } + Some(trace::Action::PresentSwapChain(id)) => { + frame_count += 1; + log::debug!("Presenting frame {}", frame_count); + gfx_select!(device => global.swap_chain_present(id)); + break; + } + Some(action) => { + gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager)); + } + None => break, + } + }, + Event::WindowEvent { event, .. } => match event { + WindowEvent::KeyboardInput { + input: + KeyboardInput { + virtual_keycode: Some(VirtualKeyCode::Escape), + state: ElementState::Pressed, + .. + }, + .. + } + | WindowEvent::CloseRequested => { + *control_flow = ControlFlow::Exit; + } + _ => {} + }, + Event::LoopDestroyed => { + log::info!("Closing"); + gfx_select!(device => global.device_poll(device, true)); + } + _ => {} + } + }); + } +} diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 0b1185bbd5..49e0497ec0 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -16,8 +16,9 @@ license = "MPL-2.0" [features] default = [] +trace = ["ron", "serde", "wgt/trace"] +replay = ["serde", "wgt/replay"] metal-auto-capture = ["gfx-backend-metal/auto-capture"] -serde = ["wgt/serde", "serde_crate"] #NOTE: glutin feature is not stable, use at your own risk #glutin = ["gfx-backend-gl/glutin"] @@ -33,15 +34,12 @@ gfx-descriptor = "0.1" gfx-memory = "0.1" parking_lot = "0.10" peek-poke = "0.2" +raw-window-handle = { version = "0.3", optional = true } +ron = { version = "0.5", optional = true } +serde = { version = "1.0", features = ["serde_derive"], optional = true } smallvec = "1" vec_map = "0.8" -[dependencies.serde_crate] -package = "serde" -version = "1.0" -features = ["serde_derive"] -optional = true - [dependencies.wgt] path = "../wgpu-types" package = "wgpu-types" diff --git a/wgpu-core/src/binding_model.rs b/wgpu-core/src/binding_model.rs index e8c20477e3..17cfff5cd1 100644 --- a/wgpu-core/src/binding_model.rs +++ b/wgpu-core/src/binding_model.rs @@ -12,17 +12,16 @@ use arrayvec::ArrayVec; use gfx_descriptor::{DescriptorCounts, DescriptorSet}; use wgt::{BufferAddress, TextureComponentType}; -#[cfg(feature = "serde")] -use serde_crate::{Deserialize, Serialize}; +#[cfg(feature = "replay")] +use serde::Deserialize; +#[cfg(feature = "trace")] +use serde::Serialize; use std::borrow::Borrow; #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate") -)] +#[cfg_attr(feature = "trace", derive(Serialize))] +#[cfg_attr(feature = "replay", derive(Deserialize))] pub enum BindingType { UniformBuffer = 0, StorageBuffer = 1, @@ -36,11 +35,8 @@ pub enum BindingType { #[repr(C)] #[derive(Clone, Debug, Hash, PartialEq)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate") -)] +#[cfg_attr(feature = "trace", derive(Serialize))] +#[cfg_attr(feature = "replay", derive(Deserialize))] pub struct BindGroupLayoutEntry { pub binding: u32, pub visibility: wgt::ShaderStage, @@ -86,11 +82,8 @@ pub struct PipelineLayout { #[repr(C)] #[derive(Debug)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate") -)] +#[cfg_attr(feature = "trace", derive(Serialize))] +#[cfg_attr(feature = "replay", derive(Deserialize))] pub struct BufferBinding { pub buffer: BufferId, pub offset: BufferAddress, @@ -99,11 +92,8 @@ pub struct BufferBinding { #[repr(C)] #[derive(Debug)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate") -)] +#[cfg_attr(feature = "trace", derive(Serialize))] +#[cfg_attr(feature = "replay", derive(Deserialize))] pub enum BindingResource { Buffer(BufferBinding), Sampler(SamplerId), @@ -112,11 +102,8 @@ pub enum BindingResource { #[repr(C)] #[derive(Debug)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate") -)] +#[cfg_attr(feature = "trace", derive(Serialize))] +#[cfg_attr(feature = "replay", derive(Deserialize))] pub struct BindGroupEntry { pub binding: u32, pub resource: BindingResource, diff --git a/wgpu-core/src/command/allocator.rs b/wgpu-core/src/command/allocator.rs index 436bb550ad..1d89b38623 100644 --- a/wgpu-core/src/command/allocator.rs +++ b/wgpu-core/src/command/allocator.rs @@ -4,7 +4,8 @@ use super::CommandBuffer; use crate::{ - hub::GfxBackend, id::DeviceId, track::TrackerSet, Features, LifeGuard, Stored, SubmissionIndex, + hub::GfxBackend, id::DeviceId, track::TrackerSet, LifeGuard, PrivateFeatures, Stored, + SubmissionIndex, }; use hal::{command::CommandBuffer as _, device::Device as _, pool::CommandPool as _}; @@ -76,8 +77,10 @@ impl CommandAllocator { &self, device_id: Stored, device: &B::Device, - features: Features, + limits: wgt::Limits, + private_features: PrivateFeatures, lowest_active_index: SubmissionIndex, + #[cfg(feature = "trace")] enable_tracing: bool, ) -> CommandBuffer { //debug_assert_eq!(device_id.backend(), B::VARIANT); let thread_id = thread::current().id(); @@ -108,7 +111,14 @@ impl CommandAllocator { life_guard: LifeGuard::new(), trackers: TrackerSet::new(B::VARIANT), used_swap_chain: None, - features, + limits, + private_features, + #[cfg(feature = "trace")] + commands: if enable_tracing { + Some(Vec::new()) + } else { + None + }, } } } diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index d74035cc3e..bd6d3b4f6c 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -26,11 +26,14 @@ enum PipelineState { } #[derive(Clone, Copy, Debug, PeekPoke)] -enum ComputeCommand { +#[cfg_attr(feature = "trace", derive(serde::Serialize))] +#[cfg_attr(feature = "replay", derive(serde::Deserialize))] +pub enum ComputeCommand { SetBindGroup { index: u8, num_dynamic_offsets: u8, bind_group_id: id::BindGroupId, + #[cfg_attr(any(feature = "trace", feature = "replay"), serde(skip))] phantom_offsets: PhantomSlice, }, SetPipeline(id::ComputePipelineId), @@ -79,7 +82,7 @@ impl Global { let (mut cmb_guard, mut token) = hub.command_buffers.write(&mut token); let cmb = &mut cmb_guard[encoder_id]; let raw = cmb.raw.last_mut().unwrap(); - let mut binder = Binder::new(cmb.features.max_bind_groups); + let mut binder = Binder::new(cmb.limits.max_bind_groups); let (pipeline_layout_guard, mut token) = hub.pipeline_layouts.read(&mut token); let (bind_group_guard, mut token) = hub.bind_groups.read(&mut token); @@ -247,6 +250,43 @@ impl Global { ComputeCommand::End => break, } } + + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => { + let mut pass_commands = Vec::new(); + let mut pass_dynamic_offsets = Vec::new(); + peeker = raw_data.as_ptr(); + loop { + peeker = unsafe { ComputeCommand::peek_from(peeker, &mut command) }; + match command { + ComputeCommand::SetBindGroup { + num_dynamic_offsets, + phantom_offsets, + .. + } => { + let (new_peeker, offsets) = unsafe { + phantom_offsets.decode_unaligned( + peeker, + num_dynamic_offsets as usize, + raw_data_end, + ) + }; + peeker = new_peeker; + pass_dynamic_offsets.extend_from_slice(offsets); + } + ComputeCommand::End => break, + _ => {} + } + pass_commands.push(command); + } + list.push(crate::device::trace::Command::RunComputePass { + commands: pass_commands, + dynamic_offsets: pass_dynamic_offsets, + }); + } + None => {} + } } } diff --git a/wgpu-core/src/command/mod.rs b/wgpu-core/src/command/mod.rs index 9529afc0f8..ac690bd5ad 100644 --- a/wgpu-core/src/command/mod.rs +++ b/wgpu-core/src/command/mod.rs @@ -19,7 +19,7 @@ use crate::{ id, resource::{Buffer, Texture}, track::TrackerSet, - Features, LifeGuard, Stored, + LifeGuard, PrivateFeatures, Stored, }; use peek_poke::PeekPoke; @@ -27,7 +27,7 @@ use peek_poke::PeekPoke; use std::{marker::PhantomData, mem, ptr, slice, thread::ThreadId}; #[derive(Clone, Copy, Debug, PeekPoke)] -struct PhantomSlice(PhantomData); +pub struct PhantomSlice(PhantomData); impl Default for PhantomSlice { fn default() -> Self { @@ -109,13 +109,13 @@ impl RawPass { } #[inline] - unsafe fn encode(&mut self, command: &C) { + pub unsafe fn encode(&mut self, command: &C) { self.ensure_extra_size(C::max_size()); self.data = command.poke_into(self.data); } #[inline] - unsafe fn encode_slice(&mut self, data: &[T]) { + pub unsafe fn encode_slice(&mut self, data: &[T]) { let align_offset = self.data.align_offset(mem::align_of::()); let extra = align_offset + mem::size_of::() * data.len(); self.ensure_extra_size(extra); @@ -138,7 +138,10 @@ pub struct CommandBuffer { pub(crate) life_guard: LifeGuard, pub(crate) trackers: TrackerSet, pub(crate) used_swap_chain: Option<(Stored, B::Framebuffer)>, - pub(crate) features: Features, + limits: wgt::Limits, + private_features: PrivateFeatures, + #[cfg(feature = "trace")] + pub(crate) commands: Option>, } impl CommandBuffer { diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index bb9c186493..9d445559ae 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -46,6 +46,8 @@ pub struct RenderPassDescriptor<'a> { } #[derive(Clone, Copy, Debug, Default, PeekPoke)] +#[cfg_attr(feature = "trace", derive(serde::Serialize))] +#[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub struct Rect { pub x: T, pub y: T, @@ -54,11 +56,14 @@ pub struct Rect { } #[derive(Clone, Copy, Debug, PeekPoke)] -enum RenderCommand { +#[cfg_attr(feature = "trace", derive(serde::Serialize))] +#[cfg_attr(feature = "replay", derive(serde::Deserialize))] +pub enum RenderCommand { SetBindGroup { index: u8, num_dynamic_offsets: u8, bind_group_id: id::BindGroupId, + #[cfg_attr(any(feature = "trace", feature = "replay"), serde(skip))] phantom_offsets: PhantomSlice, }, SetPipeline(id::RenderPipelineId), @@ -329,6 +334,8 @@ impl Global { let mut targets: RawRenderTargets = unsafe { mem::zeroed() }; assert!(unsafe { peeker.add(RawRenderTargets::max_size()) <= raw_data_end }); peeker = unsafe { RawRenderTargets::peek_from(peeker, &mut targets) }; + #[cfg(feature = "trace")] + let command_peeker_base = peeker; let color_attachments = targets .colors @@ -431,7 +438,10 @@ impl Global { }; Some(hal::pass::Attachment { - format: Some(conv::map_texture_format(view.format, device.features)), + format: Some(conv::map_texture_format( + view.format, + device.private_features, + )), samples: view.samples, ops: conv::map_load_store_ops(at.depth_load_op, at.depth_store_op), stencil_ops: conv::map_load_store_ops( @@ -495,7 +505,10 @@ impl Global { }; colors.push(hal::pass::Attachment { - format: Some(conv::map_texture_format(view.format, device.features)), + format: Some(conv::map_texture_format( + view.format, + device.private_features, + )), samples: view.samples, ops: conv::map_load_store_ops(at.load_op, at.store_op), stencil_ops: hal::pass::AttachmentOps::DONT_CARE, @@ -541,7 +554,10 @@ impl Global { }; resolves.push(hal::pass::Attachment { - format: Some(conv::map_texture_format(view.format, device.features)), + format: Some(conv::map_texture_format( + view.format, + device.private_features, + )), samples: view.samples, ops: hal::pass::AttachmentOps::new( hal::pass::AttachmentLoadOp::DontCare, @@ -788,7 +804,7 @@ impl Global { }; let mut state = State { - binder: Binder::new(cmb.features.max_bind_groups), + binder: Binder::new(cmb.limits.max_bind_groups), blend_color: OptionalState::Unused, stencil_reference: OptionalState::Unused, pipeline: OptionalState::Required, @@ -1164,6 +1180,45 @@ impl Global { } } + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => { + let mut pass_commands = Vec::new(); + let mut pass_dynamic_offsets = Vec::new(); + peeker = command_peeker_base; + loop { + peeker = unsafe { RenderCommand::peek_from(peeker, &mut command) }; + match command { + RenderCommand::SetBindGroup { + num_dynamic_offsets, + phantom_offsets, + .. + } => { + let (new_peeker, offsets) = unsafe { + phantom_offsets.decode_unaligned( + peeker, + num_dynamic_offsets as usize, + raw_data_end, + ) + }; + peeker = new_peeker; + pass_dynamic_offsets.extend_from_slice(offsets); + } + RenderCommand::End => break, + _ => {} + } + pass_commands.push(command); + } + list.push(crate::device::trace::Command::RunRenderPass { + target_colors: color_attachments.into_iter().collect(), + target_depth_stencil: depth_stencil_attachment.cloned(), + commands: pass_commands, + dynamic_offsets: pass_dynamic_offsets, + }); + } + None => {} + } + log::trace!("Merging {:?} with the render pass", encoder_id); unsafe { raw.end_render_pass(); diff --git a/wgpu-core/src/command/transfer.rs b/wgpu-core/src/command/transfer.rs index 62fcb56f8b..f3c8adc47f 100644 --- a/wgpu-core/src/command/transfer.rs +++ b/wgpu-core/src/command/transfer.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#[cfg(feature = "trace")] +use crate::device::trace::Command as TraceCommand; use crate::{ conv, device::{all_buffer_stages, all_image_stages}, @@ -18,7 +20,9 @@ use std::iter; const BITS_PER_BYTE: u32 = 8; #[repr(C)] -#[derive(Debug)] +#[derive(Clone, Debug)] +#[cfg_attr(feature = "trace", derive(serde::Serialize))] +#[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub struct BufferCopyView { pub buffer: BufferId, pub offset: BufferAddress, @@ -27,7 +31,9 @@ pub struct BufferCopyView { } #[repr(C)] -#[derive(Debug)] +#[derive(Clone, Debug)] +#[cfg_attr(feature = "trace", derive(serde::Serialize))] +#[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub struct TextureCopyView { pub texture: TextureId, pub mip_level: u32, @@ -90,6 +96,18 @@ impl Global { // borrow the buffer tracker mutably... let mut barriers = Vec::new(); + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => list.push(TraceCommand::CopyBufferToBuffer { + src: source, + src_offset: source_offset, + dst: destination, + dst_offset: destination_offset, + size, + }), + None => (), + } + let (src_buffer, src_pending) = cmb.trackers .buffers @@ -135,6 +153,16 @@ impl Global { let (texture_guard, _) = hub.textures.read(&mut token); let aspects = texture_guard[destination.texture].full_range.aspects; + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => list.push(TraceCommand::CopyBufferToTexture { + src: source.clone(), + dst: destination.clone(), + size: copy_size, + }), + None => (), + } + let (src_buffer, src_pending) = cmb.trackers.buffers.use_replace( &*buffer_guard, source.buffer, @@ -153,7 +181,7 @@ impl Global { assert!(dst_texture.usage.contains(TextureUsage::COPY_DST)); let dst_barriers = dst_pending.map(|pending| pending.into_hal(dst_texture)); - let bytes_per_texel = conv::map_texture_format(dst_texture.format, cmb.features) + let bytes_per_texel = conv::map_texture_format(dst_texture.format, cmb.private_features) .surface_desc() .bits as u32 / BITS_PER_BYTE; @@ -199,6 +227,16 @@ impl Global { let (texture_guard, _) = hub.textures.read(&mut token); let aspects = texture_guard[source.texture].full_range.aspects; + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => list.push(TraceCommand::CopyTextureToBuffer { + src: source.clone(), + dst: destination.clone(), + size: copy_size, + }), + None => (), + } + let (src_texture, src_pending) = cmb.trackers.textures.use_replace( &*texture_guard, source.texture, @@ -217,7 +255,7 @@ impl Global { assert!(dst_buffer.usage.contains(BufferUsage::COPY_DST)); let dst_barrier = dst_barriers.map(|pending| pending.into_hal(dst_buffer)); - let bytes_per_texel = conv::map_texture_format(src_texture.format, cmb.features) + let bytes_per_texel = conv::map_texture_format(src_texture.format, cmb.private_features) .surface_desc() .bits as u32 / BITS_PER_BYTE; @@ -268,6 +306,16 @@ impl Global { let aspects = texture_guard[source.texture].full_range.aspects & texture_guard[destination.texture].full_range.aspects; + #[cfg(feature = "trace")] + match cmb.commands { + Some(ref mut list) => list.push(TraceCommand::CopyTextureToTexture { + src: source.clone(), + dst: destination.clone(), + size: copy_size, + }), + None => (), + } + let (src_texture, src_pending) = cmb.trackers.textures.use_replace( &*texture_guard, source.texture, diff --git a/wgpu-core/src/conv.rs b/wgpu-core/src/conv.rs index 510ec6c568..5f239c933b 100644 --- a/wgpu-core/src/conv.rs +++ b/wgpu-core/src/conv.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::{binding_model, resource, Features}; +use crate::{binding_model, resource, PrivateFeatures}; pub fn map_buffer_usage(usage: wgt::BufferUsage) -> (hal::buffer::Usage, hal::memory::Properties) { use hal::buffer::Usage as U; @@ -321,7 +321,7 @@ fn map_stencil_operation(stencil_operation: wgt::StencilOperation) -> hal::pso:: pub(crate) fn map_texture_format( texture_format: wgt::TextureFormat, - features: Features, + private_features: PrivateFeatures, ) -> hal::format::Format { use hal::format::Format as H; use wgt::TextureFormat as Tf; @@ -376,14 +376,14 @@ pub(crate) fn map_texture_format( // Depth and stencil formats Tf::Depth32Float => H::D32Sfloat, Tf::Depth24Plus => { - if features.supports_texture_d24_s8 { + if private_features.supports_texture_d24_s8 { H::D24UnormS8Uint } else { H::D32Sfloat } } Tf::Depth24PlusStencil8 => { - if features.supports_texture_d24_s8 { + if private_features.supports_texture_d24_s8 { H::D24UnormS8Uint } else { H::D32SfloatS8Uint diff --git a/wgpu-core/src/device/life.rs b/wgpu-core/src/device/life.rs index 765193adba..9a1c6c8eab 100644 --- a/wgpu-core/src/device/life.rs +++ b/wgpu-core/src/device/life.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#[cfg(feature = "trace")] +use crate::device::trace; use crate::{ hub::{GfxBackend, Global, GlobalIdentityHandlerFactory, Token}, id, resource, @@ -288,6 +290,7 @@ impl LifetimeTracker { &mut self, global: &Global, trackers: &Mutex, + #[cfg(feature = "trace")] trace: Option<&Mutex>, token: &mut Token>, ) { let hub = B::hub(global); @@ -298,6 +301,8 @@ impl LifetimeTracker { for id in self.suspected_resources.bind_groups.drain(..) { if trackers.bind_groups.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyBindGroup(id))); hub.bind_groups.free_id(id); let res = guard.remove(id).unwrap(); @@ -332,6 +337,8 @@ impl LifetimeTracker { for id in self.suspected_resources.texture_views.drain(..) { if trackers.views.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyTextureView(id))); hub.texture_views.free_id(id); let res = guard.remove(id).unwrap(); @@ -360,6 +367,8 @@ impl LifetimeTracker { for id in self.suspected_resources.textures.drain(..) { if trackers.textures.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyTexture(id))); hub.textures.free_id(id); let res = guard.remove(id).unwrap(); @@ -380,6 +389,8 @@ impl LifetimeTracker { for id in self.suspected_resources.samplers.drain(..) { if trackers.samplers.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroySampler(id))); hub.samplers.free_id(id); let res = guard.remove(id).unwrap(); @@ -400,6 +411,8 @@ impl LifetimeTracker { for id in self.suspected_resources.buffers.drain(..) { if trackers.buffers.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyBuffer(id))); hub.buffers.free_id(id); let res = guard.remove(id).unwrap(); log::debug!("Buffer {:?} is detached", id); @@ -421,6 +434,8 @@ impl LifetimeTracker { for id in self.suspected_resources.compute_pipelines.drain(..) { if trackers.compute_pipes.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyComputePipeline(id))); hub.compute_pipelines.free_id(id); let res = guard.remove(id).unwrap(); @@ -441,6 +456,8 @@ impl LifetimeTracker { for id in self.suspected_resources.render_pipelines.drain(..) { if trackers.render_pipes.remove_abandoned(id) { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyRenderPipeline(id))); hub.render_pipelines.free_id(id); let res = guard.remove(id).unwrap(); @@ -465,6 +482,8 @@ impl LifetimeTracker { { //Note: this has to happen after all the suspected pipelines are destroyed if ref_count.load() == 1 { + #[cfg(feature = "trace")] + trace.map(|t| t.lock().add(trace::Action::DestroyPipelineLayout(id))); hub.pipeline_layouts.free_id(id); let layout = guard.remove(id).unwrap(); self.free_resources.pipeline_layouts.push(layout.raw); @@ -598,20 +617,24 @@ impl LifetimeTracker { } else { let mapping = match std::mem::replace( &mut buffer.map_state, - resource::BufferMapState::Active, + resource::BufferMapState::Idle, ) { resource::BufferMapState::Waiting(pending_mapping) => pending_mapping, _ => panic!("No pending mapping."), }; log::debug!("Buffer {:?} map state -> Active", buffer_id); - let result = match mapping.op { - resource::BufferMapOperation::Read { .. } => { - super::map_buffer(raw, buffer, mapping.sub_range, super::HostMap::Read) - } - resource::BufferMapOperation::Write { .. } => { - super::map_buffer(raw, buffer, mapping.sub_range, super::HostMap::Write) - } + let host = match mapping.op { + resource::BufferMapOperation::Read { .. } => super::HostMap::Read, + resource::BufferMapOperation::Write { .. } => super::HostMap::Write, }; + let result = super::map_buffer(raw, buffer, mapping.sub_range.clone(), host); + if let Ok(ptr) = result { + buffer.map_state = resource::BufferMapState::Active { + ptr, + sub_range: mapping.sub_range, + host, + }; + } pending_callbacks.push((mapping.op, result)); } } diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 999dbd7279..57c0331b70 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -7,7 +7,7 @@ use crate::{ hub::{GfxBackend, Global, GlobalIdentityHandlerFactory, Input, Token}, id, pipeline, resource, swap_chain, track::{BufferState, TextureState, TrackerSet}, - FastHashMap, Features, LifeGuard, Stored, + FastHashMap, LifeGuard, PrivateFeatures, Stored, }; use arrayvec::ArrayVec; @@ -31,6 +31,22 @@ use std::{ }; mod life; +#[cfg(any(feature = "trace", feature = "replay"))] +pub mod trace; +#[cfg(feature = "trace")] +use trace::{Action, Trace}; + +pub type Label = *const std::os::raw::c_char; +#[cfg(feature = "trace")] +fn own_label(label: &Label) -> String { + if label.is_null() { + String::new() + } else { + unsafe { ffi::CStr::from_ptr(*label) } + .to_string_lossy() + .to_string() + } +} pub const MAX_COLOR_TARGETS: usize = 4; pub const MAX_MIP_LEVELS: usize = 16; @@ -109,50 +125,38 @@ fn map_buffer( sub_range: hal::buffer::SubRange, kind: HostMap, ) -> BufferMapResult { - let (ptr, sync_range) = { + let (ptr, segment, needs_sync) = { let segment = hal::memory::Segment { offset: sub_range.offset, size: sub_range.size, }; let mapped = buffer.memory.map(raw, segment)?; - let sync_range = if mapped.is_coherent() { - None - } else { - Some(mapped.range()) + let mr = mapped.range(); + let segment = hal::memory::Segment { + offset: mr.start, + size: Some(mr.end - mr.start), }; - (mapped.ptr(), sync_range) + (mapped.ptr(), segment, !mapped.is_coherent()) }; - if let Some(range) = sync_range { - let segment = hal::memory::Segment { - offset: range.start, - size: Some(range.end - range.start), - }; - match kind { - HostMap::Read => unsafe { - raw.invalidate_mapped_memory_ranges(iter::once((buffer.memory.memory(), segment))) - .unwrap(); - }, - HostMap::Write => { - buffer.mapped_write_segments.push(segment); - } - } - } + buffer.sync_mapped_writes = match kind { + HostMap::Read if needs_sync => unsafe { + raw.invalidate_mapped_memory_ranges(iter::once((buffer.memory.memory(), segment))) + .unwrap(); + None + }, + HostMap::Write if needs_sync => Some(segment), + _ => None, + }; Ok(ptr.as_ptr()) } fn unmap_buffer(raw: &B::Device, buffer: &mut resource::Buffer) { - if !buffer.mapped_write_segments.is_empty() { + if let Some(segment) = buffer.sync_mapped_writes.take() { unsafe { - raw.flush_mapped_memory_ranges( - buffer - .mapped_write_segments - .iter() - .map(|r| (buffer.memory.memory(), r.clone())), - ) - .unwrap() + raw.flush_mapped_memory_ranges(iter::once((buffer.memory.memory(), segment))) + .unwrap() }; - buffer.mapped_write_segments.clear(); } } @@ -193,7 +197,11 @@ pub struct Device { // Life tracker should be locked right after the device and before anything else. life_tracker: Mutex>, temp_suspected: life::SuspectedResources, - pub(crate) features: Features, + pub(crate) private_features: PrivateFeatures, + limits: wgt::Limits, + extensions: wgt::Extensions, + #[cfg(feature = "trace")] + pub(crate) trace: Option>, } impl Device { @@ -204,7 +212,8 @@ impl Device { mem_props: hal::adapter::MemoryProperties, non_coherent_atom_size: u64, supports_texture_d24_s8: bool, - max_bind_groups: u32, + desc: &wgt::DeviceDescriptor, + trace_path: Option<&std::path::Path>, ) -> Self { // don't start submission index at zero let life_guard = LifeGuard::new(); @@ -224,6 +233,11 @@ impl Device { non_coherent_atom_size, ) }; + #[cfg(not(feature = "trace"))] + match trace_path { + Some(_) => log::warn!("Tracing feature is not enabled"), + None => (), + } Device { raw, @@ -238,10 +252,25 @@ impl Device { framebuffers: Mutex::new(FastHashMap::default()), life_tracker: Mutex::new(life::LifetimeTracker::new()), temp_suspected: life::SuspectedResources::default(), - features: Features { - max_bind_groups, + #[cfg(feature = "trace")] + trace: trace_path.and_then(|path| match Trace::new(path) { + Ok(mut trace) => { + trace.add(Action::Init { + desc: desc.clone(), + backend: B::VARIANT, + }); + Some(Mutex::new(trace)) + } + Err(e) => { + log::warn!("Unable to start a trace in '{:?}': {:?}", path, e); + None + } + }), + private_features: PrivateFeatures { supports_texture_d24_s8, }, + limits: desc.limits.clone(), + extensions: desc.extensions.clone(), } } @@ -260,7 +289,13 @@ impl Device { ) -> Vec { let mut life_tracker = self.lock_life(token); - life_tracker.triage_suspected(global, &self.trackers, token); + life_tracker.triage_suspected( + global, + &self.trackers, + #[cfg(feature = "trace")] + self.trace.as_ref(), + token, + ); life_tracker.triage_mapped(global, token); life_tracker.triage_framebuffers(global, &mut *self.framebuffers.lock(), token); let _last_done = life_tracker.triage_submissions(&self.raw, force_wait); @@ -272,7 +307,7 @@ impl Device { fn create_buffer( &self, self_id: id::DeviceId, - desc: &wgt::BufferDescriptor, + desc: &wgt::BufferDescriptor