mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
webgpu: Enable gles support (#32452)
This commit is contained in:
parent
b178a2b6e2
commit
4f5184b6e2
3 changed files with 22 additions and 1 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -2245,6 +2245,15 @@ dependencies = [
|
||||||
"cc",
|
"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]]
|
[[package]]
|
||||||
name = "gobject-sys"
|
name = "gobject-sys"
|
||||||
version = "0.19.5"
|
version = "0.19.5"
|
||||||
|
@ -3187,6 +3196,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
|
checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
|
"libloading 0.8.3",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -7267,6 +7277,8 @@ dependencies = [
|
||||||
"cfg_aliases",
|
"cfg_aliases",
|
||||||
"core-graphics-types",
|
"core-graphics-types",
|
||||||
"d3d12",
|
"d3d12",
|
||||||
|
"glow",
|
||||||
|
"glutin_wgl_sys",
|
||||||
"gpu-alloc",
|
"gpu-alloc",
|
||||||
"gpu-descriptor",
|
"gpu-descriptor",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
@ -7276,6 +7288,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"metal 0.28.0",
|
"metal 0.28.0",
|
||||||
"naga",
|
"naga",
|
||||||
|
"ndk-sys",
|
||||||
"objc",
|
"objc",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
|
|
|
@ -62,6 +62,8 @@ pub struct Identities {
|
||||||
dx12_hub: IdentityHub,
|
dx12_hub: IdentityHub,
|
||||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
metal_hub: IdentityHub,
|
metal_hub: IdentityHub,
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||||
|
gl_hub: IdentityHub,
|
||||||
dummy_hub: IdentityHub,
|
dummy_hub: IdentityHub,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ impl Identities {
|
||||||
dx12_hub: IdentityHub::new(),
|
dx12_hub: IdentityHub::new(),
|
||||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
metal_hub: IdentityHub::new(),
|
metal_hub: IdentityHub::new(),
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||||
|
gl_hub: IdentityHub::new(),
|
||||||
dummy_hub: IdentityHub::new(),
|
dummy_hub: IdentityHub::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,6 +90,8 @@ impl Identities {
|
||||||
Backend::Dx12 => &mut self.dx12_hub,
|
Backend::Dx12 => &mut self.dx12_hub,
|
||||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
Backend::Metal => &mut self.metal_hub,
|
Backend::Metal => &mut self.metal_hub,
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||||
|
Backend::Gl => &mut self.gl_hub,
|
||||||
_ => &mut self.dummy_hub,
|
_ => &mut self.dummy_hub,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,6 +104,8 @@ impl Identities {
|
||||||
(&mut self.dx12_hub, Backend::Dx12),
|
(&mut self.dx12_hub, Backend::Dx12),
|
||||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
(&mut self.metal_hub, Backend::Metal),
|
(&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),
|
(&mut self.dummy_hub, Backend::Empty),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ features = ["metal"]
|
||||||
# We want the wgpu-core Vulkan backend on Linux and Windows.
|
# 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]
|
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgpu-core]
|
||||||
workspace = true
|
workspace = true
|
||||||
features = ["vulkan"]
|
features = ["gles", "vulkan"]
|
||||||
|
|
||||||
# We want the wgpu-core Direct3D backends on Windows.
|
# We want the wgpu-core Direct3D backends on Windows.
|
||||||
[target.'cfg(windows)'.dependencies.wgpu-core]
|
[target.'cfg(windows)'.dependencies.wgpu-core]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue