1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Revert "Updated to latest wgpu (0.18.0) (#3505)"

This reverts commit cd46691423.
This commit is contained in:
Emil Ernerfeldt
2023-11-16 10:39:21 +01:00
parent 82863f8ec2
commit 3d65200289
6 changed files with 34 additions and 110 deletions

113
Cargo.lock generated
View File

@@ -1020,7 +1020,7 @@ dependencies = [
"eframe",
"egui_glow",
"env_logger",
"glow 0.12.3",
"glow",
]
[[package]]
@@ -1227,7 +1227,7 @@ dependencies = [
"egui-wgpu",
"egui-winit",
"egui_glow",
"glow 0.12.3",
"glow",
"glutin",
"glutin-winit",
"image",
@@ -1367,7 +1367,7 @@ dependencies = [
"document-features",
"egui",
"egui-winit",
"glow 0.12.3",
"glow",
"glutin",
"glutin-winit",
"log",
@@ -1614,18 +1614,6 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
[[package]]
name = "flume"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
"futures-core",
"futures-sink",
"nanorand",
"spin 0.9.8",
]
[[package]]
name = "fnv"
version = "1.0.7"
@@ -1795,10 +1783,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"wasi",
"wasm-bindgen",
]
[[package]]
@@ -1859,18 +1845,6 @@ dependencies = [
"web-sys",
]
[[package]]
name = "glow"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4"
dependencies = [
"js-sys",
"slotmap",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "glutin"
version = "0.30.10"
@@ -1884,7 +1858,7 @@ dependencies = [
"dispatch",
"glutin_egl_sys",
"glutin_glx_sys",
"glutin_wgl_sys 0.4.0",
"glutin_wgl_sys",
"libloading 0.7.4",
"objc2",
"once_cell",
@@ -1935,15 +1909,6 @@ dependencies = [
"gl_generator",
]
[[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.16.3"
@@ -1976,16 +1941,15 @@ dependencies = [
[[package]]
name = "gpu-allocator"
version = "0.23.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad"
checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8"
dependencies = [
"backtrace",
"log",
"presser",
"thiserror",
"winapi",
"windows 0.51.1",
"windows 0.44.0",
]
[[package]]
@@ -2331,12 +2295,12 @@ dependencies = [
[[package]]
name = "khronos-egl"
version = "6.0.0"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3"
dependencies = [
"libc",
"libloading 0.8.0",
"libloading 0.7.4",
"pkg-config",
]
@@ -2492,9 +2456,9 @@ dependencies = [
[[package]]
name = "metal"
version = "0.27.0"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25"
checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318"
dependencies = [
"bitflags 2.4.0",
"block",
@@ -2565,15 +2529,15 @@ dependencies = [
[[package]]
name = "naga"
version = "0.14.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071"
checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e"
dependencies = [
"bit-set",
"bitflags 2.4.0",
"codespan-reporting",
"hexf-parse",
"indexmap 2.0.0",
"indexmap 1.9.3",
"log",
"num-traits",
"rustc-hash",
@@ -2583,15 +2547,6 @@ dependencies = [
"unicode-xid",
]
[[package]]
name = "nanorand"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
dependencies = [
"getrandom",
]
[[package]]
name = "ndk"
version = "0.7.0"
@@ -3039,12 +2994,6 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "presser"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
[[package]]
name = "prettyplease"
version = "0.2.15"
@@ -3306,7 +3255,7 @@ dependencies = [
"cc",
"libc",
"once_cell",
"spin 0.5.2",
"spin",
"untrusted",
"web-sys",
"winapi",
@@ -3665,15 +3614,6 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
dependencies = [
"lock_api",
]
[[package]]
name = "spirv"
version = "0.2.0+1.5.4"
@@ -4383,13 +4323,12 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
name = "wgpu"
version = "0.18.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24"
checksum = "7472f3b69449a8ae073f6ec41d05b6f846902d92a6c45313c50cb25857b736ce"
dependencies = [
"arrayvec",
"cfg-if",
"flume",
"js-sys",
"log",
"naga",
@@ -4408,9 +4347,9 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "0.18.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "837e02ddcdc6d4a9b56ba4598f7fd4202a7699ab03f6ef4dcdebfad2c966aea6"
checksum = "ecf7454d9386f602f7399225c92dd2fbdcde52c519bc8fb0bd6fbeb388075dc2"
dependencies = [
"arrayvec",
"bit-vec",
@@ -4431,9 +4370,9 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "0.18.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e30b9a8155c83868e82a8c5d3ce899de6c3961d2ef595de8fc168a1677fc2d8"
checksum = "6654a13885a17f475e8324efb46dc6986d7aaaa98353330f8de2077b153d0101"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -4443,8 +4382,7 @@ dependencies = [
"block",
"core-graphics-types",
"d3d12",
"glow 0.13.0",
"glutin_wgl_sys 0.5.0",
"glow",
"gpu-alloc",
"gpu-allocator",
"gpu-descriptor",
@@ -4457,7 +4395,6 @@ dependencies = [
"metal",
"naga",
"objc",
"once_cell",
"parking_lot",
"profiling",
"range-alloc",
@@ -4474,9 +4411,9 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "0.18.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd"
checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67"
dependencies = [
"bitflags 2.4.0",
"js-sys",

View File

@@ -37,6 +37,4 @@ opt-level = 2
[workspace.dependencies]
thiserror = "1.0.37"
wgpu = "0.18.0"
# Use this to build wgpu with WebGL support on the Web *instead* of using WebGPU.
#wgpu = { version = "0.18.0", features = ["webgl"] }
wgpu = "0.17.0"

View File

@@ -77,7 +77,7 @@ impl WebPainterWgpu {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: options.wgpu_options.supported_backends,
..Default::default()
dx12_shader_compiler: Default::default(),
});
let canvas = super::canvas_element_or_die(canvas_id);
@@ -236,7 +236,7 @@ impl WebPainter for WebPainterWgpu {
b: clear_color[2] as f64,
a: clear_color[3] as f64,
}),
store: wgpu::StoreOp::Store,
store: true,
},
})],
depth_stencil_attachment: self.depth_texture_view.as_ref().map(|view| {
@@ -244,16 +244,12 @@ impl WebPainter for WebPainterWgpu {
view,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
// It is very unlikely that the depth buffer is needed after egui finished rendering
// so no need to store it. (this can improve performance on tiling GPUs like mobile chips or Apple Silicon)
store: wgpu::StoreOp::Discard,
store: false,
}),
stencil_ops: None,
}
}),
label: Some("egui_render"),
occlusion_query_set: None,
timestamp_writes: None,
});
renderer.render(&mut render_pass, clipped_primitives, &screen_descriptor);

View File

@@ -111,7 +111,7 @@ impl Painter {
) -> Self {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: configuration.supported_backends,
..Default::default()
dx12_shader_compiler: Default::default(),
});
Self {
@@ -565,7 +565,6 @@ impl Painter {
});
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("egui_render"),
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view,
resolve_target,
@@ -576,7 +575,7 @@ impl Painter {
b: clear_color[2] as f64,
a: clear_color[3] as f64,
}),
store: wgpu::StoreOp::Store,
store: true,
},
})],
depth_stencil_attachment: self.depth_texture_view.get(&viewport_id).map(|view| {
@@ -584,15 +583,12 @@ impl Painter {
view,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
// It is very unlikely that the depth buffer is needed after egui finished rendering
// so no need to store it. (this can improve performance on tiling GPUs like mobile chips or Apple Silicon)
store: wgpu::StoreOp::Discard,
store: true,
}),
stencil_ops: None,
}
}),
timestamp_writes: None,
occlusion_query_set: None,
label: Some("egui_render"),
});
renderer.render(&mut render_pass, clipped_primitives, &screen_descriptor);

View File

@@ -78,7 +78,7 @@ unity = ["epaint/unity"]
[dependencies]
epaint = { version = "0.23.0", path = "../epaint", default-features = false }
ahash = { version = "0.8.6", default-features = false, features = [
ahash = { version = "0.8.1", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
"std",
] }

View File

@@ -47,9 +47,6 @@ skip = [
{ name = "windows_x86_64_msvc" }, # old version via glutin
{ name = "windows-sys" }, # old version via glutin
{ name = "windows" }, # old version via accesskit
{ name = "spin" }, # old version via ring through rusttls and other libraries, newer for wgpu.
{ name = "glow" }, # TODO(@wumpf): Old version use for glow backend right now, newer for wgpu. Updating this trickles out to updating winit.
{ name = "glutin_wgl_sys" }, # TODO(@wumpf): As above
]
skip-tree = [
{ name = "criterion" }, # dev-dependency