diff --git a/Cargo.lock b/Cargo.lock index 118bc99fbf9..a3ced518663 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "accesskit" -version = "0.24.1" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" +checksum = "ad442f58ee04714aaa0ba0a2768c1ea1935b29507bb22ddece8cbbc76db02932" dependencies = [ "enumn", "uuid", @@ -14,47 +14,37 @@ dependencies = [ [[package]] name = "accesskit_atspi_common" -version = "0.19.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023da0e5097f46df7092d5280b02efb9bbf8d93298daeced42652463e357d636" +checksum = "52c182f9c282ac9c5638d876d551d15e5f7d397ec263349a0c6a2b61595dd5e4" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", + "accesskit_consumer", "atspi-common", - "phf", + "phf 0.14.0", "serde", "zvariant", ] [[package]] name = "accesskit_consumer" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb" -dependencies = [ - "accesskit", - "hashbrown 0.16.1", -] - -[[package]] -name = "accesskit_consumer" -version = "0.38.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245" +checksum = "8a45e2bb300bea6d5f33a82c3e051c3ddc6f41c209750f68a0acbe991a284344" dependencies = [ "accesskit", - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] name = "accesskit_macos" -version = "0.26.3" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076" +checksum = "5701624bf6a11efb6d4c8e922bf44126ed96250e5faa9a7a0468c979635839a4" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", - "hashbrown 0.16.1", + "accesskit_consumer", + "hashbrown 0.17.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", @@ -62,9 +52,9 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.22.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e156ed3802e35eefe894ef2671bc6c889303d8a7e110b5e1b48f504b91362f" +checksum = "202f24df034a7476d07b7f74284de84f6d62aabd858dbe7ee9cad3b7ad6f8f9d" dependencies = [ "accesskit", "accesskit_atspi_common", @@ -80,13 +70,13 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.33.1" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e93ac7bf50b964f1cbb75f741629a4e950571baa1ef1274457ab5a80d9bcc2" +checksum = "ce63f35d6bdcf59f26b76b3379063f738e6412cef46999cc772d46aa3de35adb" dependencies = [ "accesskit", - "accesskit_consumer 0.37.0", - "hashbrown 0.16.1", + "accesskit_consumer", + "hashbrown 0.17.1", "static_assertions", "windows 0.62.2", "windows-core 0.62.2", @@ -666,6 +656,15 @@ dependencies = [ "bit-vec 0.9.1", ] +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec 0.9.1", +] + [[package]] name = "bit-vec" version = "0.8.0" @@ -1888,12 +1887,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foldhash" version = "0.2.0" @@ -2260,32 +2253,12 @@ dependencies = [ "windows 0.62.2", ] -[[package]] -name = "gpu-descriptor" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" -dependencies = [ - "bitflags 2.13.1", - "gpu-descriptor-types", - "hashbrown 0.15.5", -] - -[[package]] -name = "gpu-descriptor-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" -dependencies = [ - "bitflags 2.13.1", -] - [[package]] name = "gpui-ce" version = "0.2.2" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", + "accesskit_consumer", "anyhow", "async-channel", "async-task", @@ -2572,7 +2545,7 @@ version = "0.1.0" dependencies = [ "gpui-ce", "naga 24.0.0", - "naga 29.0.4", + "naga 30.0.1", "wgsl-rs", "windows 0.62.2", ] @@ -2677,7 +2650,7 @@ dependencies = [ "js-sys", "log", "metal", - "naga 29.0.4", + "naga 30.0.1", "objc2 0.6.4", "objc2-metal 0.3.2", "parking_lot", @@ -2820,15 +2793,6 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash 0.1.5", -] - [[package]] name = "hashbrown" version = "0.16.1" @@ -2837,7 +2801,7 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", - "foldhash 0.2.0", + "foldhash", ] [[package]] @@ -2845,6 +2809,9 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] [[package]] name = "hdrhistogram" @@ -3744,11 +3711,48 @@ dependencies = [ "num-traits", "once_cell", "rustc-hash 1.1.0", + "thiserror 2.0.20", + "unicode-ident", +] + +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set 0.10.0", + "bitflags 2.13.1", + "cfg-if", + "cfg_aliases", + "codespan-reporting 0.13.1", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", "spirv", "thiserror 2.0.20", "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.20", +] + [[package]] name = "nanorand" version = "0.7.0" @@ -4225,6 +4229,7 @@ dependencies = [ "bitflags 2.13.1", "objc2 0.6.4", "objc2-core-foundation", + "objc2-core-graphics", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", ] @@ -4372,7 +4377,7 @@ dependencies = [ "approx", "palette_derive", "palette_math", - "phf", + "phf 0.13.1", "serde", ] @@ -4484,30 +4489,39 @@ name = "phf" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_shared 0.13.1", +] + +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" dependencies = [ "phf_macros", - "phf_shared", + "phf_shared 0.14.0", "serde", ] [[package]] name = "phf_generator" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" dependencies = [ "fastrand", - "phf_shared", + "phf_shared 0.14.0", ] [[package]] name = "phf_macros" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" dependencies = [ "phf_generator", - "phf_shared", + "phf_shared 0.14.0", "proc-macro2", "quote", "syn 2.0.119", @@ -4522,6 +4536,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] + [[package]] name = "pico-args" version = "0.5.0" @@ -6715,9 +6738,9 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e8840e1ba2881d4cbb18d2147627a56af426ff064c0401eb0c8410c6325d07" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" dependencies = [ "arrayvec", "bitflags 2.13.1", @@ -6725,10 +6748,10 @@ dependencies = [ "cfg-if", "cfg_aliases", "document-features", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "js-sys", "log", - "naga 29.0.4", + "naga 30.0.1", "parking_lot", "portable-atomic", "profiling", @@ -6745,21 +6768,22 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f519832254e56965a9940c4af57dcb75f702b6f6fa4a0b172f685395843a4d7" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" dependencies = [ "arrayvec", - "bit-set 0.9.1", + "bit-set 0.10.0", "bit-vec 0.9.1", "bitflags 2.13.1", "bytemuck", "cfg_aliases", "document-features", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "indexmap", "log", - "naga 29.0.4", + "naga 30.0.1", + "naga-types", "once_cell", "parking_lot", "portable-atomic", @@ -6779,50 +6803,50 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e39e26c4c0e07589e67d18546cf79ff45383659fc72fca4dd293358a0347f3" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e09be551dc939498bdd5f6b2c66e55ab275dad25825267a08605a80fc9f0af" +checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-wasm" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1fb1798be2a912497d4c224f72d39bb0cb34af50e8bcc29865bc339c943059" +checksum = "d260ca2ca8adc654f513a869bf3cac0b47f5b8d3f87803d6942015f8de597aae" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e592c1bbef6ad047647ae6e666ebd8cee7a32bb4544d9700ec96cbf73230257" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ace1c17727311c22a46e4e3faf56ea6de81af99dcc839bdfb54857b94d448d" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" dependencies = [ "android_system_properties", "arrayvec", "ash", - "bit-set 0.9.1", + "bit-set 0.10.0", "bitflags 2.13.1", "block2 0.6.2", "bytemuck", @@ -6831,17 +6855,18 @@ dependencies = [ "glow", "glutin_wgl_sys", "gpu-allocator", - "gpu-descriptor", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "js-sys", "khronos-egl", "libc", "libloading", "log", - "naga 29.0.4", + "naga 30.0.1", + "naga-types", "ndk-sys", "objc2 0.6.4", "objc2-core-foundation", + "objc2-core-graphics", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", "objc2-quartz-core 0.3.2", @@ -6856,6 +6881,7 @@ dependencies = [ "raw-window-metal", "renderdoc-sys", "smallvec", + "static_assertions", "thiserror 2.0.20", "wasm-bindgen", "wayland-sys", @@ -6869,25 +6895,27 @@ dependencies = [ [[package]] name = "wgpu-naga-bridge" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95226013f547544b223281cd16a4fb549aa9dcb562adbda0faae4c73ffbbc161" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" dependencies = [ - "naga 29.0.4", + "naga 30.0.1", "wgpu-types", ] [[package]] name = "wgpu-types" -version = "29.0.4" +version = "30.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bf84cd9ca8ca45e2b223a3868f1adf9bfc0c66aeac212e76ee7e40fdadf8f5" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" dependencies = [ "bitflags 2.13.1", "bytemuck", "js-sys", "log", + "naga-types", "raw-window-handle", + "static_assertions", "web-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 5e161e51ba7..ee46c30a681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,11 +37,11 @@ homepage = "https://gpui-ce.github.io/" readme = "README.md" [workspace.dependencies] -accesskit = { version = "0.24.0", features = ["enumn"] } -accesskit_consumer = "0.38.0" -accesskit_macos = "0.26.0" -accesskit_unix = "0.22.0" -accesskit_windows = "0.33.1" +accesskit = { version = "0.25.1", features = ["enumn"] } +accesskit_consumer = "0.39.1" +accesskit_macos = "0.27.1" +accesskit_unix = "0.24.0" +accesskit_windows = "0.35.1" anyhow = "1.0.86" async-task = "4.7" backtrace = "0.3" @@ -187,10 +187,14 @@ ashpd = { version = "0.13", default-features = false, features = [ libc = "0.2" smol = "2.0" util = { path = "crates/gpui_zed_util", version = "0.2.2", package = "gpui_ce_zed_util" } -wgpu = "29.0.3" -wgsl-rs = { git = "https://github.com/schell/wgsl-rs", rev = "b2de16a1b81e67d76bc265c296184f882864badb", default-features = false, features = [ - "validation", -] } +wgpu = "30.0.1" +# No `validation` here: it only backs the `#[cfg(test)]` validation tests the +# `#[wgsl]` macro generates, and it links wgsl-rs's own naga (29, behind this +# workspace's), so enabling it workspace-wide put a second naga into every +# consumer's normal build. gpui_render, the one crate with `#[wgsl]` modules, +# enables it as a dev-dependency instead, and its build.rs already validates +# every pipeline's WGSL with this workspace's naga on every build. +wgsl-rs = { git = "https://github.com/schell/wgsl-rs", rev = "b2de16a1b81e67d76bc265c296184f882864badb", default-features = false } criterion = { version = "0.5", features = ["html_reports"] } objc2-app-kit = { version = "0.3", default-features = false, features = [ "objc2-core-foundation", diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index 358db8e2c8a..d061001dbc3 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -1543,7 +1543,7 @@ impl Window { } let initial_tree = accesskit::TreeUpdate { nodes: vec![(ROOT_NODE_ID, initial_root_node)], - tree: Some(accesskit::Tree::new(ROOT_NODE_ID)), + tree: Some(accesskit::TreeInfo::new(ROOT_NODE_ID)), tree_id: accesskit::TreeId::ROOT, focus: ROOT_NODE_ID, }; diff --git a/crates/gpui/src/window/a11y.rs b/crates/gpui/src/window/a11y.rs index 7b0c9217bf3..45eb9388999 100644 --- a/crates/gpui/src/window/a11y.rs +++ b/crates/gpui/src/window/a11y.rs @@ -601,7 +601,7 @@ impl A11yNodeBuilder { let nodes = std::mem::take(&mut self.all_nodes); let update = TreeUpdate { nodes, - tree: Some(accesskit::Tree::new(ROOT_NODE_ID)), + tree: Some(accesskit::TreeInfo::new(ROOT_NODE_ID)), tree_id: accesskit::TreeId::ROOT, focus, }; diff --git a/crates/gpui_render/Cargo.toml b/crates/gpui_render/Cargo.toml index e4c6cf5bb7c..dbf8416311e 100644 --- a/crates/gpui_render/Cargo.toml +++ b/crates/gpui_render/Cargo.toml @@ -20,7 +20,7 @@ wgsl-rs.workspace = true windows.workspace = true [build-dependencies] -naga = { version = "29.0.4", features = [ +naga = { version = "30.0.1", features = [ "glsl-out", "hlsl-out", "msl-out", @@ -34,4 +34,8 @@ gpui = { path = "../gpui", version = "0.2.2", package = "gpui-ce", default-featu wgsl-rs.workspace = true [dev-dependencies] -naga = { version = "29.0.4", features = ["wgsl-in"] } +naga = { version = "30.0.1", features = ["wgsl-in"] } +# The `#[wgsl]` modules' generated `#[cfg(test)]` validation tests call +# `Source::validate`, which only exists with this feature. Enabling it here +# keeps those tests while leaving wgsl-rs's own naga out of normal builds. +wgsl-rs = { workspace = true, features = ["validation"] } diff --git a/crates/gpui_render/src/shaders/tests.rs b/crates/gpui_render/src/shaders/tests.rs index 16efc2e4d5a..f4f474bd10a 100644 --- a/crates/gpui_render/src/shaders/tests.rs +++ b/crates/gpui_render/src/shaders/tests.rs @@ -3,7 +3,14 @@ use super::*; #[test] fn validates_subpixel_shader() { let generated = subpixel_sprite::WGSL_SOURCE.wgsl_source().unwrap(); - wgsl_rs::validate_wgsl_source(&format!("enable dual_source_blending;\n{generated}")).unwrap(); + let source = format!("enable dual_source_blending;\n{generated}"); + let module = naga::front::wgsl::parse_str(&source).unwrap(); + naga::valid::Validator::new( + naga::valid::ValidationFlags::all(), + naga::valid::Capabilities::all(), + ) + .validate(&module) + .unwrap(); } #[test] diff --git a/crates/gpui_wgpu/Cargo.toml b/crates/gpui_wgpu/Cargo.toml index ffe59f2e92c..02cb1b397bc 100644 --- a/crates/gpui_wgpu/Cargo.toml +++ b/crates/gpui_wgpu/Cargo.toml @@ -76,7 +76,7 @@ bytemuck = { version = "1", features = ["derive"] } criterion.workspace = true env_logger.workspace = true gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] } -naga = { version = "29.0.4", features = ["wgsl-in"] } +naga = { version = "30.0.1", features = ["wgsl-in"] } [[example]] name = "custom_gpu" diff --git a/crates/gpui_wgpu/src/wgpu_atlas.rs b/crates/gpui_wgpu/src/wgpu_atlas.rs index 7a6ae19d92c..5c07a484a95 100644 --- a/crates/gpui_wgpu/src/wgpu_atlas.rs +++ b/crates/gpui_wgpu/src/wgpu_atlas.rs @@ -439,6 +439,7 @@ mod tests { power_preference: wgpu::PowerPreference::LowPower, compatible_surface: None, force_fallback_adapter: false, + apply_limit_buckets: false, }) .await .map_err(|error| anyhow::anyhow!("failed to request adapter: {error}"))?; diff --git a/crates/gpui_wgpu/src/wgpu_context.rs b/crates/gpui_wgpu/src/wgpu_context.rs index 377f1f6cf0f..5230b948f31 100644 --- a/crates/gpui_wgpu/src/wgpu_context.rs +++ b/crates/gpui_wgpu/src/wgpu_context.rs @@ -494,6 +494,7 @@ impl WgpuContext { power_preference: wgpu::PowerPreference::LowPower, compatible_surface: None, force_fallback_adapter: false, + apply_limit_buckets: false, })) .map_err(|error| { anyhow::anyhow!("failed to request headless GPU adapter: {error}") @@ -580,6 +581,7 @@ impl WgpuContext { power_preference: wgpu::PowerPreference::HighPerformance, compatible_surface: Some(&surface), force_fallback_adapter: false, + apply_limit_buckets: false, }) .await .map_err(|error| { @@ -881,6 +883,7 @@ impl WgpuContext { desired_maximum_frame_latency: 2, alpha_mode: caps.alpha_modes[0], view_formats: vec![], + color_space: wgpu::SurfaceColorSpace::Auto, }; surface.configure(&device.device, &test_config); diff --git a/crates/gpui_wgpu/src/wgpu_renderer/platform.rs b/crates/gpui_wgpu/src/wgpu_renderer/platform.rs index 225f0383c89..75e4dbfec43 100644 --- a/crates/gpui_wgpu/src/wgpu_renderer/platform.rs +++ b/crates/gpui_wgpu/src/wgpu_renderer/platform.rs @@ -118,7 +118,7 @@ impl WgpuRenderer { .create_view(&wgpu::TextureViewDescriptor::default()); let rendered = self.render_to_view(scene, &view); if rendered { - frame.present(); + self.resources().queue.present(frame); } rendered } diff --git a/crates/gpui_wgpu/src/wgpu_renderer/surfaces/macos.rs b/crates/gpui_wgpu/src/wgpu_renderer/surfaces/macos.rs index e75fbdbc088..62077f06164 100644 --- a/crates/gpui_wgpu/src/wgpu_renderer/surfaces/macos.rs +++ b/crates/gpui_wgpu/src/wgpu_renderer/surfaces/macos.rs @@ -214,6 +214,7 @@ unsafe fn import_core_video_texture( 1, 1, size.into(), + None, ) }; Some(unsafe { @@ -229,6 +230,8 @@ unsafe fn import_core_video_texture( usage: wgpu::TextureUsages::TEXTURE_BINDING, view_formats: &[], }, + // What wgpu 29 always assumed for a wrapped texture. + wgpu::TextureUses::UNINITIALIZED, ) }) } diff --git a/crates/gpui_wgpu/src/wgpu_renderer/target.rs b/crates/gpui_wgpu/src/wgpu_renderer/target.rs index a65bd7aa8f1..d961374fd8a 100644 --- a/crates/gpui_wgpu/src/wgpu_renderer/target.rs +++ b/crates/gpui_wgpu/src/wgpu_renderer/target.rs @@ -96,6 +96,9 @@ impl RenderTarget { desired_maximum_frame_latency: 2, alpha_mode, view_formats: Vec::new(), + // `Auto` is wgpu's pre-30 behavior: sRGB, or extended linear + // sRGB for an Rgba16Float surface. + color_space: wgpu::SurfaceColorSpace::Auto, }, transparent_alpha_mode, opaque_alpha_mode,