diff --git a/Cargo.lock b/Cargo.lock index 4a31dbb4926..c48b62798c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2245,6 +2245,15 @@ dependencies = [ "cc", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "gobject-sys" version = "0.19.5" @@ -3187,6 +3196,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", + "libloading 0.8.3", "pkg-config", ] @@ -7267,6 +7277,8 @@ dependencies = [ "cfg_aliases", "core-graphics-types", "d3d12", + "glow", + "glutin_wgl_sys", "gpu-alloc", "gpu-descriptor", "js-sys", @@ -7276,6 +7288,7 @@ dependencies = [ "log", "metal 0.28.0", "naga", + "ndk-sys", "objc", "once_cell", "parking_lot", diff --git a/components/script/dom/identityhub.rs b/components/script/dom/identityhub.rs index 391afa641c9..f97e02ecaf4 100644 --- a/components/script/dom/identityhub.rs +++ b/components/script/dom/identityhub.rs @@ -62,6 +62,8 @@ pub struct Identities { dx12_hub: IdentityHub, #[cfg(any(target_os = "ios", target_os = "macos"))] metal_hub: IdentityHub, + #[cfg(any(target_os = "linux", target_os = "windows"))] + gl_hub: IdentityHub, dummy_hub: IdentityHub, } @@ -74,6 +76,8 @@ impl Identities { dx12_hub: IdentityHub::new(), #[cfg(any(target_os = "ios", target_os = "macos"))] metal_hub: IdentityHub::new(), + #[cfg(any(target_os = "linux", target_os = "windows"))] + gl_hub: IdentityHub::new(), dummy_hub: IdentityHub::new(), } } @@ -86,6 +90,8 @@ impl Identities { Backend::Dx12 => &mut self.dx12_hub, #[cfg(any(target_os = "ios", target_os = "macos"))] Backend::Metal => &mut self.metal_hub, + #[cfg(any(target_os = "linux", target_os = "windows"))] + Backend::Gl => &mut self.gl_hub, _ => &mut self.dummy_hub, } } @@ -98,6 +104,8 @@ impl Identities { (&mut self.dx12_hub, Backend::Dx12), #[cfg(any(target_os = "ios", target_os = "macos"))] (&mut self.metal_hub, Backend::Metal), + #[cfg(any(target_os = "linux", target_os = "windows"))] + (&mut self.gl_hub, Backend::Gl), (&mut self.dummy_hub, Backend::Empty), ] } diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml index 2926cef6fce..2cd37b08ed4 100644 --- a/components/webgpu/Cargo.toml +++ b/components/webgpu/Cargo.toml @@ -34,7 +34,7 @@ features = ["metal"] # We want the wgpu-core Vulkan backend on Linux and Windows. [target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgpu-core] workspace = true -features = ["vulkan"] +features = ["gles", "vulkan"] # We want the wgpu-core Direct3D backends on Windows. [target.'cfg(windows)'.dependencies.wgpu-core]