diff --git a/Cargo.lock b/Cargo.lock index 947b09a..a8a9b7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,10 +3,10 @@ version = 3 [[package]] -name = "adler32" -version = "1.2.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ansi_term" @@ -31,21 +31,21 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ash" -version = "0.33.3+1.2.191" +version = "0.37.0+1.3.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4f1d82f164f838ae413296d1131aa6fa79b917d25bebaa7033d25620c09219" +checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" dependencies = [ "libloading", ] [[package]] name = "ash-window" -version = "0.7.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f91ce4c6be1a2ba99d3d6cd57d5bae9ac6d6f903b5ae53d6b1dee2edf872af" +checksum = "b912285a7c29f3a8f87ca6f55afc48768624e5e33ec17dbd2f2075903f5e35ab" dependencies = [ "ash", - "raw-window-handle 0.3.4", + "raw-window-handle 0.5.0", "raw-window-metal", ] @@ -86,38 +86,35 @@ checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "bytemuck" -version = "1.10.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53dfa917ec274df8ed3c572698f381a24eef2efba9492d797301b72b6db408a" +checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562e382481975bc61d11275ac5e62a19abd00b0547d99516a415336f183dcd0e" +checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - [[package]] name = "calloop" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" +checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" dependencies = [ "log", - "nix", + "nix 0.24.2", + "slotmap", + "thiserror", + "vec_map", ] [[package]] @@ -126,7 +123,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51e3973b165dc0f435831a9e426de67e894de532754ff7a3f307c03ee5dec7dc" dependencies = [ - "clap", + "clap 2.34.0", "heck", "indexmap", "log", @@ -145,12 +142,6 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -167,11 +158,35 @@ dependencies = [ "atty", "bitflags", "strsim 0.8.0", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" +dependencies = [ + "atty", + "bitflags", + "clap_lex", + "indexmap", + "strsim 0.10.0", + "termcolor", + "textwrap 0.15.1", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "cocoa" version = "0.24.0" @@ -181,8 +196,8 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "core-foundation 0.9.3", - "core-graphics 0.22.3", + "core-foundation", + "core-graphics", "foreign-types", "libc", "objc", @@ -196,57 +211,29 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ "bitflags", "block", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", "objc", ] -[[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" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys 0.8.3", + "core-foundation-sys", "libc", ] -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "core-graphics" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" -dependencies = [ - "bitflags", - "core-foundation 0.7.0", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics" version = "0.22.3" @@ -254,7 +241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", @@ -267,31 +254,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "foreign-types", "libc", ] -[[package]] -name = "core-video-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" -dependencies = [ - "cfg-if 0.1.10", - "core-foundation-sys 0.7.0", - "core-graphics 0.19.2", - "libc", - "objc", -] - [[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -370,16 +344,6 @@ dependencies = [ "syn", ] -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -410,6 +374,16 @@ dependencies = [ "instant", ] +[[package]] +name = "flate2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -437,11 +411,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "half" version = "1.8.2" @@ -494,7 +479,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -557,7 +542,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] @@ -577,7 +562,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -597,9 +582,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.3.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" +checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" dependencies = [ "libc", ] @@ -627,6 +612,20 @@ dependencies = [ "objc", ] +[[package]] +name = "metal" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +dependencies = [ + "bitflags", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -635,11 +634,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.3.7" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ - "adler32", + "adler", ] [[package]] @@ -651,7 +650,7 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -669,21 +668,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" dependencies = [ "jni-sys", - "ndk-sys", + "ndk-sys 0.2.2", "num_enum", "thiserror", ] [[package]] name = "ndk" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d868f654c72e75f8687572699cdabe755f03effbb62542768e995d5b8d699d" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags", "jni-sys", - "ndk-sys", + "ndk-sys 0.4.0", "num_enum", + "raw-window-handle 0.5.0", "thiserror", ] @@ -704,22 +704,23 @@ dependencies = [ "log", "ndk 0.3.0", "ndk-macro 0.2.0", - "ndk-sys", + "ndk-sys 0.2.2", ] [[package]] name = "ndk-glue" -version = "0.5.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71bee8ea72d685477e28bd004cfe1bf99c754d688cd78cad139eae4089484d4" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ - "lazy_static", "libc", "log", - "ndk 0.5.0", + "ndk 0.7.0", "ndk-context", "ndk-macro 0.3.0", - "ndk-sys", + "ndk-sys 0.4.0", + "once_cell", + "parking_lot", ] [[package]] @@ -754,6 +755,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" +[[package]] +name = "ndk-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.22.3" @@ -762,7 +772,19 @@ checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ "bitflags", "cc", - "cfg-if 1.0.0", + "cfg-if", + "libc", + "memoffset", +] + +[[package]] +name = "nix" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +dependencies = [ + "bitflags", + "cfg-if", "libc", "memoffset", ] @@ -824,28 +846,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] -name = "parking_lot" -version = "0.11.2" +name = "os_str_bytes" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ - "cfg-if 1.0.0", - "instant", + "cfg-if", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -860,7 +886,7 @@ version = "0.1.0" dependencies = [ "cbindgen", "cocoa", - "metal", + "metal 0.22.0", "objc", "piet-gpu", "piet-gpu-hal", @@ -872,17 +898,18 @@ name = "piet-gpu" version = "0.1.0" dependencies = [ "bytemuck", - "clap", + "clap 3.2.22", "kurbo 0.8.3", "ndk 0.3.0", "ndk-glue 0.3.0", - "ndk-sys", + "ndk-sys 0.2.2", "piet-gpu-hal", "piet-gpu-types", "piet-scene", "png", - "rand", + "rand 0.8.5", "raw-window-handle 0.3.4", + "raw-window-handle 0.5.0", "roxmltree", "winit", ] @@ -906,10 +933,11 @@ dependencies = [ "block", "bytemuck", "cocoa-foundation", + "core-graphics-types", "foreign-types", - "metal", + "metal 0.24.0", "objc", - "raw-window-handle 0.3.4", + "raw-window-handle 0.5.0", "smallvec", "winapi", "wio", @@ -920,11 +948,11 @@ name = "piet-gpu-tests" version = "0.1.0" dependencies = [ "bytemuck", - "clap", + "clap 2.34.0", "kurbo 0.7.1", "piet-gpu", "piet-gpu-hal", - "rand", + "rand 0.7.3", ] [[package]] @@ -959,13 +987,13 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "png" -version = "0.16.8" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" dependencies = [ "bitflags", "crc32fast", - "deflate", + "flate2", "miniz_oxide", ] @@ -996,9 +1024,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -1018,13 +1046,24 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.2.2", + "rand_core 0.5.1", "rand_hc", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -1032,7 +1071,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", ] [[package]] @@ -1041,7 +1090,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.7", ] [[package]] @@ -1050,7 +1108,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -1073,15 +1131,24 @@ dependencies = [ ] [[package]] -name = "raw-window-metal" -version = "0.1.2" +name = "raw-window-handle" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd21ed1cdef7f1b1579b972148ba6058b5b545959a14d91ea83c4f0ea9f289b" +checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" +dependencies = [ + "cty", +] + +[[package]] +name = "raw-window-metal" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d18241d631f19847a5f4cc0a3f81d978202c375573ab7d90ab14dcf0a9262ec" dependencies = [ "cocoa", - "core-graphics 0.22.3", + "core-graphics", "objc", - "raw-window-handle 0.3.4", + "raw-window-handle 0.5.0", ] [[package]] @@ -1160,6 +1227,15 @@ dependencies = [ "serde", ] +[[package]] +name = "slotmap" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.9.0" @@ -1168,9 +1244,9 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "smithay-client-toolkit" -version = "0.15.4" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a28f16a97fa0e8ce563b2774d1e732dd5d4025d2772c5dba0a41a0f90a29da3" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags", "calloop", @@ -1178,7 +1254,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix", + "nix 0.24.2", "pkg-config", "wayland-client", "wayland-cursor", @@ -1205,9 +1281,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.98" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" dependencies = [ "proc-macro2", "quote", @@ -1220,7 +1296,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall", @@ -1228,6 +1304,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -1237,6 +1322,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" + [[package]] name = "thiserror" version = "1.0.31" @@ -1290,6 +1381,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -1308,7 +1405,7 @@ version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -1365,7 +1462,7 @@ dependencies = [ "bitflags", "downcast-rs", "libc", - "nix", + "nix 0.22.3", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -1378,7 +1475,7 @@ version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ - "nix", + "nix 0.22.3", "once_cell", "smallvec", "wayland-sys", @@ -1390,7 +1487,7 @@ version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" dependencies = [ - "nix", + "nix 0.22.3", "wayland-client", "xcursor", ] @@ -1455,6 +1552,15 @@ 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", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1467,37 +1573,88 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -1505,35 +1662,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] -name = "winit" -version = "0.26.1" +name = "windows_x86_64_msvc" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b43cc931d58b99461188607efd7acb2a093e65fc621f54cad78517a6063e73a" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winit" +version = "0.27.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37f64802920c4c35d12a53dad5e0c55bbc3004d8dc4f2e4dd64ad02c5665d7aa" dependencies = [ "bitflags", "cocoa", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "core-video-sys", + "core-foundation", + "core-graphics", "dispatch", "instant", - "lazy_static", "libc", "log", "mio", - "ndk 0.5.0", - "ndk-glue 0.5.2", - "ndk-sys", + "ndk 0.7.0", + "ndk-glue 0.7.0", "objc", + "once_cell", "parking_lot", "percent-encoding", "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", "wayland-protocols", "web-sys", - "winapi", + "windows-sys 0.36.1", "x11-dl", ] diff --git a/piet-gpu-hal/Cargo.toml b/piet-gpu-hal/Cargo.toml index f9b844a..110fc7f 100644 --- a/piet-gpu-hal/Cargo.toml +++ b/piet-gpu-hal/Cargo.toml @@ -7,12 +7,12 @@ license = "MIT/Apache-2.0" edition = "2018" [dependencies] -ash = "0.33" -ash-window = "0.7" -raw-window-handle = "0.3" -bitflags = "1.2.1" -smallvec = "1.6.1" -bytemuck = "1.7.2" +ash = { version = "0.37", features = ["loaded"] } +ash-window = "0.12" +raw-window-handle = "0.5" +bitflags = "1.3.2" +smallvec = "1.9" +bytemuck = "1.12.1" [target.'cfg(target_os="windows")'.dependencies] winapi = { version = "0.3.9", features = [ @@ -24,8 +24,10 @@ winapi = { version = "0.3.9", features = [ wio = "0.2.2" [target.'cfg(target_os="macos")'.dependencies] -metal = "0.22" -objc = "0.2.5" +metal = "0.24" +objc = "0.2.7" block = "0.1.6" cocoa-foundation = "0.1" +# Note: foreign-types is up to 0.5 but metal hasn't upgraded to it foreign-types = "0.3.2" +core-graphics-types = "0.1.1" diff --git a/piet-gpu-hal/src/dx12.rs b/piet-gpu-hal/src/dx12.rs index 6cfd8c8..f7edb24 100644 --- a/piet-gpu-hal/src/dx12.rs +++ b/piet-gpu-hal/src/dx12.rs @@ -17,7 +17,7 @@ use winapi::shared::minwindef::TRUE; use winapi::shared::{dxgi, dxgi1_2, dxgitype}; use winapi::um::d3d12; -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; +use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; use smallvec::SmallVec; @@ -153,9 +153,10 @@ impl Dx12Instance { /// Create a surface for the specified window handle. pub fn surface( &self, - window_handle: &dyn HasRawWindowHandle, + _display_handle: RawDisplayHandle, + window_handle: RawWindowHandle, ) -> Result { - if let RawWindowHandle::Windows(w) = window_handle.raw_window_handle() { + if let RawWindowHandle::Win32(w) = window_handle { let hwnd = w.hwnd as *mut _; Ok(Dx12Surface { hwnd }) } else { diff --git a/piet-gpu-hal/src/lib.rs b/piet-gpu-hal/src/lib.rs index 1e3fa32..0ec95c7 100644 --- a/piet-gpu-hal/src/lib.rs +++ b/piet-gpu-hal/src/lib.rs @@ -98,7 +98,7 @@ pub enum ImageFormat { A8, // 8 bit per pixel RGBA Rgba8, - // Match default surface format + // Format that matches the target surface Surface, } diff --git a/piet-gpu-hal/src/metal.rs b/piet-gpu-hal/src/metal.rs index a17f448..754c089 100644 --- a/piet-gpu-hal/src/metal.rs +++ b/piet-gpu-hal/src/metal.rs @@ -29,9 +29,10 @@ use objc::rc::autoreleasepool; use objc::runtime::{Object, BOOL, YES}; use objc::{class, msg_send, sel, sel_impl}; -use metal::{CGFloat, CommandBufferRef, MTLFeatureSet}; +use core_graphics_types::base::CGFloat; +use metal::{CommandBufferRef, MTLFeatureSet}; -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; +use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; use crate::{ BufferUsage, ComputePassDescriptor, Error, GpuInfo, ImageFormat, MapMode, WorkgroupLimits, @@ -139,9 +140,10 @@ impl MtlInstance { pub unsafe fn surface( &self, - window_handle: &dyn HasRawWindowHandle, + _display_handle: RawDisplayHandle, + window_handle: RawWindowHandle, ) -> Result { - if let RawWindowHandle::MacOS(handle) = window_handle.raw_window_handle() { + if let RawWindowHandle::AppKit(handle) = window_handle { Ok(Self::make_surface(handle.ns_view as id, handle.ns_window as id).unwrap()) } else { Err("can't create surface for window handle".into()) diff --git a/piet-gpu-hal/src/metal/util.rs b/piet-gpu-hal/src/metal/util.rs index 2b9b362..869f0a8 100644 --- a/piet-gpu-hal/src/metal/util.rs +++ b/piet-gpu-hal/src/metal/util.rs @@ -16,7 +16,7 @@ //! Utilities and types for Metal integration -use metal::{CGFloat, CGSize}; +use core_graphics_types::{base::CGFloat, geometry::CGSize}; #[link(name = "QuartzCore", kind = "framework")] extern "C" { diff --git a/piet-gpu-hal/src/mux.rs b/piet-gpu-hal/src/mux.rs index c4149d1..6f0731c 100644 --- a/piet-gpu-hal/src/mux.rs +++ b/piet-gpu-hal/src/mux.rs @@ -16,6 +16,8 @@ //! A multiplexer module that selects a back-end at runtime. +use raw_window_handle::RawDisplayHandle; +use raw_window_handle::RawWindowHandle; use smallvec::SmallVec; mux_cfg! { @@ -163,12 +165,13 @@ impl Instance { /// Create a surface from the specified window handle. pub unsafe fn surface( &self, - window_handle: &dyn raw_window_handle::HasRawWindowHandle, + display_handle: RawDisplayHandle, + window_handle: RawWindowHandle, ) -> Result { mux_match! { self; - Instance::Vk(i) => i.surface(window_handle).map(Surface::Vk), - Instance::Dx12(i) => i.surface(window_handle).map(Surface::Dx12), - Instance::Mtl(i) => i.surface(window_handle).map(Surface::Mtl), + Instance::Vk(i) => i.surface(display_handle, window_handle).map(Surface::Vk), + Instance::Dx12(i) => i.surface(display_handle, window_handle).map(Surface::Dx12), + Instance::Mtl(i) => i.surface(display_handle, window_handle).map(Surface::Mtl), } } diff --git a/piet-gpu-hal/src/vulkan.rs b/piet-gpu-hal/src/vulkan.rs index 1ce698b..7189b8d 100644 --- a/piet-gpu-hal/src/vulkan.rs +++ b/piet-gpu-hal/src/vulkan.rs @@ -10,6 +10,7 @@ use ash::extensions::{ext::DebugUtils, khr}; use ash::vk::DebugUtilsLabelEXT; use ash::{vk, Device, Entry, Instance}; +use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; use smallvec::SmallVec; use crate::backend::Device as DeviceTrait; @@ -157,7 +158,7 @@ impl VkInstance { pub fn new() -> Result { unsafe { let app_name = CString::new("VkToy").unwrap(); - let entry = Entry::new()?; + let entry = Entry::load()?; let mut layers = Layers::new(entry.enumerate_instance_layer_properties()?); if cfg!(debug_assertions) { @@ -165,7 +166,7 @@ impl VkInstance { .try_add(CStr::from_bytes_with_nul(b"VK_LAYER_KHRONOS_validation\0").unwrap()); } - let mut exts = Extensions::new(entry.enumerate_instance_extension_properties()?); + let mut exts = Extensions::new(entry.enumerate_instance_extension_properties(None)?); let mut has_debug_ext = false; if cfg!(debug_assertions) { has_debug_ext = exts.try_add(DebugUtils::name()); @@ -221,12 +222,15 @@ impl VkInstance { )?; let (dbg_loader, _dbg_callbk) = if has_debug_ext { + let flags = vk::DebugUtilsMessageTypeFlagsEXT::GENERAL + | vk::DebugUtilsMessageTypeFlagsEXT::PERFORMANCE + | vk::DebugUtilsMessageTypeFlagsEXT::VALIDATION; let dbg_info = vk::DebugUtilsMessengerCreateInfoEXT::builder() .message_severity( vk::DebugUtilsMessageSeverityFlagsEXT::ERROR | vk::DebugUtilsMessageSeverityFlagsEXT::WARNING, ) - .message_type(vk::DebugUtilsMessageTypeFlagsEXT::all()) + .message_type(flags) .pfn_user_callback(Some(vulkan_debug_callback)); let dbg_loader = DebugUtils::new(&entry, &instance); let dbg_callbk = dbg_loader @@ -256,10 +260,17 @@ impl VkInstance { /// The caller is responsible for making sure that the instance outlives the surface. pub unsafe fn surface( &self, - window_handle: &dyn raw_window_handle::HasRawWindowHandle, + display_handle: RawDisplayHandle, + window_handle: RawWindowHandle, ) -> Result { Ok(VkSurface { - surface: ash_window::create_surface(&self.entry, &self.instance, window_handle, None)?, + surface: ash_window::create_surface( + &self.entry, + &self.instance, + display_handle, + window_handle, + None, + )?, surface_fn: khr::Surface::new(&self.entry, &self.instance), }) } @@ -273,8 +284,7 @@ impl VkInstance { /// but for now keep things simple. pub unsafe fn device(&self) -> Result { let devices = self.instance.enumerate_physical_devices()?; - let (pdevice, qfi) = - choose_device(&self.instance, &devices).ok_or("no suitable device")?; + let (pdevice, qfi) = choose_device(&self.instance, &devices).ok_or("no suitable device")?; let mut has_descriptor_indexing = false; let vk1_1 = self.vk_version >= vk::make_api_version(0, 1, 1, 0); @@ -1456,7 +1466,10 @@ unsafe fn choose_device( // both Metal and DX12 which do not require such validation. It might be worth // exposing this to the user in a future device enumeration API, which would // also allow selection between discrete and integrated devices. - if info.queue_flags.contains(vk::QueueFlags::COMPUTE | vk::QueueFlags::GRAPHICS) { + if info + .queue_flags + .contains(vk::QueueFlags::COMPUTE | vk::QueueFlags::GRAPHICS) + { return Some((*pdevice, ix as u32)); } } diff --git a/piet-gpu/Cargo.toml b/piet-gpu/Cargo.toml index 9240093..7b09e59 100644 --- a/piet-gpu/Cargo.toml +++ b/piet-gpu/Cargo.toml @@ -31,11 +31,12 @@ path = "../piet-scene" features = ["kurbo"] [dependencies] -png = "0.16.2" -rand = "0.7.3" +png = "0.17.6" +rand = "0.8.5" roxmltree = "0.13" -winit = "0.26.1" -clap = "2.33" +winit = {version = "0.27.3", default-features = false, features = ["x11", "wayland", "wayland-dlopen"]} +raw-window-handle = "0.5" +clap = "3.2.22" bytemuck = { version = "1.7.2", features = ["derive"] } kurbo = "0.8.3" diff --git a/piet-gpu/bin/android.rs b/piet-gpu/bin/android.rs index d94b77f..f41fa0b 100644 --- a/piet-gpu/bin/android.rs +++ b/piet-gpu/bin/android.rs @@ -6,10 +6,10 @@ //! Requires the [cargo-apk] tool. //! [cargo-apk]: https://crates.io/crates/cargo-apk -use raw_window_handle::android::AndroidHandle; -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; +use raw_window_handle::{ + AndroidDisplayHandle, AndroidNdkWindowHandle, RawDisplayHandle, RawWindowHandle, +}; -use ndk::native_window::NativeWindow; use ndk_glue::Event; use piet_gpu_hal::{ @@ -25,10 +25,6 @@ fn main() { my_main().unwrap(); } -struct MyHandle { - handle: AndroidHandle, -} - // State required to render and present the contents struct GfxState { session: Session, @@ -51,9 +47,13 @@ fn my_main() -> Result<(), Error> { if let Some(window) = &*window { let width = window.width() as usize; let height = window.height() as usize; - let handle = get_handle(window); let instance = Instance::new(InstanceFlags::default())?; - let surface = unsafe { instance.surface(&handle)? }; + let mut android_handle = AndroidNdkWindowHandle::empty(); + android_handle.a_native_window = window.ptr().as_ptr() as *mut _; + let window_handle = RawWindowHandle::AndroidNdk(android_handle); + let display_handle = + RawDisplayHandle::Android(AndroidDisplayHandle::empty()); + let surface = unsafe { instance.surface(display_handle, window_handle)? }; gfx_state = Some(GfxState::new(&instance, Some(&surface), width, height)?); } else { println!("native window is sadly none"); @@ -72,24 +72,6 @@ fn my_main() -> Result<(), Error> { } } -fn get_handle(window: &NativeWindow) -> MyHandle { - println!( - "window = {:?}, {}x{}", - window.ptr(), - window.width(), - window.height() - ); - let mut handle = AndroidHandle::empty(); - handle.a_native_window = window.ptr().as_ptr() as *mut std::ffi::c_void; - MyHandle { handle } -} - -unsafe impl HasRawWindowHandle for MyHandle { - fn raw_window_handle(&self) -> RawWindowHandle { - RawWindowHandle::Android(self.handle) - } -} - impl GfxState { fn new( instance: &Instance, diff --git a/piet-gpu/bin/cli.rs b/piet-gpu/bin/cli.rs index 4e52542..457dab5 100644 --- a/piet-gpu/bin/cli.rs +++ b/piet-gpu/bin/cli.rs @@ -219,10 +219,10 @@ fn trace_ptcl(buf: &[u32]) { fn main() -> Result<(), Error> { let matches = App::new("piet-gpu test") .arg(Arg::with_name("INPUT").index(1)) - .arg(Arg::with_name("flip").short("f").long("flip")) + .arg(Arg::with_name("flip").short('f').long("flip")) .arg( Arg::with_name("scale") - .short("s") + .short('s') .long("scale") .takes_value(true), ) @@ -280,7 +280,7 @@ fn main() -> Result<(), Error> { let ref mut w = BufWriter::new(file); let mut encoder = png::Encoder::new(w, WIDTH as u32, HEIGHT as u32); - encoder.set_color(png::ColorType::RGBA); + encoder.set_color(png::ColorType::Rgba); encoder.set_depth(png::BitDepth::Eight); let mut writer = encoder.write_header().unwrap(); diff --git a/piet-gpu/bin/winit.rs b/piet-gpu/bin/winit.rs index 870efe0..c97651d 100644 --- a/piet-gpu/bin/winit.rs +++ b/piet-gpu/bin/winit.rs @@ -4,6 +4,8 @@ use piet_scene::{Scene, SceneBuilder}; use clap::{App, Arg}; +use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle}; + use winit::{ event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, @@ -18,10 +20,10 @@ const HEIGHT: usize = 1536; fn main() -> Result<(), Error> { let matches = App::new("piet-gpu test") .arg(Arg::with_name("INPUT").index(1)) - .arg(Arg::with_name("flip").short("f").long("flip")) + .arg(Arg::with_name("flip").short('f').long("flip")) .arg( Arg::with_name("scale") - .short("s") + .short('s') .long("scale") .takes_value(true), ) @@ -60,7 +62,9 @@ fn main() -> Result<(), Error> { let mut scene = Scene::default(); let mut simple_text = piet_gpu::SimpleText::new(); unsafe { - let surface = instance.surface(&window)?; + let display_handle = window.raw_display_handle(); + let window_handle = window.raw_window_handle(); + let surface = instance.surface(display_handle, window_handle)?; let device = instance.device()?; let mut swapchain = instance.swapchain(WIDTH / 2, HEIGHT / 2, &device, &surface)?; let session = Session::new(device);