Skip to content

Commit

Permalink
always enable dx12 for egui_kittest's wgpu feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 3, 2025
1 parent d28dd8b commit 34f5520
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
29 changes: 28 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,6 @@ dependencies = [
"egui_kittest",
"serde",
"unicode_names2",
"wgpu",
]

[[package]]
Expand Down Expand Up @@ -1926,6 +1925,18 @@ dependencies = [
"bitflags 2.6.0",
]

[[package]]
name = "gpu-allocator"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd"
dependencies = [
"log",
"presser",
"thiserror",
"windows",
]

[[package]]
name = "gpu-descriptor"
version = "0.3.0"
Expand Down Expand Up @@ -3109,6 +3120,12 @@ dependencies = [
"zerocopy",
]

[[package]]
name = "presser"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"

[[package]]
name = "proc-macro-crate"
version = "3.2.0"
Expand Down Expand Up @@ -3262,6 +3279,12 @@ dependencies = [
"getrandom",
]

[[package]]
name = "range-alloc"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"

[[package]]
name = "raw-window-handle"
version = "0.5.2"
Expand Down Expand Up @@ -4512,6 +4535,7 @@ dependencies = [
"android_system_properties",
"arrayvec",
"ash",
"bit-set 0.8.0",
"bitflags 2.6.0",
"block",
"bytemuck",
Expand All @@ -4520,6 +4544,7 @@ dependencies = [
"glow 0.14.2",
"glutin_wgl_sys",
"gpu-alloc",
"gpu-allocator",
"gpu-descriptor",
"js-sys",
"khronos-egl",
Expand All @@ -4533,6 +4558,7 @@ dependencies = [
"once_cell",
"parking_lot",
"profiling",
"range-alloc",
"raw-window-handle 0.6.2",
"renderdoc-sys",
"rustc-hash",
Expand All @@ -4542,6 +4568,7 @@ dependencies = [
"web-sys",
"wgpu-types",
"windows",
"windows-core 0.58.0",
]

[[package]]
Expand Down
2 changes: 1 addition & 1 deletion crates/egui-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub enum WgpuSetup {
/// supported backends, power preferences, and device description.
///
/// By default can also be configured with the environment variables:
/// * `WGPU_BACKEND`: `vulkan`, `dx11`, `dx12`, `metal`, `opengl`, `webgpu`
/// * `WGPU_BACKEND`: `vulkan`, `dx12`, `metal`, `opengl`, `webgpu`
/// * `WGPU_POWER_PREF`: `low`, `high` or `none`
/// * `WGPU_TRACE`: Path to a file to output a wgpu trace file.
CreateNew(WgpuSetupCreateNew),
Expand Down
1 change: 0 additions & 1 deletion crates/egui_demo_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ serde = { workspace = true, optional = true }
[dev-dependencies]
criterion.workspace = true
egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
wgpu = { workspace = true, features = ["metal"] }
egui = { workspace = true, features = ["default_fonts"] }

[[bench]]
Expand Down
11 changes: 9 additions & 2 deletions crates/egui_kittest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]

[features]
# Adds a wgpu-based test renderer.
wgpu = ["dep:egui-wgpu", "dep:pollster", "dep:image", "eframe?/wgpu"]
wgpu = [
"dep:egui-wgpu",
"dep:pollster",
"dep:image",
"dep:wgpu",
"eframe?/wgpu",
]

# Adds a dify-based image snapshot utility.
snapshot = ["dep:dify", "dep:image", "image/png"]
Expand All @@ -38,6 +44,8 @@ eframe = { workspace = true, optional = true }
egui-wgpu = { workspace = true, optional = true }
pollster = { workspace = true, optional = true }
image = { workspace = true, optional = true }
# Enable DX12 because it always comes with a software rasterizer.
wgpu = { workspace = true, features = ["metal", "dx12"], optional = true }

# snapshot dependencies
dify = { workspace = true, optional = true }
Expand All @@ -48,7 +56,6 @@ document-features = { workspace = true, optional = true }
[dev-dependencies]
egui = { workspace = true, features = ["default_fonts"] }
image = { workspace = true, features = ["png"] }
wgpu = { workspace = true, features = ["metal"] }

[lints]
workspace = true

0 comments on commit 34f5520

Please sign in to comment.