diff --git a/Cargo.lock b/Cargo.lock index 07a98612b..70509b2a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,18 +371,18 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.8.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" [[package]] name = "bit_field" @@ -450,9 +450,9 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -591,9 +591,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -601,9 +601,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -625,9 +625,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "cmake" @@ -660,6 +660,37 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "combine" version = "4.6.7" @@ -981,6 +1012,17 @@ dependencies = [ "syn 2.0.75", ] +[[package]] +name = "d3d12" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" +dependencies = [ + "bitflags 2.6.0", + "libloading 0.8.0", + "winapi", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -1476,9 +1518,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.14.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1498,7 +1540,8 @@ dependencies = [ [[package]] name = "glyphon" version = "0.6.0" -source = "git+https://github.com/grovesNL/glyphon?rev=f1f50ab#f1f50ab7b1d35291c3504f4b0a50c7f12e0099db" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11b1afb04c1a1be055989042258499473d0a9447f16450b433aba10bc2a46e7" dependencies = [ "cosmic-text", "etagere", @@ -1528,14 +1571,15 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.27.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" dependencies = [ "log", "presser", "thiserror", - "windows 0.58.0", + "winapi", + "windows 0.52.0", ] [[package]] @@ -1616,9 +1660,24 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.6.0", + "com", + "libc", + "libloading 0.8.0", + "thiserror", + "widestring", + "winapi", +] [[package]] name = "heck" @@ -1781,7 +1840,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -1857,7 +1916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -1963,9 +2022,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2309,9 +2368,9 @@ checksum = "96a1fe2275b68991faded2c80aa4a33dba398b77d276038b8f50701a22e55918" [[package]] name = "naga" -version = "23.0.0" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5941e45a15b53aad4375eedf02033adb7a28931eedc31117faffa52e6a857e" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ "arrayvec", "bit-set", @@ -2584,9 +2643,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" @@ -2775,9 +2834,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.3" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", @@ -3841,18 +3900,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -4359,9 +4418,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" -version = "0.2.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "untrusted" @@ -4528,9 +4587,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", "once_cell", @@ -4539,9 +4598,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -4554,9 +4613,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -4566,9 +4625,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4576,9 +4635,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -4589,9 +4648,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-log" @@ -4715,9 +4774,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4761,9 +4820,9 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" -version = "23.0.0" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ab52f2d3d18b70d5ab8dd270a1cff3ebe6dbe4a7d13c1cc2557138a9777fdc" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" dependencies = [ "arrayvec", "cfg_aliases 0.1.1", @@ -4786,9 +4845,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "23.0.0" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c68e7b6322a03ee5b83fcd92caeac5c2a932f6457818179f4652ad2a9c065" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec", "bit-vec", @@ -4811,9 +4870,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "23.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de6e7266b869de56c7e3ed72a954899f71d14fec6cc81c102b7530b92947601b" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" dependencies = [ "android_system_properties", "arrayvec", @@ -4821,14 +4880,15 @@ dependencies = [ "bit-set", "bitflags 2.6.0", "block", - "bytemuck", "cfg_aliases 0.1.1", "core-graphics-types", + "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", + "hassle-rs", "js-sys", "khronos-egl", "libc", @@ -4850,15 +4910,14 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "windows 0.58.0", - "windows-core 0.58.0", + "winapi", ] [[package]] name = "wgpu-types" -version = "23.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ "bitflags 2.6.0", "js-sys", @@ -4947,11 +5006,11 @@ dependencies = [ [[package]] name = "windows" -version = "0.58.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core 0.58.0", + "windows-core", "windows-targets 0.52.6", ] @@ -4964,41 +5023,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-result", - "windows-strings", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.75", -] - -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.75", -] - [[package]] name = "windows-registry" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 5607ce975..c0261eb4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ socket2 = "0.5.5" webrtc-util = "0.8.0" opus = "0.3.0" rubato = "0.15.0" -glyphon = { git = "https://github.com/grovesNL/glyphon", rev = "f1f50ab" } +glyphon = "0.6.0" futures-util = "0.3.30" tokio = { version = "1", features = ["full"] } schemars = { git = "https://github.com/membraneframework-labs/schemars", rev = "a5ad1f9", features = [ @@ -59,7 +59,7 @@ schemars = { git = "https://github.com/membraneframework-labs/schemars", rev = " ] } shared_memory = "0.12.4" vk-video = { path = "vk-video" } -wgpu = { version = "23.0.0", default-features = false, features = [ +wgpu = { version = "22.1.0", default-features = false, features = [ "wgsl", "dx12", "metal", diff --git a/compositor_render/Cargo.toml b/compositor_render/Cargo.toml index b3b09df27..b1e47a3f7 100644 --- a/compositor_render/Cargo.toml +++ b/compositor_render/Cargo.toml @@ -22,7 +22,7 @@ glyphon = { workspace = true } crossbeam-channel = { workspace = true } resvg = "0.35.0" nalgebra-glm = { version = "0.18.0", features = ["convert-bytemuck"] } -naga = "23.0.0" +naga = "22.1.0" rand = { workspace = true } tracing = { workspace = true } shared_memory = { workspace = true, optional = true } diff --git a/compositor_render/src/wgpu/common_pipeline.rs b/compositor_render/src/wgpu/common_pipeline.rs index 68a48796d..5c22de2cd 100644 --- a/compositor_render/src/wgpu/common_pipeline.rs +++ b/compositor_render/src/wgpu/common_pipeline.rs @@ -111,12 +111,12 @@ pub fn create_render_pipeline( vertex: wgpu::VertexState { buffers: &[Vertex::LAYOUT], module: shader_module, - entry_point: Some(crate::wgpu::common_pipeline::VERTEX_ENTRYPOINT_NAME), + entry_point: crate::wgpu::common_pipeline::VERTEX_ENTRYPOINT_NAME, compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: shader_module, - entry_point: Some(crate::wgpu::common_pipeline::FRAGMENT_ENTRYPOINT_NAME), + entry_point: crate::wgpu::common_pipeline::FRAGMENT_ENTRYPOINT_NAME, targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::Rgba8UnormSrgb, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_render/src/wgpu/format/interleaved_yuv_to_rgba.rs b/compositor_render/src/wgpu/format/interleaved_yuv_to_rgba.rs index e60702524..5b7e9b909 100644 --- a/compositor_render/src/wgpu/format/interleaved_yuv_to_rgba.rs +++ b/compositor_render/src/wgpu/format/interleaved_yuv_to_rgba.rs @@ -33,14 +33,14 @@ impl InterleavedYuv422ToRgbaConverter { vertex: wgpu::VertexState { module: &shader_module, - entry_point: Some("vs_main"), + entry_point: "vs_main", buffers: &[Vertex::LAYOUT], compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: &shader_module, - entry_point: Some("fs_main"), + entry_point: "fs_main", targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::Rgba8UnormSrgb, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_render/src/wgpu/format/nv12_to_rgba.rs b/compositor_render/src/wgpu/format/nv12_to_rgba.rs index 0a8deac30..dddcb5091 100644 --- a/compositor_render/src/wgpu/format/nv12_to_rgba.rs +++ b/compositor_render/src/wgpu/format/nv12_to_rgba.rs @@ -32,14 +32,14 @@ impl Nv12ToRgbaConverter { vertex: wgpu::VertexState { module: &shader_module, - entry_point: Some("vs_main"), + entry_point: "vs_main", buffers: &[Vertex::LAYOUT], compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: &shader_module, - entry_point: Some("fs_main"), + entry_point: "fs_main", targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::Rgba8UnormSrgb, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_render/src/wgpu/format/planar_yuv_to_rgba.rs b/compositor_render/src/wgpu/format/planar_yuv_to_rgba.rs index a9e6f4b61..79fed53a8 100644 --- a/compositor_render/src/wgpu/format/planar_yuv_to_rgba.rs +++ b/compositor_render/src/wgpu/format/planar_yuv_to_rgba.rs @@ -38,14 +38,14 @@ impl PlanarYuvToRgbaConverter { vertex: wgpu::VertexState { module: &shader_module, - entry_point: Some("vs_main"), + entry_point: "vs_main", buffers: &[Vertex::LAYOUT], compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: &shader_module, - entry_point: Some("fs_main"), + entry_point: "fs_main", targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::Rgba8UnormSrgb, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_render/src/wgpu/format/rgba_to_yuv.rs b/compositor_render/src/wgpu/format/rgba_to_yuv.rs index 866ea3bae..e1f8e46db 100644 --- a/compositor_render/src/wgpu/format/rgba_to_yuv.rs +++ b/compositor_render/src/wgpu/format/rgba_to_yuv.rs @@ -36,14 +36,14 @@ impl RgbaToYuvConverter { vertex: wgpu::VertexState { module: &shader_module, - entry_point: Some("vs_main"), + entry_point: "vs_main", buffers: &[Vertex::LAYOUT], compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: &shader_module, - entry_point: Some("fs_main"), + entry_point: "fs_main", targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::R8Unorm, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_render/src/wgpu/utils/r8_fill_with_color.rs b/compositor_render/src/wgpu/utils/r8_fill_with_color.rs index c5554d01e..65b4d67fb 100644 --- a/compositor_render/src/wgpu/utils/r8_fill_with_color.rs +++ b/compositor_render/src/wgpu/utils/r8_fill_with_color.rs @@ -30,13 +30,13 @@ impl R8FillWithValue { primitive: PRIMITIVE_STATE, vertex: wgpu::VertexState { module: &shader_module, - entry_point: Some("vs_main"), + entry_point: "vs_main", buffers: &[Vertex::LAYOUT], compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: Some(wgpu::FragmentState { module: &shader_module, - entry_point: Some("fs_main"), + entry_point: "fs_main", targets: &[Some(wgpu::ColorTargetState { format: wgpu::TextureFormat::R8Unorm, write_mask: wgpu::ColorWrites::all(), diff --git a/compositor_web/Cargo.toml b/compositor_web/Cargo.toml index 88b41e0ff..682029a67 100644 --- a/compositor_web/Cargo.toml +++ b/compositor_web/Cargo.toml @@ -17,7 +17,7 @@ tracing-subscriber = "0.2.19" log = { workspace = true } wasm-log = "0.3.1" js-sys = "0.3.69" -wasm-bindgen = "0.2.95" +wasm-bindgen = "0.2.93" wasm-bindgen-futures = "0.4.42" web-sys = { version = "0.3.69", features = [ "Document", diff --git a/vk-video/Cargo.toml b/vk-video/Cargo.toml index a31f2ff0d..9204336c0 100644 --- a/vk-video/Cargo.toml +++ b/vk-video/Cargo.toml @@ -18,7 +18,7 @@ h264-reader = { git = "https://github.com/membraneframework-labs/h264-reader.git thiserror = "1.0.59" tracing = "0.1.40" vk-mem = "0.4.0" -wgpu = "23.0.0" +wgpu = "22.1.0" [dev-dependencies] tracing-subscriber = "0.3.18" diff --git a/vk-video/examples/player/player/renderer.rs b/vk-video/examples/player/player/renderer.rs index e68d625c2..fafb7664c 100644 --- a/vk-video/examples/player/player/renderer.rs +++ b/vk-video/examples/player/player/renderer.rs @@ -227,7 +227,7 @@ impl<'a> Renderer<'a> { module: &shader_module, buffers: &[Vertex::LAYOUT], compilation_options: Default::default(), - entry_point: None, + entry_point: "vs_main", }, fragment: Some(wgpu::FragmentState { module: &shader_module, @@ -237,7 +237,7 @@ impl<'a> Renderer<'a> { write_mask: wgpu::ColorWrites::ALL, })], compilation_options: Default::default(), - entry_point: None, + entry_point: "fs_main", }), primitive: wgpu::PrimitiveState { diff --git a/vk-video/src/vulkan_decoder.rs b/vk-video/src/vulkan_decoder.rs index 1777a69d6..84ffdccd5 100644 --- a/vk-video/src/vulkan_decoder.rs +++ b/vk-video/src/vulkan_decoder.rs @@ -730,11 +730,6 @@ impl VulkanDecoder<'_> { } } - // this has to be done with Option and mut, because the closure we create has to be FnMut. - // this means we cannot consume its captures, so we have to take the option to be able to - // drop the resource. - let mut image_clone = Some(image.clone()); - let hal_texture = unsafe { wgpu::hal::vulkan::Device::texture_from_raw( **image, @@ -755,9 +750,7 @@ impl VulkanDecoder<'_> { format: wgpu::TextureFormat::NV12, mip_level_count: 1, }, - Some(Box::new(move || { - image_clone.take(); - })), + Some(Box::new(image.clone())), ) }; diff --git a/vk-video/src/vulkan_decoder/vulkan_ctx.rs b/vk-video/src/vulkan_decoder/vulkan_ctx.rs index 132ab4a3f..daf9761e2 100644 --- a/vk-video/src/vulkan_decoder/vulkan_ctx.rs +++ b/vk-video/src/vulkan_decoder/vulkan_ctx.rs @@ -127,11 +127,6 @@ impl VulkanInstance { None }; - // this has to be done with Option and mut, because the closure we create has to be FnMut. - // this means we cannot consume its captures, so we have to take the option to be able to - // drop the resource. - let mut instance_clone = Some(instance.clone()); - let wgpu_instance = unsafe { wgpu::hal::vulkan::Instance::from_raw( (*entry).clone(), @@ -142,9 +137,7 @@ impl VulkanInstance { extensions, wgpu::InstanceFlags::empty(), false, - Some(Box::new(move || { - instance_clone.take(); - })), + None, )? }; @@ -274,17 +267,10 @@ impl VulkanInstance { }, }; - // this has to be done with Option and mut, because the closure we create has to be FnMut. - // this means we cannot consume its captures, so we have to take the option to be able to - // drop the resource. - let mut device_clone = Some(device.clone()); - let wgpu_device = unsafe { wgpu_adapter.adapter.device_from_raw( device.device.clone(), - Some(Box::new(move || { - device_clone.take(); - })), + false, &required_extensions, wgpu_features, &wgpu::MemoryHints::default(),