Browse Source

wgpu 0.16 (#2884)

* Adapt to latest wgpu changes

* Point to latest wgpu commit

* Fix egui-wgpu winit

* wgpu 0.16

* Fix web compilation issue

* Add libloading to deny.toml skip

* lock fix after merge, sort deny skip list

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
pull/2948/head
Niklas Korz 2 years ago
committed by GitHub
parent
commit
f962378243
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 155
      Cargo.lock
  2. 4
      crates/eframe/Cargo.toml
  3. 2
      crates/eframe/src/web/web_painter_wgpu.rs
  4. 2
      crates/egui-wgpu/Cargo.toml
  5. 8
      crates/egui-wgpu/src/renderer.rs
  6. 2
      crates/egui-wgpu/src/winit.rs
  7. 1
      deny.toml

155
Cargo.lock

@ -145,7 +145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4165a1aef703232031b40a6e8908c2f9e314d495f11aa7f98db75d39a497cc6a"
dependencies = [
"android-properties",
"bitflags",
"bitflags 1.3.2",
"cc",
"jni-sys",
"libc",
@ -219,7 +219,7 @@ version = "0.37.2+1.3.238"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03"
dependencies = [
"libloading",
"libloading 0.7.4",
]
[[package]]
@ -414,7 +414,7 @@ version = "0.64.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"cexpr",
"clang-sys",
"lazy_static",
@ -451,6 +451,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c70beb79cbb5ce9c4f8e20849978f34225931f665bb49efa6982875a4d5facb3"
[[package]]
name = "block"
version = "0.1.6"
@ -662,7 +668,7 @@ checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3"
dependencies = [
"glob",
"libc",
"libloading",
"libloading 0.7.4",
]
[[package]]
@ -671,7 +677,7 @@ version = "3.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"clap_lex",
"indexmap",
"textwrap",
@ -703,7 +709,7 @@ version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"block",
"cocoa-foundation",
"core-foundation",
@ -719,7 +725,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"block",
"core-foundation",
"core-graphics-types",
@ -815,7 +821,7 @@ version = "0.22.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"core-foundation",
"core-graphics-types",
"foreign-types",
@ -828,7 +834,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"core-foundation",
"foreign-types",
"libc",
@ -1005,8 +1011,8 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da"
dependencies = [
"bitflags",
"libloading",
"bitflags 1.3.2",
"libloading 0.7.4",
"winapi",
]
@ -1125,7 +1131,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794"
dependencies = [
"libloading",
"libloading 0.7.4",
]
[[package]]
@ -1635,15 +1641,6 @@ dependencies = [
"slab",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "gdk-pixbuf-sys"
version = "0.16.3"
@ -1753,9 +1750,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "glow"
version = "0.12.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8edf6019dff2d92ad27c1e3ff82ad50a0aea5b01370353cc928bfdc33e95925c"
checksum = "4e007a07a24de5ecae94160f141029e9a347282cfe25d1d58d85d845cf3130f1"
dependencies = [
"js-sys",
"slotmap",
@ -1769,7 +1766,7 @@ version = "0.30.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "373e3fbcfa6b9c313faa03625a08268168ba9be1003d1ecfcebd5266388aa131"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"cfg_aliases",
"cgl",
"core-foundation",
@ -1777,7 +1774,7 @@ dependencies = [
"glutin_egl_sys",
"glutin_glx_sys",
"glutin_wgl_sys",
"libloading",
"libloading 0.7.4",
"objc2",
"once_cell",
"raw-window-handle",
@ -1844,7 +1841,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"gpu-alloc-types",
]
@ -1854,20 +1851,20 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]
[[package]]
name = "gpu-allocator"
version = "0.21.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "434618454f74b63f9b39328298097256977c41ea0ba9d75a47238b77790b6163"
checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8"
dependencies = [
"backtrace",
"log",
"thiserror",
"winapi",
"windows 0.43.0",
"windows 0.44.0",
]
[[package]]
@ -1876,7 +1873,7 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"gpu-descriptor-types",
"hashbrown",
]
@ -1887,7 +1884,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]
[[package]]
@ -1925,14 +1922,14 @@ dependencies = [
[[package]]
name = "hassle-rs"
version = "0.9.0"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90601c6189668c7345fc53842cb3f3a3d872203d523be1b3cb44a36a3e62fb85"
checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"com-rs",
"libc",
"libloading",
"libloading 0.7.4",
"thiserror",
"widestring",
"winapi",
@ -2180,7 +2177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3"
dependencies = [
"libc",
"libloading",
"libloading 0.7.4",
"pkg-config",
]
@ -2227,6 +2224,16 @@ dependencies = [
"winapi",
]
[[package]]
name = "libloading"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb"
dependencies = [
"cfg-if",
"windows-sys 0.48.0",
]
[[package]]
name = "line-wrap"
version = "0.1.1"
@ -2327,7 +2334,7 @@ version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"block",
"core-graphics-types",
"foreign-types",
@ -2370,12 +2377,12 @@ dependencies = [
[[package]]
name = "naga"
version = "0.11.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eafe22a23b797c9bc227c6c896419b26b5bb88fa903417a3adaed08778850d5"
checksum = "f00ce114f2867153c079d4489629dbd27aa4b5387a8ba5341bd3f6dfe870688f"
dependencies = [
"bit-set",
"bitflags",
"bitflags 1.3.2",
"codespan-reporting",
"hexf-parse",
"indexmap",
@ -2394,7 +2401,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"jni-sys",
"ndk-sys",
"num_enum",
@ -2452,7 +2459,7 @@ version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"cfg-if",
"libc",
"memoffset",
@ -2465,7 +2472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
dependencies = [
"autocfg",
"bitflags",
"bitflags 1.3.2",
"cfg-if",
"libc",
"memoffset",
@ -2780,7 +2787,7 @@ version = "0.17.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"crc32fast",
"flate2",
"miniz_oxide",
@ -2960,7 +2967,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]
[[package]]
@ -2969,7 +2976,7 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb02a9aee8e8c7ad8d86890f1e16b49e0bbbffc9961ff3788c31d57c98bcbf03"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]
[[package]]
@ -3002,9 +3009,9 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "renderdoc-sys"
version = "0.7.1"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157"
checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b"
[[package]]
name = "resvg"
@ -3084,7 +3091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff"
dependencies = [
"base64",
"bitflags",
"bitflags 1.3.2",
"serde",
]
@ -3115,7 +3122,7 @@ version = "0.36.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"errno 0.2.8",
"io-lifetimes",
"libc",
@ -3129,7 +3136,7 @@ version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b24138615de35e32031d041a09032ef3487a616d901ca4db224e7d557efae2"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"errno 0.3.1",
"io-lifetimes",
"libc",
@ -3344,7 +3351,7 @@ version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"calloop",
"dlib",
"lazy_static",
@ -3409,7 +3416,7 @@ version = "0.2.0+1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"num-traits",
]
@ -3487,7 +3494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
dependencies = [
"bincode",
"bitflags",
"bitflags 1.3.2",
"fancy-regex",
"flate2",
"fnv",
@ -3994,7 +4001,7 @@ version = "0.29.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"downcast-rs",
"libc",
"nix 0.24.3",
@ -4033,7 +4040,7 @@ version = "0.29.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"wayland-client",
"wayland-commons",
"wayland-scanner",
@ -4130,9 +4137,9 @@ dependencies = [
[[package]]
name = "wgpu"
version = "0.15.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d14c6bfcf3b10f4273f522a95994553c0a5f2934976e62e61a720ae4bc2eb8f2"
checksum = "13edd72c7b08615b7179dd7e778ee3f0bdc870ef2de9019844ff2cceeee80b11"
dependencies = [
"arrayvec",
"cfg-if",
@ -4154,20 +4161,20 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "0.15.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be1f61be28e557a6ecb2506cac06c63fae3b6d302a006f38195a7a80995abeb9"
checksum = "625bea30a0ba50d88025f95c80211d1a85c86901423647fb74f397f614abbd9a"
dependencies = [
"arrayvec",
"bit-vec",
"bitflags",
"bitflags 2.1.0",
"codespan-reporting",
"fxhash",
"log",
"naga",
"parking_lot",
"profiling",
"raw-window-handle",
"rustc-hash",
"smallvec",
"thiserror",
"web-sys",
@ -4177,20 +4184,19 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "0.15.1"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e95792925fe3d58950b9a5c2a191caa145e2bc570e2d233f0d7320f6a8e814"
checksum = "41af2ea7d87bd41ad0a37146252d5f7c26490209f47f544b2ee3b3ff34c7732e"
dependencies = [
"android_system_properties",
"arrayvec",
"ash",
"bit-set",
"bitflags",
"bitflags 2.1.0",
"block",
"core-graphics-types",
"d3d12",
"foreign-types",
"fxhash",
"glow",
"gpu-alloc",
"gpu-allocator",
@ -4199,7 +4205,7 @@ dependencies = [
"js-sys",
"khronos-egl",
"libc",
"libloading",
"libloading 0.8.0",
"log",
"metal",
"naga",
@ -4209,6 +4215,7 @@ dependencies = [
"range-alloc",
"raw-window-handle",
"renderdoc-sys",
"rustc-hash",
"smallvec",
"thiserror",
"wasm-bindgen",
@ -4219,11 +4226,11 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "0.15.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecf8cfcbf98f94cc8bd5981544c687140cf9d3948e2ab83849367ead2cd737cf"
checksum = "5bd33a976130f03dcdcd39b3810c0c3fc05daf86f0aaf867db14bfb7c4a9a32b"
dependencies = [
"bitflags",
"bitflags 2.1.0",
"js-sys",
"web-sys",
]
@ -4241,9 +4248,9 @@ dependencies = [
[[package]]
name = "widestring"
version = "0.5.1"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983"
checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
[[package]]
name = "winapi"
@ -4487,7 +4494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4755d4ba0e3d30fc7beef2095e246b1e6a6fad0717608bcb87a2df4b003bcf"
dependencies = [
"android-activity",
"bitflags",
"bitflags 1.3.2",
"cfg_aliases",
"core-foundation",
"core-graphics",

4
crates/eframe/Cargo.toml

@ -116,7 +116,7 @@ pollster = { version = "0.3", optional = true } # needed for wgpu
glutin = { version = "0.30", optional = true }
glutin-winit = { version = "0.3.0", optional = true }
puffin = { version = "0.14", optional = true }
wgpu = { version = "0.15.0", optional = true }
wgpu = { version = "0.16.0", optional = true }
# mac:
[target.'cfg(any(target_os = "macos"))'.dependencies]
@ -182,4 +182,4 @@ web-sys = { version = "0.3.58", features = [
# optional web:
egui-wgpu = { version = "0.21.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
tts = { version = "0.25", optional = true, default-features = false }
wgpu = { version = "0.15.0", optional = true, features = ["webgl"] }
wgpu = { version = "0.16.0", optional = true, features = ["webgl"] }

2
crates/eframe/src/web/web_painter_wgpu.rs

@ -66,7 +66,7 @@ impl WebPainterWgpu {
dx12_shader_compiler: Default::default(),
});
let surface = instance
.create_surface_from_canvas(&canvas)
.create_surface_from_canvas(canvas.clone())
.map_err(|err| format!("failed to create wgpu surface: {err}"))?;
let adapter = instance

2
crates/egui-wgpu/Cargo.toml

@ -43,7 +43,7 @@ epaint = { version = "0.21.0", path = "../epaint", default-features = false, fea
bytemuck = "1.7"
log = { version = "0.4", features = ["std"] }
type-map = "0.5.0"
wgpu = "0.15.0"
wgpu = "0.16.0"
#! ### Optional dependencies
## Enable this when generating docs.

8
crates/egui-wgpu/src/renderer.rs

@ -2,7 +2,7 @@
use std::num::NonZeroU64;
use std::ops::Range;
use std::{borrow::Cow, collections::HashMap, num::NonZeroU32};
use std::{borrow::Cow, collections::HashMap};
use type_map::concurrent::TypeMap;
use wgpu;
@ -295,7 +295,7 @@ impl Renderer {
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: if output_color_format.describe().srgb {
entry_point: if output_color_format.is_srgb() {
log::warn!("Detected a linear (sRGBA aware) framebuffer {:?}. egui prefers Rgba8Unorm or Bgra8Unorm", output_color_format);
"fs_main_linear_framebuffer"
} else {
@ -535,8 +535,8 @@ impl Renderer {
data_bytes,
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: NonZeroU32::new(4 * width),
rows_per_image: NonZeroU32::new(height),
bytes_per_row: Some(4 * width),
rows_per_image: Some(height),
},
size,
);

2
crates/egui-wgpu/src/winit.rs

@ -407,7 +407,7 @@ impl Painter {
buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(std::num::NonZeroU32::new(padding.padded_bytes_per_row)?),
bytes_per_row: Some(padding.padded_bytes_per_row),
rows_per_image: None,
},
},

1
deny.toml

@ -37,6 +37,7 @@ deny = [
skip = [
{ name = "arrayvec" }, # old version via tiny-skiaz
{ name = "libloading" }, # wgpu-hal itself depends on 0.8 while some of its dependencies, like ash and d3d12, depend on 0.7
{ name = "nix" }, # old version via winit
{ name = "redox_syscall" }, # old version via winit
{ name = "time" }, # old version pulled in by unmaintianed crate 'chrono'

Loading…
Cancel
Save