diff --git a/Cargo.lock b/Cargo.lock index 1d98d0cce..c62f84f31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -489,9 +489,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.3" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ "jobserver", "libc", @@ -888,9 +888,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -907,9 +907,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1782,7 +1782,6 @@ dependencies = [ "vello", "vello_encoding", "vello_svg", - "wgpu", ] [[package]] @@ -1969,9 +1968,9 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "hickory-proto" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +checksum = "447afdcdb8afb9d0a852af6dc65d9b285ce720ed7a59e42a8bf2e931c67bc1b5" dependencies = [ "async-trait", "cfg-if", @@ -1980,7 +1979,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.4.0", + "idna", "ipnet", "once_cell", "rand 0.8.5", @@ -2032,11 +2031,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2179,16 +2178,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -2489,7 +2478,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", ] [[package]] @@ -3106,7 +3095,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", "smallvec", "windows-targets 0.52.6", ] @@ -3551,9 +3540,9 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.22.5" +version = "0.22.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a04b892cb6f91951f144c33321843790c8574c825aafdb16d815fd7183b5229" +checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f" dependencies = [ "bytemuck", "font-types", @@ -3570,9 +3559,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -3713,9 +3702,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", @@ -3728,9 +3717,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -4473,15 +4462,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-properties" version = "0.1.3" @@ -4557,7 +4537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna", "percent-encoding", ] @@ -5729,9 +5709,9 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" dependencies = [ "zune-core", ] diff --git a/crates/gosub_vello/Cargo.toml b/crates/gosub_vello/Cargo.toml index 07c61fe9d..ec54704a5 100644 --- a/crates/gosub_vello/Cargo.toml +++ b/crates/gosub_vello/Cargo.toml @@ -15,7 +15,6 @@ vello_encoding = "0.3.0" image = "0.25.5" smallvec = "1.13.2" anyhow = "1.0.94" -wgpu = "22.1.0" raw-window-handle = "0.6.2" futures = "0.3.31" vello_svg = { version = "0.5.0", optional = true } diff --git a/crates/gosub_vello/src/lib.rs b/crates/gosub_vello/src/lib.rs index d7e8ab030..d962db006 100644 --- a/crates/gosub_vello/src/lib.rs +++ b/crates/gosub_vello/src/lib.rs @@ -96,9 +96,9 @@ impl RenderBackend for VelloBackend { data: &mut Self::WindowData<'_>, size: SizeU32, ) -> Result> { - let surface = data - .adapter - .create_surface(handle, size.width, size.height, wgpu::PresentMode::AutoVsync)?; + let surface = + data.adapter + .create_surface(handle, size.width, size.height, vello::wgpu::PresentMode::AutoVsync)?; let renderer = data.adapter.create_renderer(Some(surface.config.format))?; diff --git a/crates/gosub_vello/src/render.rs b/crates/gosub_vello/src/render.rs index fedefa9d7..b1dd9fb63 100644 --- a/crates/gosub_vello/src/render.rs +++ b/crates/gosub_vello/src/render.rs @@ -2,14 +2,15 @@ use std::num::NonZeroUsize; use std::sync::Arc; use anyhow::anyhow; -use vello::{AaSupport, Renderer as VelloRenderer, RendererOptions as VelloRendererOptions}; -use wgpu::util::{ +use vello::wgpu::util::{ backend_bits_from_env, dx12_shader_compiler_from_env, gles_minor_version_from_env, power_preference_from_env, }; -use wgpu::{ - Adapter, Backends, CompositeAlphaMode, Device, Dx12Compiler, Gles3MinorVersion, Instance, InstanceDescriptor, - PowerPreference, Queue, Surface, SurfaceConfiguration, TextureFormat, +use vello::wgpu::{ + Adapter, Backends, CompositeAlphaMode, Dx12Compiler, Gles3MinorVersion, Instance, InstanceDescriptor, + PowerPreference, Queue, Surface, SurfaceConfiguration, }; +use vello::wgpu::{Device, TextureFormat}; +use vello::{AaSupport, Renderer as VelloRenderer, RendererOptions as VelloRendererOptions}; use gosub_shared::render_backend::WindowHandle; use gosub_shared::types::Result; @@ -154,7 +155,7 @@ impl Renderer { if adapter.is_none() { adapter = instance - .request_adapter(&wgpu::RequestAdapterOptions { + .request_adapter(&vello::wgpu::RequestAdapterOptions { power_preference: config.power_preference, force_fallback_adapter: false, compatible_surface: None, @@ -164,7 +165,7 @@ impl Renderer { if adapter.is_none() { adapter = instance - .request_adapter(&wgpu::RequestAdapterOptions { + .request_adapter(&vello::wgpu::RequestAdapterOptions { power_preference: config.power_preference, force_fallback_adapter: true, compatible_surface: None, @@ -178,16 +179,16 @@ impl Renderer { let mut features = adapter.features(); - if info.device_type == wgpu::DeviceType::DiscreteGpu { - features -= wgpu::Features::MAPPABLE_PRIMARY_BUFFERS; + if info.device_type == vello::wgpu::DeviceType::DiscreteGpu { + features -= vello::wgpu::Features::MAPPABLE_PRIMARY_BUFFERS; } - features -= wgpu::Features::RAY_QUERY; - features -= wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE; + features -= vello::wgpu::Features::RAY_QUERY; + features -= vello::wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE; let (device, queue) = adapter .request_device( - &wgpu::DeviceDescriptor { + &vello::wgpu::DeviceDescriptor { label: None, required_features: Default::default(), required_limits: Default::default(), @@ -224,7 +225,7 @@ impl InstanceAdapter { window: impl WindowHandle + 'a, width: u32, height: u32, - present_mode: wgpu::PresentMode, + present_mode: vello::wgpu::PresentMode, ) -> Result> { let surface = self.instance.create_surface(window)?; let capabilities = surface.get_capabilities(&self.adapter); @@ -235,7 +236,7 @@ impl InstanceAdapter { .ok_or(anyhow!("surface should support Rgba8Unorm or Bgra8Unorm"))?; let config = SurfaceConfiguration { - usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + usage: vello::wgpu::TextureUsages::RENDER_ATTACHMENT, format, width, height,