diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 2e978baa..dae2e12c 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -53,9 +53,17 @@ jobs: echo $CACHE_PATH echo "cachepath-$RUNNER_OS=$CACHE_PATH" >> "$GITHUB_OUTPUT" - # Builds the shaders and ensures there is no git diff + # Ensures the generated linkage code matches what is committed. + # + # NOTE: `cargo shaders` (rust-gpu SPIR-V compilation) is temporarily skipped. + # The pinned rust-gpu rev (05b34493, toolchain nightly-2025-02-16, rustc + # 1.86) predates naga 30's MSRV of 1.87, which fails the shader build's + # dependency resolution. The committed .spv files are rust-gpu output and do + # not change with the wgpu version, so they are kept as-is. To re-enable, + # bump the rust-gpu rev (v0.11 uses nightly-2026-08-15) and restore the + # `cargo shaders` step, the `crates/renderling/shaders` deletion and the + # `needs: install-cargo-gpu` + cargo-gpu cache steps. renderling-build-shaders: - needs: install-cargo-gpu strategy: fail-fast: false matrix: @@ -70,28 +78,12 @@ jobs: RUST_LOG: debug steps: - uses: actions/checkout@v2 - # Disable moonrepo's built-in cache so it doesn't overwrite ~/.cargo - # (which contains the cargo-gpu binary from the install-cargo-gpu job). - uses: moonrepo/setup-rust@v1 with: cache: false - - uses: actions/cache@v4 - with: - path: ~/.cargo - # THIS KEY MUST MATCH ABOVE - key: cargo-cache-2-${{ env.CARGO_GPU_COMMITSH }}-${{ matrix.os }} - - uses: actions/cache@v4 - with: - path: | - ${{ needs.install-cargo-gpu.outputs.cachepath-macOS }} - ${{ needs.install-cargo-gpu.outputs.cachepath-Linux }} - ${{ needs.install-cargo-gpu.outputs.cachepath-Windows }} - key: rust-gpu-cache-1-${{ matrix.os }} - run: rustup install $RUST_NIGHTLY_TOOLCHAIN - run: rustup component add --toolchain $RUST_NIGHTLY_TOOLCHAIN rustfmt - - run: cargo gpu show commitsh - - run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders - - run: cargo shaders + - run: rm -rf crates/renderling/src/linkage/* - run: cargo linkage - run: cargo build -p renderling - run: git diff --exit-code --no-ext-diff diff --git a/AGENTS.md b/AGENTS.md index b969f2f1..8bab2a3c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,3 +21,7 @@ The fmt toolchain is pinned to `nightly-2026-10-10` via `RUST_NIGHTLY_TOOLCHAIN` ## Disallowed Methods (clippy.toml) Avoid: `Vec{2,3,4}::normalize_or_zero`, `Mat4::to_scale_rotation_translation`, `f32::signum` + +## Beads + +The bead prefix for this project is `rling`. diff --git a/Cargo.lock b/Cargo.lock index d73ec651..bc810d1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -295,6 +295,17 @@ version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -433,18 +444,18 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bit-set" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" [[package]] name = "bit_field" @@ -463,9 +474,6 @@ name = "bitflags" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" -dependencies = [ - "serde", -] [[package]] name = "bitstream-io" @@ -485,7 +493,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", ] [[package]] @@ -577,6 +594,12 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" version = "1.2.29" @@ -612,9 +635,9 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "cgmath" @@ -639,7 +662,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -708,9 +731,9 @@ dependencies = [ [[package]] name = "codespan-reporting" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" dependencies = [ "serde", "termcolor", @@ -833,16 +856,17 @@ dependencies = [ [[package]] name = "craballoc" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6042c2cfdfce510235f88fea69e263ab3d3a1780f4a645fbddca2adf3af8d6bc" +checksum = "defed8174e995d5ecb5556d71bfe4d709dd4ce0b6a69f8ee2f6ab9797a22284e" dependencies = [ "async-channel 1.9.0", "bytemuck", "crabslab", + "crabslab-derive", "log", "rustc-hash 1.1.0", - "snafu 0.8.6", + "snafu 0.8.9", "tracing", "wgpu", ] @@ -986,6 +1010,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.9.1", + "objc2 0.6.5", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1279,6 +1313,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "font-kit" version = "0.14.3" @@ -1530,18 +1570,18 @@ dependencies = [ [[package]] name = "glam" -version = "0.30.4" +version = "0.30.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a99dbe56b72736564cfa4b85bf9a33079f16ae8b74983ab06af3b1a3696b11" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" dependencies = [ "libm", ] [[package]] name = "glow" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" dependencies = [ "js-sys", "slotmap", @@ -1635,57 +1675,20 @@ dependencies = [ "xi-unicode", ] -[[package]] -name = "gpu-alloc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" -dependencies = [ - "bitflags 2.9.1", - "gpu-alloc-types", -] - -[[package]] -name = "gpu-alloc-types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" -dependencies = [ - "bitflags 2.9.1", -] - [[package]] name = "gpu-allocator" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" dependencies = [ + "ash", + "hashbrown 0.16.1", "log", "presser", - "thiserror 1.0.69", + "thiserror 2.0.12", "windows", ] -[[package]] -name = "gpu-descriptor" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" -dependencies = [ - "bitflags 2.9.1", - "gpu-descriptor-types", - "hashbrown", -] - -[[package]] -name = "gpu-descriptor-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" -dependencies = [ - "bitflags 2.9.1", -] - [[package]] name = "h2" version = "0.4.12" @@ -1724,7 +1727,27 @@ checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", ] [[package]] @@ -1754,12 +1777,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - [[package]] name = "http" version = "1.3.1" @@ -2110,12 +2127,12 @@ checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" [[package]] name = "indexmap" -version = "2.10.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", ] [[package]] @@ -2179,7 +2196,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.2", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2243,11 +2260,12 @@ checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -2282,9 +2300,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "libfuzzer-sys" @@ -2303,7 +2321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.48.5", ] [[package]] @@ -2362,7 +2380,7 @@ dependencies = [ "send_wrapper", "serde", "serde_json", - "snafu 0.8.6", + "snafu 0.8.9", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2380,9 +2398,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" [[package]] name = "loop9" @@ -2508,9 +2526,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minicov" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" +checksum = "4869b6a491569605d66d3952bcdf03df789e5b536e5f0cf7758a7f08a55ae24d" dependencies = [ "cc", "walkdir", @@ -2545,9 +2563,9 @@ dependencies = [ [[package]] name = "naga" -version = "26.0.0" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" dependencies = [ "arrayvec", "bit-set", @@ -2556,11 +2574,11 @@ dependencies = [ "cfg_aliases", "codespan-reporting", "half", - "hashbrown", - "hexf-parse", + "hashbrown 0.17.1", "indexmap", "libm", "log", + "naga-types", "num-traits", "once_cell", "petgraph", @@ -2570,6 +2588,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash 1.1.0", + "thiserror 2.0.12", +] + [[package]] name = "native-tls" version = "0.2.14" @@ -2649,6 +2679,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.60.2", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -2756,6 +2795,15 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -2763,13 +2811,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.9.1", - "block2", + "block2 0.5.1", "libc", - "objc2", + "objc2 0.5.2", "objc2-core-data", "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", ] [[package]] @@ -2779,10 +2827,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2791,9 +2839,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2803,9 +2851,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.9.1", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] @@ -2814,10 +2885,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", ] [[package]] @@ -2826,10 +2897,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-contacts", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2845,10 +2916,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.9.1", - "block2", + "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.9.1", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.9.1", + "objc2 0.6.5", + "objc2-core-foundation", ] [[package]] @@ -2857,10 +2950,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-app-kit", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2870,9 +2963,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.9.1", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", ] [[package]] @@ -2882,10 +2987,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.9.1", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", ] [[package]] @@ -2894,8 +3013,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" dependencies = [ - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2905,15 +3024,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", "objc2-core-image", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-link-presentation", - "objc2-quartz-core", + "objc2-quartz-core 0.2.2", "objc2-symbols", "objc2-uniform-type-identifiers", "objc2-user-notifications", @@ -2925,9 +3044,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2937,10 +3056,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.9.1", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2964,6 +3083,12 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + [[package]] name = "openssl" version = "0.10.73" @@ -3114,7 +3239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" dependencies = [ "fixedbitset", - "hashbrown", + "hashbrown 0.15.4", "indexmap", ] @@ -3602,6 +3727,18 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + [[package]] name = "rayon" version = "1.10.0" @@ -3733,7 +3870,7 @@ dependencies = [ "serde", "serde_json", "similarity", - "snafu 0.8.6", + "snafu 0.8.9", "spirv-std", "ttf-parser 0.20.0", "wasm-bindgen", @@ -3764,7 +3901,7 @@ dependencies = [ "renderling", "renderling_build", "rustc-hash 1.1.0", - "snafu 0.8.6", + "snafu 0.8.9", "wgpu", ] @@ -3893,7 +4030,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3906,7 +4043,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4204,11 +4341,11 @@ dependencies = [ [[package]] name = "snafu" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320b01e011bf8d5d7a4a4a4be966d9160968935849c83b918827f6a435e7f627" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" dependencies = [ - "snafu-derive 0.8.6", + "snafu-derive 0.8.9", ] [[package]] @@ -4225,11 +4362,11 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1961e2ef424c1424204d3a5d6975f934f56b6d50ff5732382d84ebf460e147f7" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.104", @@ -4247,9 +4384,9 @@ dependencies = [ [[package]] name = "spirv" -version = "0.3.0+sdk-1.3.268.0" +version = "0.4.0+sdk-1.4.341.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" dependencies = [ "bitflags 2.9.1", ] @@ -4347,6 +4484,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -4873,48 +5021,33 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.104", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" dependencies = [ - "cfg-if", "js-sys", - "once_cell", + "tokio", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4922,50 +5055,65 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.104", - "wasm-bindgen-backend", + "syn 3.0.9", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-bindgen-test" -version = "0.3.50" +version = "0.3.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" +checksum = "ae7499dfd45780a0a91d7ee6bb9ac51970a4479a41a89da443fdda5a39547d42" dependencies = [ + "async-trait", + "cast", "js-sys", + "libm", "minicov", + "nu-ansi-term", + "num-traits", + "oorandom", + "serde", + "serde_json", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test-macro", + "wasm-bindgen-test-shared", ] [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.50" +version = "0.3.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" +checksum = "3b84b5ac638bfb168196a1a461fcc8f46a294a18b1b6be52133b4e0db122cc9f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 3.0.9", ] +[[package]] +name = "wasm-bindgen-test-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f692aa943ccd88363733b77063f32cfed5bc6cbea8e6e8b251b302f881606fe" + [[package]] name = "wasm-streams" version = "0.4.2" @@ -5090,9 +5238,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" dependencies = [ "js-sys", "wasm-bindgen", @@ -5116,16 +5264,17 @@ checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" [[package]] name = "wgpu" -version = "26.0.1" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" dependencies = [ "arrayvec", "bitflags 2.9.1", + "bytemuck", "cfg-if", "cfg_aliases", "document-features", - "hashbrown", + "hashbrown 0.17.1", "js-sys", "log", "naga", @@ -5145,9 +5294,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "26.0.1" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" dependencies = [ "arrayvec", "bit-set", @@ -5156,10 +5305,11 @@ dependencies = [ "bytemuck", "cfg_aliases", "document-features", - "hashbrown", + "hashbrown 0.17.1", "indexmap", "log", "naga", + "naga-types", "once_cell", "parking_lot", "portable-atomic", @@ -5172,67 +5322,71 @@ dependencies = [ "wgpu-core-deps-emscripten", "wgpu-core-deps-windows-linux-android", "wgpu-hal", + "wgpu-naga-bridge", "wgpu-types", ] [[package]] name = "wgpu-core-deps-apple" -version = "26.0.0" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "26.0.0" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7670e390f416006f746b4600fdd9136455e3627f5bd763abf9a65daa216dd2d" +checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "26.0.0" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "26.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", "bitflags 2.9.1", - "block", + "block2 0.6.2", "bytemuck", "cfg-if", "cfg_aliases", - "core-graphics-types 0.2.0", "glow", "glutin_wgl_sys", - "gpu-alloc", "gpu-allocator", - "gpu-descriptor", - "hashbrown", + "hashbrown 0.17.1", "js-sys", "khronos-egl", "libc", "libloading", "log", - "metal", "naga", + "naga-types", "ndk-sys", - "objc", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "once_cell", "ordered-float", "parking_lot", "portable-atomic", @@ -5240,27 +5394,44 @@ dependencies = [ "profiling", "range-alloc", "raw-window-handle", + "raw-window-metal", "renderdoc-sys", "smallvec", + "static_assertions", "thiserror 2.0.12", "wasm-bindgen", + "wayland-sys", "web-sys", + "wgpu-naga-bridge", "wgpu-types", "windows", - "windows-core 0.58.0", + "windows-core 0.62.2", + "windows-result 0.4.1", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", ] [[package]] name = "wgpu-types" -version = "26.0.0" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" dependencies = [ "bitflags 2.9.1", "bytemuck", "js-sys", "log", - "thiserror 2.0.12", + "naga-types", + "raw-window-handle", + "static_assertions", "web-sys", ] @@ -5286,7 +5457,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5297,25 +5468,23 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.58.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-collections", + "windows-core 0.62.2", + "windows-future", + "windows-numerics", ] [[package]] -name = "windows-core" -version = "0.58.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-core 0.62.2", ] [[package]] @@ -5324,40 +5493,42 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.0", - "windows-interface 0.59.1", - "windows-link", + "windows-implement", + "windows-interface", + "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", ] [[package]] -name = "windows-implement" -version = "0.58.0" +name = "windows-core" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] -name = "windows-implement" -version = "0.60.0" +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading", ] [[package]] -name = "windows-interface" -version = "0.58.0" +name = "windows-implement" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", @@ -5366,9 +5537,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", @@ -5381,52 +5552,67 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", +] + [[package]] name = "windows-registry" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-targets 0.52.6", + "windows-link 0.1.3", ] [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", + "windows-link 0.1.3", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -5527,6 +5713,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5717,7 +5912,7 @@ dependencies = [ "android-activity", "atomic-waker", "bitflags 2.9.1", - "block2", + "block2 0.5.1", "bytemuck", "calloop", "cfg_aliases", @@ -5730,9 +5925,9 @@ dependencies = [ "libc", "memmap2", "ndk", - "objc2", + "objc2 0.5.2", "objc2-app-kit", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-ui-kit", "orbclient", "percent-encoding", diff --git a/Cargo.toml b/Cargo.toml index 8bc0c031..19a3e1b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ bytemuck = { version = "1.19.0", features = ["derive"] } cfg_aliases = "0.2" clap = { version = "4.5.23", features = ["derive"] } console_log = "1.0.0" -craballoc = { version = "0.3.1" } +craballoc = { version = "0.3.3" } crabslab = { version = "0.6.6", default-features = false } plotters = "0.3.7" ctor = "0.2.2" @@ -40,7 +40,7 @@ image = "0.25" log = "0.4" loading-bytes = { path = "crates/loading-bytes", version = "0.1.1" } lyon = "1.0.1" -naga = { version = "26.0", features = ["spv-in", "wgsl-out", "wgsl-in", "msl-out"] } +naga = { version = "30.0", features = ["spv-in", "wgsl-out", "wgsl-in", "msl-out"] } new_mime_guess = "4.0.4" pretty_assertions = "1.4.0" proc-macro2 = { version = "1.0", features = ["span-locations"] } @@ -62,8 +62,8 @@ wasm-bindgen-futures = "0.4" wasm-bindgen-test = "0.3" web-sys = "0.3" winit = { version = "0.30.12" } -wgpu = { version = "26.0" } -wgpu-core = { version = "26.0" } +wgpu = { version = "30.0" } +wgpu-core = { version = "30.0" } metal = "0.32" [profile.dev] diff --git a/crates/example/src/main.rs b/crates/example/src/main.rs index 0b1e9063..7f82d86f 100644 --- a/crates/example/src/main.rs +++ b/crates/example/src/main.rs @@ -61,7 +61,10 @@ impl InnerApp { self.app.set_size(size); } winit::event::WindowEvent::RedrawRequested => { - self.ctx.get_device().poll(wgpu::PollType::Wait).unwrap(); + self.ctx + .get_device() + .poll(wgpu::PollType::wait_indefinitely()) + .unwrap(); } e => self.app.camera_controller.window_event(e), } diff --git a/crates/renderling-ui/src/renderer.rs b/crates/renderling-ui/src/renderer.rs index 43cef458..6ea4d4cc 100644 --- a/crates/renderling-ui/src/renderer.rs +++ b/crates/renderling-ui/src/renderer.rs @@ -2165,6 +2165,7 @@ impl UiRenderer { { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Self::LABEL, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: color_view, @@ -2290,11 +2291,12 @@ impl UiRenderer { let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Self::LABEL, - bind_group_layouts: &[bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(bindgroup_layout)], + immediate_size: 0, }); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Self::LABEL, layout: Some(&pipeline_layout), vertex: wgpu::VertexState { @@ -2328,7 +2330,6 @@ impl UiRenderer { write_mask: wgpu::ColorWrites::ALL, })], }), - multiview: None, cache: None, }) } diff --git a/crates/renderling/src/atlas/cpu.rs b/crates/renderling/src/atlas/cpu.rs index f1ac3348..7963feca 100644 --- a/crates/renderling/src/atlas/cpu.rs +++ b/crates/renderling/src/atlas/cpu.rs @@ -270,7 +270,7 @@ impl Atlas { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Nearest, min_filter: wgpu::FilterMode::Nearest, - mipmap_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, ..Default::default() }; @@ -1002,6 +1002,7 @@ impl AtlasBlittingOperation { array_layer_count: Some(1), }); let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some("atlas-blitter"), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &atlas_view, @@ -1099,13 +1100,14 @@ impl AtlasBlitter { let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("atlas-blitter"), - bind_group_layouts: &[&bind_group_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bind_group_layout)], + immediate_size: 0, }); let vertex = crate::linkage::atlas_blit_vertex::linkage(device); let fragment = crate::linkage::atlas_blit_fragment::linkage(device); let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("atlas-blitter"), layout: Some(&pipeline_layout), vertex: wgpu::VertexState { @@ -1135,7 +1137,6 @@ impl AtlasBlitter { write_mask: wgpu::ColorWrites::ALL, })], }), - multiview: None, cache: None, }); diff --git a/crates/renderling/src/bloom/cpu.rs b/crates/renderling/src/bloom/cpu.rs index 3da9b46a..4015b40c 100644 --- a/crates/renderling/src/bloom/cpu.rs +++ b/crates/renderling/src/bloom/cpu.rs @@ -51,12 +51,13 @@ fn create_bloom_downsample_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeli let bindgroup_layout = create_bindgroup_layout(device, label); let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex_module = crate::linkage::bloom_vertex::linkage(device); let fragment_module = crate::linkage::bloom_downsample_fragment::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&layout), vertex: wgpu::VertexState { @@ -86,7 +87,6 @@ fn create_bloom_downsample_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeli })], compilation_options: Default::default(), }), - multiview: None, cache: None, }) } @@ -96,12 +96,13 @@ fn create_bloom_upsample_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeline let bindgroup_layout = create_bindgroup_layout(device, label); let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex_module = crate::linkage::bloom_vertex::linkage(device); let fragment_module = crate::linkage::bloom_upsample_fragment::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&layout), vertex: wgpu::VertexState { @@ -131,7 +132,6 @@ fn create_bloom_upsample_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeline })], compilation_options: Default::default(), }), - multiview: None, cache: None, }) } @@ -158,7 +158,7 @@ fn create_texture( address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, ..Default::default() }); Texture::new_with( @@ -301,12 +301,13 @@ fn create_mix_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeline { }); let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex_module = crate::linkage::bloom_vertex::linkage(device); let fragment_module = crate::linkage::bloom_mix_fragment::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&layout), vertex: wgpu::VertexState { @@ -336,7 +337,6 @@ fn create_mix_pipeline(device: &wgpu::Device) -> wgpu::RenderPipeline { })], compilation_options: Default::default(), }), - multiview: None, cache: None, }) } @@ -600,6 +600,7 @@ impl Bloom { device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view, @@ -647,6 +648,7 @@ impl Bloom { device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view, @@ -678,6 +680,7 @@ impl Bloom { let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &mix_texture.view, diff --git a/crates/renderling/src/compositor/cpu.rs b/crates/renderling/src/compositor/cpu.rs index 09748c2b..b04c65bb 100644 --- a/crates/renderling/src/compositor/cpu.rs +++ b/crates/renderling/src/compositor/cpu.rs @@ -55,14 +55,15 @@ impl Compositor { let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("compositor"), - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex = crate::linkage::compositor_vertex::linkage(device); let fragment = crate::linkage::compositor_fragment::linkage(device); let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("compositor"), layout: Some(&pipeline_layout), vertex: wgpu::VertexState { @@ -92,7 +93,6 @@ impl Compositor { write_mask: wgpu::ColorWrites::ALL, })], }), - multiview: None, cache: None, }); @@ -136,6 +136,7 @@ impl Compositor { { let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some("compositor"), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: target, diff --git a/crates/renderling/src/context.rs b/crates/renderling/src/context.rs index a2da72c5..ee0b0985 100644 --- a/crates/renderling/src/context.rs +++ b/crates/renderling/src/context.rs @@ -123,8 +123,8 @@ impl RenderTarget { #[snafu(visibility(pub(crate)))] /// Represents errors that can occur within the rendering context. pub enum ContextError { - #[snafu(display("missing surface texture: {}", source))] - Surface { source: wgpu::SurfaceError }, + #[snafu(display("could not get current surface texture: {status}"))] + CurrentSurfaceTexture { status: &'static str }, #[snafu(display("cannot create adaptor: {source}"))] CannotCreateAdaptor { source: wgpu::RequestAdapterError }, @@ -145,6 +145,34 @@ pub struct FrameTextureView { pub format: wgpu::TextureFormat, } +fn surface_texture_or_status( + current: wgpu::CurrentSurfaceTexture, +) -> Result { + match current { + // NOTE: suboptimal textures are still renderable and presentable, + // this mirrors the behavior of `Surface::get_current_texture` in + // wgpu 26, which returned suboptimal textures alongside a flag. + wgpu::CurrentSurfaceTexture::Success(t) | wgpu::CurrentSurfaceTexture::Suboptimal(t) => { + Ok(t) + } + wgpu::CurrentSurfaceTexture::Timeout => { + Err(ContextError::CurrentSurfaceTexture { status: "timeout" }) + } + wgpu::CurrentSurfaceTexture::Occluded => { + Err(ContextError::CurrentSurfaceTexture { status: "occluded" }) + } + wgpu::CurrentSurfaceTexture::Outdated => { + Err(ContextError::CurrentSurfaceTexture { status: "outdated" }) + } + wgpu::CurrentSurfaceTexture::Lost => { + Err(ContextError::CurrentSurfaceTexture { status: "lost" }) + } + wgpu::CurrentSurfaceTexture::Validation => Err(ContextError::CurrentSurfaceTexture { + status: "validation", + }), + } +} + impl Deref for FrameTextureView { type Target = wgpu::TextureView; @@ -287,8 +315,9 @@ impl Frame { /// Presents the surface frame if the frame is a `TargetFrame::Surface`. /// If the frame is a `TargetFrame::Texture`, this is a no-op. pub fn present(self) { - match self.surface { - FrameSurface::Surface(s) => s.present(), + let Self { runtime, surface } = self; + match surface { + FrameSurface::Surface(s) => runtime.queue.present(s), FrameSurface::Texture(_) => {} } } @@ -515,7 +544,7 @@ impl Context { runtime: self.runtime.clone(), surface: match &self.render_target.0 { RenderTargetInner::Surface { surface, .. } => { - let surface_texture = surface.get_current_texture().context(SurfaceSnafu)?; + let surface_texture = surface_texture_or_status(surface.get_current_texture())?; FrameSurface::Surface(surface_texture) } RenderTargetInner::Texture { texture, .. } => { diff --git a/crates/renderling/src/cubemap/cpu.rs b/crates/renderling/src/cubemap/cpu.rs index 98dbf251..4581c35b 100644 --- a/crates/renderling/src/cubemap/cpu.rs +++ b/crates/renderling/src/cubemap/cpu.rs @@ -219,11 +219,12 @@ impl EquirectangularImageToCubemapBlitter { let bg_layout = Self::create_bindgroup_layout(device); let pp_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("cubemap-making pipeline layout"), - bind_group_layouts: &[&bg_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bg_layout)], + immediate_size: 0, }); EquirectangularImageToCubemapBlitter(device.create_render_pipeline( &wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("cubemap-making pipeline"), layout: Some(&pp_layout), vertex: wgpu::VertexState { @@ -257,7 +258,6 @@ impl EquirectangularImageToCubemapBlitter { })], compilation_options: Default::default(), }), - multiview: None, cache: None, }, )) @@ -364,14 +364,15 @@ mod test { ctx.get_device() .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bind_group_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bind_group_layout)], + immediate_size: 0, }); let vertex = crate::linkage::cubemap_sampling_test_vertex::linkage(ctx.get_device()); let fragment = crate::linkage::cubemap_sampling_test_fragment::linkage(ctx.get_device()); let cubemap_sampling_pipeline = ctx.get_device() .create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&cubemap_sampling_pipeline_layout), vertex: wgpu::VertexState { @@ -401,7 +402,6 @@ mod test { write_mask: wgpu::ColorWrites::all(), })], }), - multiview: None, cache: None, }); @@ -462,6 +462,7 @@ mod test { .create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &render_target_view, @@ -487,7 +488,10 @@ mod test { } let submission_index = ctx.get_queue().submit(Some(encoder.finish())); ctx.get_device() - .poll(wgpu::PollType::WaitForSubmissionIndex(submission_index)) + .poll(wgpu::PollType::Wait { + submission_index: Some(submission_index), + timeout: None, + }) .unwrap(); let img = Texture::read(&ctx, &render_target, 1, 1, 4, 1) diff --git a/crates/renderling/src/cull/cpu.rs b/crates/renderling/src/cull/cpu.rs index db91ffe9..78321c02 100644 --- a/crates/renderling/src/cull/cpu.rs +++ b/crates/renderling/src/cull/cpu.rs @@ -136,8 +136,8 @@ impl ComputeCulling { layout: Some( &device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Self::LABEL, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }), ), module: &linkage.module, @@ -388,8 +388,8 @@ impl ComputeCopyDepth { layout: Some( &device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Self::LABEL, - bind_group_layouts: &[bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(bindgroup_layout)], + immediate_size: 0, }), ), module: &linkage.module, @@ -545,8 +545,8 @@ impl ComputeDownsampleDepth { layout: Some( &device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Self::LABEL, - bind_group_layouts: &[bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(bindgroup_layout)], + immediate_size: 0, }), ), module: &linkage.module, diff --git a/crates/renderling/src/debug/cpu.rs b/crates/renderling/src/debug/cpu.rs index 1dc7b45e..24370792 100644 --- a/crates/renderling/src/debug/cpu.rs +++ b/crates/renderling/src/debug/cpu.rs @@ -48,8 +48,8 @@ impl DebugOverlay { ) -> wgpu::PipelineLayout { device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Self::LABEL, - bind_group_layouts: &[bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(bindgroup_layout)], + immediate_size: 0, }) } @@ -61,6 +61,7 @@ impl DebugOverlay { let vertex = crate::linkage::debug_overlay_vertex::linkage(device); let fragment = crate::linkage::debug_overlay_fragment::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Self::LABEL, layout: Some(&Self::create_pipeline_layout(device, bindgroup_layout)), vertex: wgpu::VertexState { @@ -91,7 +92,6 @@ impl DebugOverlay { write_mask: wgpu::ColorWrites::all(), })], }), - multiview: None, cache: None, }) } @@ -141,6 +141,7 @@ impl DebugOverlay { device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: Self::LABEL }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Self::LABEL, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view, diff --git a/crates/renderling/src/draw/cpu.rs b/crates/renderling/src/draw/cpu.rs index 581caf58..22a3d7c9 100644 --- a/crates/renderling/src/draw/cpu.rs +++ b/crates/renderling/src/draw/cpu.rs @@ -125,13 +125,19 @@ impl DrawCalls { ) -> Self { let supported_features = ctx.get_adapter().features(); log::trace!("supported features: {supported_features:#?}"); - let can_use_multi_draw_indirect = ctx.get_adapter().features().contains( - wgpu::Features::INDIRECT_FIRST_INSTANCE | wgpu::Features::MULTI_DRAW_INDIRECT, - ); + let can_use_multi_draw_indirect = ctx + .get_adapter() + .features() + .contains(wgpu::Features::INDIRECT_FIRST_INSTANCE) + && ctx + .get_adapter() + .get_downlevel_capabilities() + .flags + .contains(wgpu::DownlevelFlags::INDIRECT_EXECUTION); if use_compute_culling && !can_use_multi_draw_indirect { log::warn!( - "`use_compute_culling` is `true`, but the MULTI_DRAW_INDIRECT feature is not \ - available. No compute culling will occur." + "`use_compute_culling` is `true`, but multi-draw indirect is not available. No \ + compute culling will occur." ) } let can_use_compute_culling = use_compute_culling && can_use_multi_draw_indirect; diff --git a/crates/renderling/src/internal/cpu.rs b/crates/renderling/src/internal/cpu.rs index c0566de0..50539374 100644 --- a/crates/renderling/src/internal/cpu.rs +++ b/crates/renderling/src/internal/cpu.rs @@ -26,6 +26,7 @@ pub async fn adapter( power_preference: wgpu::PowerPreference::default(), compatible_surface, force_fallback_adapter: false, + apply_limit_buckets: false, }) .await .context(CannotCreateAdaptorSnafu)?; @@ -46,7 +47,9 @@ pub async fn device( adapter: &wgpu::Adapter, ) -> Result<(wgpu::Device, wgpu::Queue), wgpu::RequestDeviceError> { let wanted_features = wgpu::Features::INDIRECT_FIRST_INSTANCE - | wgpu::Features::MULTI_DRAW_INDIRECT + // NOTE: MULTI_DRAW_INDIRECT is no longer a feature as of wgpu 27, it is + // unconditionally supported when the downlevel INDIRECT_EXECUTION flag + // is present. //// when debugging rust-gpu shader miscompilation it's nice to have this //| wgpu::Features::SPIRV_SHADER_PASSTHROUGH // this one is a funny requirement, it seems it is needed if using storage buffers in @@ -68,6 +71,7 @@ pub async fn device( required_limits: adapter.limits(), label: None, memory_hints: wgpu::MemoryHints::default(), + experimental_features: wgpu::ExperimentalFeatures::default(), trace: wgpu::Trace::Off, }) .await @@ -84,17 +88,11 @@ pub fn new_instance(backends: Option) -> wgpu::Instance { ); // BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU let backends = backends.unwrap_or(wgpu::Backends::PRIMARY); - let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor { + let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends, - ..Default::default() + ..wgpu::InstanceDescriptor::new_without_display_handle() }); - #[cfg(not(target_arch = "wasm32"))] - { - let adapters = instance.enumerate_adapters(backends); - log::trace!("available adapters: {adapters:#?}"); - } - instance } diff --git a/crates/renderling/src/lib.rs b/crates/renderling/src/lib.rs index 11d7fad9..29fb2438 100644 --- a/crates/renderling/src/lib.rs +++ b/crates/renderling/src/lib.rs @@ -287,7 +287,15 @@ pub fn capture_gpu_frame( desc.set_output_url(path); let maybe_metal_device = unsafe { ctx.get_device().as_hal::() }; if let Some(metal_device) = maybe_metal_device { - desc.set_capture_device(metal_device.raw_device().try_lock().unwrap().as_ref()); + // Since wgpu 29 the underlying `MTLDevice` is exposed as an objc2 + // handle (`Retained`), while the `metal` crate wraps + // the raw Objective-C pointer. Bridge the two via the raw pointer. + // The device is kept alive by the wgpu device for the duration of + // this function, and the capture descriptor retains the device + // itself when it is set, so the non-owning wrapper is sound here. + let mtl = &**metal_device.raw_device(); + let device = unsafe { &*(mtl as *const _ as *const metal::DeviceRef) }; + desc.set_capture_device(device); } else { panic!("not a capturable device") } @@ -406,6 +414,51 @@ mod test { ] } + #[cfg(target_os = "macos")] + #[test] + // Verifies the Metal GPU frame capture glue, which bridges the objc2 + // `MTLDevice` handle from wgpu to the `metal` crate. Only runs when + // `METAL_CAPTURE_ENABLED` is set, since trace capture needs an explicit + // opt-in; without it this test is a no-op, so CI is unaffected. + fn gpu_frame_capture_sanity() { + if std::env::var("METAL_CAPTURE_ENABLED").is_err() { + log::info!("skipping gpu_frame_capture_sanity, set METAL_CAPTURE_ENABLED=1 to run it"); + return; + } + let ctx = Context::headless(100, 100).block(); + let stage = ctx.new_stage().with_background_color(Vec4::splat(1.0)); + let (p, v) = crate::camera::default_ortho2d(100.0, 100.0); + let _camera = stage.new_camera().with_projection_and_view(p, v); + let _prim = stage + .new_primitive() + .with_vertices(stage.new_vertices(right_tri_vertices())); + + let frame = ctx.get_next_frame().unwrap(); + let filename = "gpu_frame_capture_sanity.gputrace"; + capture_gpu_frame(&ctx, filename, || { + stage.render(&frame.view()); + frame.present(); + }); + let path = workspace_dir().join("test_output").join(filename); + assert!(path.exists(), "expected a GPU trace at {}", path.display()); + // Depending on the macOS version the trace is written either as a + // directory bundle or as a single file. + let size: u64 = if path.is_dir() { + std::fs::read_dir(&path) + .unwrap() + .map(|entry| entry.unwrap().metadata().unwrap().len()) + .sum() + } else { + std::fs::metadata(&path).unwrap().len() + }; + assert!(size > 0, "GPU trace should not be empty"); + log::info!( + "wrote a {} byte GPU frame trace to {}", + size, + path.display() + ); + } + #[test] // This tests our ability to draw a CMYK triangle in the top left corner. fn cmy_triangle_sanity() { diff --git a/crates/renderling/src/light/cpu/test.rs b/crates/renderling/src/light/cpu/test.rs index 7a164edc..0ef84f41 100644 --- a/crates/renderling/src/light/cpu/test.rs +++ b/crates/renderling/src/light/cpu/test.rs @@ -352,7 +352,9 @@ fn clear_tiles_sanity() { }); } let _ = lighting.commit(); - ctx.get_device().poll(wgpu::PollType::Wait).unwrap(); + ctx.get_device() + .poll(wgpu::PollType::wait_indefinitely()) + .unwrap(); let (mins, maxs, lights) = futures_lite::future::block_on(tiling.read_images(lighting)); img_diff::assert_img_eq("light/tiling/clear_tiles/1-mins.png", mins); @@ -713,7 +715,9 @@ fn tiling_e2e_sanity_with( let frame = ctx.get_next_frame().unwrap(); stage.render(&frame.view()); frame.present(); - ctx.get_device().poll(wgpu::PollType::Wait).unwrap(); + ctx.get_device() + .poll(wgpu::PollType::wait_indefinitely()) + .unwrap(); let duration = start.elapsed(); run.iterations.push((*with_tiling, duration)); } diff --git a/crates/renderling/src/light/shadow_map.rs b/crates/renderling/src/light/shadow_map.rs index 320a1dbd..23d0e805 100644 --- a/crates/renderling/src/light/shadow_map.rs +++ b/crates/renderling/src/light/shadow_map.rs @@ -91,11 +91,12 @@ impl ShadowMap { let shadow_map_update_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: ShadowMap::LABEL, - bind_group_layouts: &[bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(bindgroup_layout)], + immediate_size: 0, }); let shadow_map_update_vertex = crate::linkage::shadow_mapping_vertex::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Self::LABEL, layout: Some(&shadow_map_update_layout), vertex: wgpu::VertexState { @@ -115,14 +116,13 @@ impl ShadowMap { }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, - depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::Less, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::Less), stencil: wgpu::StencilState::default(), bias: wgpu::DepthBiasState::default(), }), multisample: wgpu::MultisampleState::default(), fragment: None, - multiview: None, cache: None, }) } @@ -348,6 +348,7 @@ impl ShadowMap { }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Self::LABEL, color_attachments: &[], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { @@ -385,7 +386,10 @@ impl ShadowMap { )?; let submission = queue.submit(Some(encoder.finish())); device - .poll(wgpu::PollType::WaitForSubmissionIndex(submission)) + .poll(wgpu::PollType::Wait { + submission_index: Some(submission), + timeout: None, + }) .context(PollSnafu)?; } Ok(()) diff --git a/crates/renderling/src/light/tiling.rs b/crates/renderling/src/light/tiling.rs index 7d8eb24c..bf2c0b82 100644 --- a/crates/renderling/src/light/tiling.rs +++ b/crates/renderling/src/light/tiling.rs @@ -162,8 +162,8 @@ impl LightTiling { let bindgroup_layout = Self::create_bindgroup_layout(device, multisampled); let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: LABEL, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); (pipeline_layout, bindgroup_layout) } diff --git a/crates/renderling/src/pbr/brdf/cpu.rs b/crates/renderling/src/pbr/brdf/cpu.rs index 18c85cc0..e7fd096f 100644 --- a/crates/renderling/src/pbr/brdf/cpu.rs +++ b/crates/renderling/src/pbr/brdf/cpu.rs @@ -18,6 +18,7 @@ impl BrdfLut { let vertex_linkage = crate::linkage::brdf_lut_convolution_vertex::linkage(device); let fragment_linkage = crate::linkage::brdf_lut_convolution_fragment::linkage(device); let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("brdf_lut_convolution"), layout: None, vertex: wgpu::VertexState { @@ -54,7 +55,6 @@ impl BrdfLut { })], compilation_options: Default::default(), }), - multiview: None, cache: None, }); @@ -79,6 +79,7 @@ impl BrdfLut { let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor::default()); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some("brdf_lut_convolution"), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &framebuffer.view, diff --git a/crates/renderling/src/pbr/ibl/cpu.rs b/crates/renderling/src/pbr/ibl/cpu.rs index 95a97749..7b5b5deb 100644 --- a/crates/renderling/src/pbr/ibl/cpu.rs +++ b/crates/renderling/src/pbr/ibl/cpu.rs @@ -210,12 +210,13 @@ pub(crate) fn create_prefiltered_environment_pipeline_and_bindgroup( }); let pp_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bg_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bg_layout)], + immediate_size: 0, }); let vertex_linkage = crate::linkage::prefilter_environment_cubemap_vertex::linkage(device); let fragment_linkage = crate::linkage::prefilter_environment_cubemap_fragment::linkage(device); let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("prefiltered environment"), layout: Some(&pp_layout), vertex: wgpu::VertexState { @@ -252,7 +253,6 @@ pub(crate) fn create_prefiltered_environment_pipeline_and_bindgroup( })], compilation_options: Default::default(), }), - multiview: None, cache: None, }); (pipeline, bindgroup) @@ -311,6 +311,7 @@ fn create_prefiltered_environment_map( buffer_upkeep(); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some(&format!("cubemap{i}")), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &cubemap_face.view, @@ -418,12 +419,13 @@ impl DiffuseIrradianceConvolutionRenderPipeline { let bg_layout = diffuse_irradiance_convolution_bindgroup_layout(device); let pp_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("convolution pipeline layout"), - bind_group_layouts: &[&bg_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bg_layout)], + immediate_size: 0, }); DiffuseIrradianceConvolutionRenderPipeline(device.create_render_pipeline( &wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("convolution pipeline"), layout: Some(&pp_layout), vertex: wgpu::VertexState { @@ -457,7 +459,6 @@ impl DiffuseIrradianceConvolutionRenderPipeline { })], compilation_options: Default::default(), }), - multiview: None, cache: None, }, )) diff --git a/crates/renderling/src/skybox/cpu.rs b/crates/renderling/src/skybox/cpu.rs index 74929e1a..e9188eb9 100644 --- a/crates/renderling/src/skybox/cpu.rs +++ b/crates/renderling/src/skybox/cpu.rs @@ -95,12 +95,13 @@ pub(crate) fn create_skybox_render_pipeline( let bg_layout = skybox_bindgroup_layout(device); let pp_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("skybox pipeline layout"), - bind_group_layouts: &[&bg_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bg_layout)], + immediate_size: 0, }); let msaa_sample_count = multisample_count.unwrap_or(1); SkyboxRenderPipeline { pipeline: device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: Some("skybox render pipeline"), layout: Some(&pp_layout), vertex: wgpu::VertexState { @@ -120,8 +121,8 @@ pub(crate) fn create_skybox_render_pipeline( }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, - depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::LessEqual, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::LessEqual), stencil: wgpu::StencilState::default(), bias: wgpu::DepthBiasState::default(), }), @@ -140,7 +141,6 @@ pub(crate) fn create_skybox_render_pipeline( })], compilation_options: Default::default(), }), - multiview: None, cache: None, }), msaa_sample_count, @@ -261,7 +261,7 @@ impl Skybox { Some(runtime.device.create_sampler(&wgpu::SamplerDescriptor { mag_filter: wgpu::FilterMode::Nearest, min_filter: wgpu::FilterMode::Nearest, - mipmap_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, ..Default::default() })), wgpu::TextureFormat::Rgba32Float, diff --git a/crates/renderling/src/stage/cpu.rs b/crates/renderling/src/stage/cpu.rs index b09ede81..6a63ea11 100644 --- a/crates/renderling/src/stage/cpu.rs +++ b/crates/renderling/src/stage/cpu.rs @@ -301,6 +301,7 @@ impl StageRendering<'_> { .create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(self.color_attachment)], depth_stencil_attachment: Some(self.depth_stencil_attachment), @@ -1124,11 +1125,12 @@ impl Stage { let bind_group_layout = Self::primitive_pipeline_bindgroup_layout(device); let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&bind_group_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bind_group_layout)], + immediate_size: 0, }); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&layout), vertex: wgpu::VertexState { @@ -1148,8 +1150,8 @@ impl Stage { }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, - depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::Less, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::Less), stencil: wgpu::StencilState::default(), bias: wgpu::DepthBiasState::default(), }), @@ -1168,7 +1170,6 @@ impl Stage { })], compilation_options: Default::default(), }), - multiview: None, cache: None, }) } @@ -1927,8 +1928,8 @@ mod test { .device .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: None, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex = crate::linkage::slabbed_vertices::linkage(&runtime.device); @@ -1936,6 +1937,7 @@ mod test { let pipeline = runtime .device .create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: None, cache: None, layout: Some(&pipeline_layout), @@ -1970,7 +1972,6 @@ mod test { write_mask: wgpu::ColorWrites::ALL, })], }), - multiview: None, }); let slab_buffer = slab.commit(); @@ -1989,6 +1990,7 @@ mod test { let mut encoder = runtime.device.create_command_encoder(&Default::default()); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &frame.view(), resolve_target: None, diff --git a/crates/renderling/src/texture.rs b/crates/renderling/src/texture.rs index ce7b0e19..c0433b7c 100644 --- a/crates/renderling/src/texture.rs +++ b/crates/renderling/src/texture.rs @@ -195,7 +195,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, label, ..Default::default() }); @@ -271,7 +271,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, ..Default::default() }) }); @@ -486,7 +486,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, ..Default::default() }); let sampler = Arc::new(device.create_sampler(&sampler_descriptor)); @@ -534,7 +534,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, compare: Some(wgpu::CompareFunction::LessEqual), lod_min_clamp: 0.0, lod_max_clamp: 100.0, @@ -583,7 +583,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Linear, min_filter: wgpu::FilterMode::Linear, - mipmap_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, compare: Some(wgpu::CompareFunction::LessEqual), lod_min_clamp: 0.0, lod_max_clamp: 100.0, @@ -706,7 +706,7 @@ impl Texture { address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: wgpu::FilterMode::Nearest, min_filter: wgpu::FilterMode::Nearest, - mipmap_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, ..Default::default() })); let view = Arc::new(texture.create_view(&wgpu::TextureViewDescriptor::default())); @@ -767,6 +767,7 @@ impl Texture { { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some(&format!("{label}-cubemap{i}")), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &cubemap_face.view, @@ -947,7 +948,10 @@ impl std::future::Future for MappedBuffer<'_> { let this = self.deref(); if let Some(result) = this.result.lock().expect("texture result lock").take() { std::task::Poll::Ready(result.map(|()| { - let padded_buffer = this.buffer_slice.get_mapped_range(); + let padded_buffer = this + .buffer_slice + .get_mapped_range() + .expect("failed to get mapped buffer range"); let mut unpadded_buffer = vec![]; // from the padded_buffer we write just the unpadded bytes into // the unpadded_buffer @@ -1002,7 +1006,9 @@ impl CopiedTextureBuffer { /// This calls `wgpu::Device::poll`. pub async fn pixels(&self, device: &wgpu::Device) -> Result> { let buffer = self.get_mapped_buffer(); - device.poll(wgpu::PollType::Wait).context(PollSnafu)?; + device + .poll(wgpu::PollType::wait_indefinitely()) + .context(PollSnafu)?; buffer.await.context(BufferAsyncSnafu) } diff --git a/crates/renderling/src/texture/mips.rs b/crates/renderling/src/texture/mips.rs index 867945de..95bfa8b2 100644 --- a/crates/renderling/src/texture/mips.rs +++ b/crates/renderling/src/texture/mips.rs @@ -25,6 +25,7 @@ fn create_pipeline( let vertex_linkage = crate::linkage::generate_mipmap_vertex::linkage(device); let fragment_linkage = crate::linkage::generate_mipmap_fragment::linkage(device); device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: LABEL, layout: Some(pp_layout), vertex: wgpu::VertexState { @@ -51,7 +52,6 @@ fn create_pipeline( }), depth_stencil: None, multisample: wgpu::MultisampleState::default(), - multiview: None, cache: None, }) } @@ -87,8 +87,8 @@ impl MipMapGenerator { }); let pp_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: LABEL, - bind_group_layouts: &[&bg_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bg_layout)], + immediate_size: 0, }); let pipeline = create_pipeline(device, format, &pp_layout); Self { @@ -173,6 +173,7 @@ impl MipMapGenerator { { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label: Some(&format!("mip{mip_level}")), color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &mip_texture.view, diff --git a/crates/renderling/src/tonemapping/cpu.rs b/crates/renderling/src/tonemapping/cpu.rs index e1647580..b9cb2ab0 100644 --- a/crates/renderling/src/tonemapping/cpu.rs +++ b/crates/renderling/src/tonemapping/cpu.rs @@ -118,11 +118,12 @@ impl Tonemapping { let hdr_layout = bindgroup_layout(device, label); let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label, - bind_group_layouts: &[&hdr_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&hdr_layout)], + immediate_size: 0, }); let pipeline = Arc::new( device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label, layout: Some(&layout), vertex: wgpu::VertexState { @@ -152,7 +153,6 @@ impl Tonemapping { compilation_options: Default::default(), }), multisample: wgpu::MultisampleState::default(), - multiview: None, cache: None, }), ); @@ -198,6 +198,7 @@ impl Tonemapping { let bindgroup = self.bindgroup.read().expect("tonemapping bindgroup read"); let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label }); let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, label, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view, diff --git a/crates/renderling/tests/wasm.rs b/crates/renderling/tests/wasm.rs index 08f90a4d..4f33c737 100644 --- a/crates/renderling/tests/wasm.rs +++ b/crates/renderling/tests/wasm.rs @@ -155,6 +155,7 @@ async fn can_clear_background_sanity() { let mut encoder = device.create_command_encoder(&Default::default()); { let _render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &view, ops: wgpu::Operations { @@ -194,6 +195,7 @@ async fn implicit_isosceles_triangle() { runtime .device .create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: None, layout: None, vertex: wgpu::VertexState { @@ -227,7 +229,6 @@ async fn implicit_isosceles_triangle() { })], compilation_options: wgpu::PipelineCompilationOptions::default(), }), - multiview: None, cache: None, }) } @@ -262,6 +263,7 @@ async fn implicit_isosceles_triangle() { .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &frame.view(), resolve_target: None, @@ -359,8 +361,8 @@ async fn slabbed_vertices_no_instance() { .device .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: None, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let pipeline = { let vertex = renderling::linkage::slabbed_vertices_no_instance::linkage(&runtime.device); @@ -368,6 +370,7 @@ async fn slabbed_vertices_no_instance() { runtime .device .create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: None, layout: Some(&pipeline_layout), vertex: wgpu::VertexState { @@ -401,7 +404,6 @@ async fn slabbed_vertices_no_instance() { })], compilation_options: wgpu::PipelineCompilationOptions::default(), }), - multiview: None, cache: None, }) }; @@ -427,6 +429,7 @@ async fn slabbed_vertices_no_instance() { .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &view, resolve_target: None, @@ -493,8 +496,8 @@ async fn slabbed_isosceles_triangle() { .device .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: None, - bind_group_layouts: &[&bindgroup_layout], - push_constant_ranges: &[], + bind_group_layouts: &[Some(&bindgroup_layout)], + immediate_size: 0, }); let vertex = renderling::linkage::slabbed_vertices::linkage(&runtime.device); @@ -502,6 +505,7 @@ async fn slabbed_isosceles_triangle() { let pipeline = runtime .device .create_render_pipeline(&wgpu::RenderPipelineDescriptor { + multiview_mask: None, label: None, cache: None, layout: Some(&pipeline_layout), @@ -536,7 +540,6 @@ async fn slabbed_isosceles_triangle() { write_mask: wgpu::ColorWrites::ALL, })], }), - multiview: None, }); let slab_buffer = slab.commit(); @@ -555,6 +558,7 @@ async fn slabbed_isosceles_triangle() { let mut encoder = runtime.device.create_command_encoder(&Default::default()); { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + multiview_mask: None, color_attachments: &[Some(wgpu::RenderPassColorAttachment { view: &frame.view(), resolve_target: None, @@ -646,8 +650,8 @@ async fn slabbed_isosceles_triangle() { // let pipeline_layout = // device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { // label, -// bind_group_layouts: &[&bindgroup_layout], -// push_constant_ranges: &[], +// bind_group_layouts: &[Some(&bindgroup_layout)], +// immediate_size: 0, // }); // let pipeline = @@ -672,8 +676,8 @@ async fn slabbed_isosceles_triangle() { // }, // depth_stencil: Some(wgpu::DepthStencilState { // format: wgpu::TextureFormat::Depth32Float, -// depth_write_enabled: true, -// depth_compare: wgpu::CompareFunction::Less, +// depth_write_enabled: Some(true), +// depth_compare: Some(wgpu::CompareFunction::Less), // stencil: wgpu::StencilState::default(), // bias: wgpu::DepthBiasState::default(), // }), @@ -854,8 +858,8 @@ async fn slabbed_isosceles_triangle() { // }); // let pipeline_layout = // device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { -// label, bind_group_layouts: &[&bindgroup_layout], -// push_constant_ranges: &[], +// label, bind_group_layouts: &[Some(&bindgroup_layout)], +// immediate_size: 0, // }); // let pipeline = @@ -879,8 +883,8 @@ async fn slabbed_isosceles_triangle() { // }, // depth_stencil: Some(wgpu::DepthStencilState { // format: wgpu::TextureFormat::Depth32Float, -// depth_write_enabled: true, -// depth_compare: wgpu::CompareFunction::Less, +// depth_write_enabled: Some(true), +// depth_compare: Some(wgpu::CompareFunction::Less), // stencil: wgpu::StencilState::default(), // bias: wgpu::DepthBiasState::default(), // }), diff --git a/crates/sandbox/src/main.rs b/crates/sandbox/src/main.rs index f1ff0465..d76ae576 100644 --- a/crates/sandbox/src/main.rs +++ b/crates/sandbox/src/main.rs @@ -37,7 +37,7 @@ impl Example { } winit::event::WindowEvent::RedrawRequested => { - self.ctx.get_device().poll(wgpu::PollType::Wait).unwrap(); + self.ctx.get_device().poll(wgpu::PollType::wait_indefinitely()).unwrap(); } _ => {} }