render/wgpu: Update wgpu to 0.18.0, naga to 0.14.1, naga_oil to 0.11.0, egui to 0.24.1

This commit is contained in:
TÖRÖK Attila 2023-11-28 10:24:55 +01:00
parent 4e689c6c17
commit bf9cf92af8
20 changed files with 182 additions and 126 deletions

193
Cargo.lock generated
View File

@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
[[package]] [[package]]
name = "accesskit" name = "accesskit"
version = "0.11.2" version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2"
dependencies = [ dependencies = [
"enumn", "enumn",
"serde", "serde",
@ -1343,9 +1343,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]] [[package]]
name = "ecolor" name = "ecolor"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af" checksum = "4b7637fc2e74d17e52931bac90ff4fc061ac776ada9c7fa272f24cdca5991972"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"serde", "serde",
@ -1353,9 +1353,9 @@ dependencies = [
[[package]] [[package]]
name = "egui" name = "egui"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7" checksum = "c55bcb864b764eb889515a38b8924757657a250738ad15126637ee2df291ee6b"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"ahash", "ahash",
@ -1367,11 +1367,12 @@ dependencies = [
[[package]] [[package]]
name = "egui-wgpu" name = "egui-wgpu"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62d4c9ab93d9528c184ef1d695c8c99b2e6d50833696ec3f513063efeee0fe77" checksum = "2d8ea73b329649be625fac2c9b190a2a8f9a66f98610c4b09124b596c6695053"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"egui",
"epaint", "epaint",
"log", "log",
"thiserror", "thiserror",
@ -1382,9 +1383,9 @@ dependencies = [
[[package]] [[package]]
name = "egui-winit" name = "egui-winit"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c15479a96d9fadccf5dac690bdc6373b97b8e1c0dd28367058f25a5298da0195" checksum = "3b673606b6606b12b95e3a3194d7882bf5cff302db36a520b8144c7c342e4e84"
dependencies = [ dependencies = [
"arboard", "arboard",
"egui", "egui",
@ -1398,15 +1399,15 @@ dependencies = [
[[package]] [[package]]
name = "egui_extras" name = "egui_extras"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68ffe3fe5c00295f91c2a61a74ee271c32f74049c94ba0b1cea8f26eb478bc07" checksum = "4b880044250106e673610c9a15d62692ef8af396593058f334be6f2a4d9544a5"
dependencies = [ dependencies = [
"egui", "egui",
"enum-map", "enum-map",
"image", "image",
"log", "log",
"mime_guess", "mime_guess2",
"serde", "serde",
] ]
@ -1418,9 +1419,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0" checksum = "a045c6c0b44b35e98513fc1e9d183ab42881ac27caccb9fa345465601f56cce4"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"serde", "serde",
@ -1522,9 +1523,9 @@ dependencies = [
[[package]] [[package]]
name = "epaint" name = "epaint"
version = "0.23.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e" checksum = "7d1b9e000d21bab9b535ce78f9f7745be28b3f777f6c7223936561c5c7fefab8"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"ahash", "ahash",
@ -1795,6 +1796,9 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [ dependencies = [
"futures-core",
"futures-sink",
"nanorand",
"spin", "spin",
] ]
@ -2138,6 +2142,17 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "gl_generator"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
dependencies = [
"khronos_api",
"log",
"xml-rs",
]
[[package]] [[package]]
name = "glib-sys" name = "glib-sys"
version = "0.18.1" version = "0.18.1"
@ -2199,9 +2214,9 @@ dependencies = [
[[package]] [[package]]
name = "glow" name = "glow"
version = "0.12.3" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"slotmap", "slotmap",
@ -2209,6 +2224,15 @@ dependencies = [
"web-sys", "web-sys",
] ]
[[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.18.0" version = "0.18.0"
@ -2241,15 +2265,16 @@ dependencies = [
[[package]] [[package]]
name = "gpu-allocator" name = "gpu-allocator"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"log", "log",
"presser",
"thiserror", "thiserror",
"winapi", "winapi",
"windows 0.44.0", "windows 0.51.1",
] ]
[[package]] [[package]]
@ -2328,12 +2353,6 @@ dependencies = [
"crunchy", "crunchy",
] ]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]] [[package]]
name = "hashbrown" name = "hashbrown"
version = "0.13.2" version = "0.13.2"
@ -2492,17 +2511,6 @@ dependencies = [
"tiff", "tiff",
] ]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown 0.12.3",
"serde",
]
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "2.1.0" version = "2.1.0"
@ -2511,6 +2519,7 @@ checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
dependencies = [ dependencies = [
"equivalent", "equivalent",
"hashbrown 0.14.3", "hashbrown 0.14.3",
"serde",
] ]
[[package]] [[package]]
@ -2714,15 +2723,21 @@ dependencies = [
[[package]] [[package]]
name = "khronos-egl" name = "khronos-egl"
version = "4.1.0" version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
dependencies = [ dependencies = [
"libc", "libc",
"libloading 0.7.4", "libloading 0.8.1",
"pkg-config", "pkg-config",
] ]
[[package]]
name = "khronos_api"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
@ -3064,9 +3079,9 @@ dependencies = [
[[package]] [[package]]
name = "metal" name = "metal"
version = "0.26.0" version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"block", "block",
@ -3084,10 +3099,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]] [[package]]
name = "mime_guess" name = "mime_guess2"
version = "2.0.4" version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" checksum = "25a3333bb1609500601edc766a39b4c1772874a4ce26022f4d866854dc020c41"
dependencies = [ dependencies = [
"mime", "mime",
"unicase", "unicase",
@ -3134,15 +3149,14 @@ dependencies = [
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.13.0" version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/gfx-rs/wgpu?branch=v0.18#e16f7b4083dd6b89597fa2d4c3272331193b3515"
checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e"
dependencies = [ dependencies = [
"bit-set", "bit-set",
"bitflags 2.4.1", "bitflags 2.4.1",
"codespan-reporting", "codespan-reporting",
"hexf-parse", "hexf-parse",
"indexmap 1.9.3", "indexmap",
"log", "log",
"num-traits", "num-traits",
"pp-rs", "pp-rs",
@ -3179,24 +3193,33 @@ dependencies = [
[[package]] [[package]]
name = "naga_oil" name = "naga_oil"
version = "0.9.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a5e64da99d79501b244fb645154cd17d0f726b572cb7b029942fb8aa0c48823" checksum = "fff3f369dd665ee365daeab786466a6f70ff53e4a95a76117363b1077e1b0492"
dependencies = [ dependencies = [
"bit-set", "bit-set",
"codespan-reporting", "codespan-reporting",
"data-encoding", "data-encoding",
"indexmap 1.9.3", "indexmap",
"naga", "naga",
"once_cell", "once_cell",
"regex", "regex",
"regex-syntax 0.6.29", "regex-syntax 0.7.5",
"rustc-hash", "rustc-hash",
"thiserror", "thiserror",
"tracing", "tracing",
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "nanorand"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
dependencies = [
"getrandom",
]
[[package]] [[package]]
name = "ndk" name = "ndk"
version = "0.7.0" version = "0.7.0"
@ -3852,6 +3875,12 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "presser"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
[[package]] [[package]]
name = "pretty_assertions" name = "pretty_assertions"
version = "1.4.0" version = "1.4.0"
@ -4124,6 +4153,12 @@ version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.8.2" version = "0.8.2"
@ -4238,7 +4273,7 @@ dependencies = [
"generational-arena", "generational-arena",
"hashbrown 0.14.3", "hashbrown 0.14.3",
"image", "image",
"indexmap 2.1.0", "indexmap",
"jpegxr", "jpegxr",
"linkme", "linkme",
"lzma-rs", "lzma-rs",
@ -4412,7 +4447,7 @@ dependencies = [
"fnv", "fnv",
"futures", "futures",
"image", "image",
"indexmap 2.1.0", "indexmap",
"lru", "lru",
"naga", "naga",
"naga-agal", "naga-agal",
@ -4757,7 +4792,7 @@ version = "1.0.108"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap",
"itoa", "itoa",
"ryu", "ryu",
"serde", "serde",
@ -5296,7 +5331,7 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap",
"toml_datetime", "toml_datetime",
"winnow", "winnow",
] ]
@ -5307,7 +5342,7 @@ version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap",
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
@ -5948,11 +5983,12 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "0.17.2" version = "0.18.0"
source = "git+https://github.com/gfx-rs/wgpu?branch=v0.17#fb4f9c53f7110766de381273168644a1eaec9323" source = "git+https://github.com/gfx-rs/wgpu?branch=v0.18#e16f7b4083dd6b89597fa2d4c3272331193b3515"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"cfg-if", "cfg-if",
"flume 0.11.0",
"js-sys", "js-sys",
"log", "log",
"naga", "naga",
@ -5972,8 +6008,8 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "0.17.1" version = "0.18.1"
source = "git+https://github.com/gfx-rs/wgpu?branch=v0.17#fb4f9c53f7110766de381273168644a1eaec9323" source = "git+https://github.com/gfx-rs/wgpu?branch=v0.18#e16f7b4083dd6b89597fa2d4c3272331193b3515"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bit-vec", "bit-vec",
@ -5996,8 +6032,8 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-hal" name = "wgpu-hal"
version = "0.17.2" version = "0.18.1"
source = "git+https://github.com/gfx-rs/wgpu?branch=v0.17#fb4f9c53f7110766de381273168644a1eaec9323" source = "git+https://github.com/gfx-rs/wgpu?branch=v0.18#e16f7b4083dd6b89597fa2d4c3272331193b3515"
dependencies = [ dependencies = [
"android_system_properties", "android_system_properties",
"arrayvec", "arrayvec",
@ -6008,6 +6044,7 @@ dependencies = [
"core-graphics-types", "core-graphics-types",
"d3d12", "d3d12",
"glow", "glow",
"glutin_wgl_sys",
"gpu-alloc", "gpu-alloc",
"gpu-allocator", "gpu-allocator",
"gpu-descriptor", "gpu-descriptor",
@ -6020,6 +6057,7 @@ dependencies = [
"metal", "metal",
"naga", "naga",
"objc", "objc",
"once_cell",
"parking_lot", "parking_lot",
"profiling", "profiling",
"range-alloc", "range-alloc",
@ -6036,8 +6074,8 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "0.17.0" version = "0.18.0"
source = "git+https://github.com/gfx-rs/wgpu?branch=v0.17#fb4f9c53f7110766de381273168644a1eaec9323" source = "git+https://github.com/gfx-rs/wgpu?branch=v0.18#e16f7b4083dd6b89597fa2d4c3272331193b3515"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"js-sys", "js-sys",
@ -6113,15 +6151,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.44.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b"
dependencies = [
"windows-targets 0.42.2",
]
[[package]] [[package]]
name = "windows" name = "windows"
version = "0.46.0" version = "0.46.0"
@ -6140,6 +6169,16 @@ dependencies = [
"windows-targets 0.48.5", "windows-targets 0.48.5",
] ]
[[package]]
name = "windows"
version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9"
dependencies = [
"windows-core",
"windows-targets 0.48.5",
]
[[package]] [[package]]
name = "windows-core" name = "windows-core"
version = "0.51.1" version = "0.51.1"

View File

@ -44,10 +44,10 @@ version = "0.1.0"
# gc-arena = { git = "https://github.com/kyren/gc-arena", rev = "efd89fc683c6bb456af3e226c33763cb822645e9" } # gc-arena = { git = "https://github.com/kyren/gc-arena", rev = "efd89fc683c6bb456af3e226c33763cb822645e9" }
tracing = "0.1.40" tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
naga = { version = "0.13.0", features = ["validate", "wgsl-out"] } naga = { version = "0.14.1", features = ["validate", "wgsl-out"] }
naga_oil = "0.9.0" naga_oil = "0.11.0"
wgpu = "0.17.1" wgpu = "0.18.0"
egui = "0.23.0" egui = "0.24.1"
# Don't optimize build scripts and macros. # Don't optimize build scripts and macros.
[profile.release.build-override] [profile.release.build-override]
@ -84,10 +84,8 @@ inherits = "release"
[profile.web-wasm-extensions] [profile.web-wasm-extensions]
inherits = "release" inherits = "release"
# The `v0.17` branch is a single backport commit ahead of the `v0.17.2` release,
# which we need. FIXME: Remove when wgpu `v0.18` is released and we can switch to it.
[patch.crates-io] [patch.crates-io]
wgpu = { git = "https://github.com/gfx-rs/wgpu", branch = "v0.17" } # These are needed because https://github.com/gfx-rs/wgpu/pull/4778
# is not yet in the latest wgpu release. TODO: Remove when it is.
[patch.'https://github.com/gfx-rs/naga'] wgpu = { git = "https://github.com/gfx-rs/wgpu", branch = "v0.18" }
naga = "0.13.0" naga = { git = "https://github.com/gfx-rs/wgpu", branch = "v0.18" }

View File

@ -52,7 +52,7 @@ hashbrown = { version = "0.14.3", features = ["raw"] }
scopeguard = "1.2.0" scopeguard = "1.2.0"
fluent-templates = "0.8.0" fluent-templates = "0.8.0"
egui = { workspace = true, optional = true } egui = { workspace = true, optional = true }
egui_extras = { version = "0.23.0", optional = true } egui_extras = { version = "0.24.1", optional = true }
png = { version = "0.17.10", optional = true } png = { version = "0.17.10", optional = true }
flv-rs = { path = "../flv" } flv-rs = { path = "../flv" }
async-channel = "2.1.1" async-channel = "2.1.1"

View File

@ -11,10 +11,10 @@ version.workspace = true
clap = { version = "4.4.11", features = ["derive"] } clap = { version = "4.4.11", features = ["derive"] }
cpal = "0.15.2" cpal = "0.15.2"
egui = { workspace = true } egui = { workspace = true }
egui_extras = { version = "0.23.0", features = ["image"] } egui_extras = { version = "0.24.1", features = ["image"] }
egui-wgpu = { version = "0.23.0", features = ["winit"] } egui-wgpu = { version = "0.24.1", features = ["winit"] }
image = { version = "0.24", features = ["png"] } image = { version = "0.24", features = ["png"] }
egui-winit = "0.23.0" egui-winit = "0.24.1"
fontdb = "0.16" fontdb = "0.16"
ruffle_core = { path = "../core", features = ["audio", "clap", "mp3", "nellymoser", "default_compatibility_rules", "egui", "default_font"] } ruffle_core = { path = "../core", features = ["audio", "clap", "mp3", "nellymoser", "default_compatibility_rules", "egui", "default_font"] }
ruffle_render = { path = "../render", features = ["clap"] } ruffle_render = { path = "../render", features = ["clap"] }

View File

@ -5,7 +5,7 @@ use crate::gui::movie::{MovieView, MovieViewRenderer};
use crate::gui::{RuffleGui, MENU_HEIGHT}; use crate::gui::{RuffleGui, MENU_HEIGHT};
use crate::player::{PlayerController, PlayerOptions}; use crate::player::{PlayerController, PlayerOptions};
use anyhow::anyhow; use anyhow::anyhow;
use egui::Context; use egui::{Context, ViewportId};
use fontdb::{Database, Family, Query, Source}; use fontdb::{Database, Family, Query, Source};
use ruffle_core::Player; use ruffle_core::Player;
use ruffle_render_wgpu::backend::{request_adapter_and_device, WgpuRenderBackend}; use ruffle_render_wgpu::backend::{request_adapter_and_device, WgpuRenderBackend};
@ -55,7 +55,7 @@ impl GuiController {
} }
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: backend, backends: backend,
dx12_shader_compiler: wgpu::Dx12Compiler::default(), ..Default::default()
}); });
let surface = unsafe { instance.create_surface(window.as_ref()) }?; let surface = unsafe { instance.create_surface(window.as_ref()) }?;
let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device( let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device(
@ -90,9 +90,9 @@ impl GuiController {
if let Some(Theme::Light) = window.theme() { if let Some(Theme::Light) = window.theme() {
egui_ctx.set_visuals(egui::Visuals::light()); egui_ctx.set_visuals(egui::Visuals::light());
} }
egui_ctx.set_pixels_per_point(window.scale_factor() as f32);
let mut egui_winit = egui_winit::State::new(event_loop); let mut egui_winit = egui_winit::State::new(ViewportId::ROOT, window.as_ref(), None, None);
egui_winit.set_pixels_per_point(window.scale_factor() as f32);
egui_winit.set_max_texture_side(descriptors.limits.max_texture_dimension_2d as usize); egui_winit.set_max_texture_side(descriptors.limits.max_texture_dimension_2d as usize);
let movie_view_renderer = Arc::new(MovieViewRenderer::new( let movie_view_renderer = Arc::new(MovieViewRenderer::new(
@ -165,7 +165,7 @@ impl GuiController {
self.egui_ctx.set_visuals(visuals); self.egui_ctx.set_visuals(visuals);
} }
let response = self.egui_winit.on_event(&self.egui_ctx, event); let response = self.egui_winit.on_window_event(&self.egui_ctx, event);
if response.repaint { if response.repaint {
self.window.request_redraw(); self.window.request_redraw();
} }
@ -214,7 +214,11 @@ impl GuiController {
}, },
); );
}); });
self.repaint_after = full_output.repaint_after; self.repaint_after = full_output
.viewport_output
.get(&ViewportId::ROOT)
.expect("Root viewport must exist")
.repaint_delay;
// If we're not in a UI, tell egui which cursor we prefer to use instead // If we're not in a UI, tell egui which cursor we prefer to use instead
if !self.egui_ctx.wants_pointer_input() { if !self.egui_ctx.wants_pointer_input() {
@ -232,7 +236,9 @@ impl GuiController {
full_output.platform_output, full_output.platform_output,
); );
let clipped_primitives = self.egui_ctx.tessellate(full_output.shapes); let clipped_primitives = self
.egui_ctx
.tessellate(full_output.shapes, full_output.pixels_per_point);
let scale_factor = self.window.scale_factor() as f32; let scale_factor = self.window.scale_factor() as f32;
let screen_descriptor = egui_wgpu::renderer::ScreenDescriptor { let screen_descriptor = egui_wgpu::renderer::ScreenDescriptor {
@ -283,11 +289,11 @@ impl GuiController {
resolve_target: None, resolve_target: None,
ops: wgpu::Operations { ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK), load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
store: true, store: wgpu::StoreOp::Store,
}, },
})], })],
depth_stencil_attachment: None,
label: Some("egui_render"), label: Some("egui_render"),
..Default::default()
}); });
if let Some(movie_view) = movie_view { if let Some(movie_view) = movie_view {

View File

@ -403,7 +403,7 @@ fn main() -> Result<()> {
let opt: Opt = Opt::parse(); let opt: Opt = Opt::parse();
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: opt.graphics.into(), backends: opt.graphics.into(),
dx12_shader_compiler: wgpu::Dx12Compiler::default(), ..Default::default()
}); });
let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device( let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device(
opt.graphics.into(), opt.graphics.into(),

View File

@ -479,6 +479,7 @@ impl<'a> NagaBuilder<'a> {
location: 0, location: 0,
interpolation: None, interpolation: None,
sampling: None, sampling: None,
second_blend_source: false,
}), }),
offset: 0, offset: 0,
}], }],
@ -501,6 +502,7 @@ impl<'a> NagaBuilder<'a> {
location: 0, location: 0,
interpolation: None, interpolation: None,
sampling: None, sampling: None,
second_blend_source: false,
}), }),
}); });
} }
@ -653,6 +655,7 @@ impl<'a> NagaBuilder<'a> {
location: index as u32, location: index as u32,
interpolation: None, interpolation: None,
sampling: None, sampling: None,
second_blend_source: false,
}), }),
}); });

View File

@ -60,6 +60,7 @@ impl<'a> NagaBuilder<'a> {
location: index as u32, location: index as u32,
interpolation: Some(naga::Interpolation::Perspective), interpolation: Some(naga::Interpolation::Perspective),
sampling: None, sampling: None,
second_blend_source: false,
}), }),
offset: 0, offset: 0,
}); });
@ -85,6 +86,7 @@ impl<'a> NagaBuilder<'a> {
location: index as u32, location: index as u32,
interpolation: Some(Interpolation::Perspective), interpolation: Some(Interpolation::Perspective),
sampling: None, sampling: None,
second_blend_source: false,
}), }),
}); });
let arg_index = self.func.arguments.len() - 1; let arg_index = self.func.arguments.len() - 1;

View File

@ -259,6 +259,7 @@ impl<'a> ShaderBuilder<'a> {
location: 0, location: 0,
interpolation: Some(naga::Interpolation::Perspective), interpolation: Some(naga::Interpolation::Perspective),
sampling: Some(naga::Sampling::Center), sampling: Some(naga::Sampling::Center),
second_blend_source: false,
}), }),
}); });
@ -268,6 +269,7 @@ impl<'a> ShaderBuilder<'a> {
location: 0, location: 0,
interpolation: None, interpolation: None,
sampling: None, sampling: None,
second_blend_source: false,
}), }),
}); });

View File

@ -62,7 +62,7 @@ impl WgpuRenderBackend<SwapChainTarget> {
pub async fn for_canvas(canvas: web_sys::HtmlCanvasElement) -> Result<Self, Error> { pub async fn for_canvas(canvas: web_sys::HtmlCanvasElement) -> Result<Self, Error> {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::BROWSER_WEBGPU | wgpu::Backends::GL, backends: wgpu::Backends::BROWSER_WEBGPU | wgpu::Backends::GL,
dx12_shader_compiler: wgpu::Dx12Compiler::default(), ..Default::default()
}); });
let surface = instance.create_surface_from_canvas(canvas)?; let surface = instance.create_surface_from_canvas(canvas)?;
let (adapter, device, queue) = request_adapter_and_device( let (adapter, device, queue) = request_adapter_and_device(
@ -97,7 +97,7 @@ impl WgpuRenderBackend<SwapChainTarget> {
} }
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: backend, backends: backend,
dx12_shader_compiler: wgpu::Dx12Compiler::default(), ..Default::default()
}); });
let surface = unsafe { instance.create_surface(window) }?; let surface = unsafe { instance.create_surface(window) }?;
let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device( let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device(
@ -144,7 +144,7 @@ impl WgpuRenderBackend<crate::target::TextureTarget> {
} }
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: backend, backends: backend,
dx12_shader_compiler: wgpu::Dx12Compiler::default(), ..Default::default()
}); });
let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device( let (adapter, device, queue) = futures::executor::block_on(request_adapter_and_device(
backend, backend,
@ -981,7 +981,7 @@ impl<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
resolve_target: None, resolve_target: None,
ops: wgpu::Operations { ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT),
store: true, store: wgpu::StoreOp::Store,
}, },
}), }),
1, 1,

View File

@ -265,11 +265,11 @@ impl WgpuContext3D {
view: depth_view, view: depth_view,
depth_ops: Some(wgpu::Operations { depth_ops: Some(wgpu::Operations {
load: depth_load, load: depth_load,
store: true, store: wgpu::StoreOp::Store,
}), }),
stencil_ops: Some(wgpu::Operations { stencil_ops: Some(wgpu::Operations {
load: stencil_load, load: stencil_load,
store: true, store: wgpu::StoreOp::Store,
}), }),
}) })
} else { } else {
@ -283,10 +283,11 @@ impl WgpuContext3D {
resolve_target: self.current_texture_resolve_view.as_deref(), resolve_target: self.current_texture_resolve_view.as_deref(),
ops: wgpu::Operations { ops: wgpu::Operations {
load: color_load, load: color_load,
store: true, store: wgpu::StoreOp::Store,
}, },
})], })],
depth_stencil_attachment, depth_stencil_attachment,
..Default::default()
}); });
pass.set_bind_group(0, self.bind_group.as_ref().unwrap(), &[]); pass.set_bind_group(0, self.bind_group.as_ref().unwrap(), &[]);
pass.set_pipeline( pass.set_pipeline(

View File

@ -237,7 +237,7 @@ impl BevelFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Bevel filter").as_deref(), label: create_debug_label!("Bevel filter").as_deref(),
color_attachments: &[target.color_attachments()], color_attachments: &[target.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -317,7 +317,7 @@ impl BlurFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Blur filter").as_deref(), label: create_debug_label!("Blur filter").as_deref(),
color_attachments: &[destination.color_attachments()], color_attachments: &[destination.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);
@ -381,7 +381,7 @@ impl BlurFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Blur filter").as_deref(), label: create_debug_label!("Blur filter").as_deref(),
color_attachments: &[destination.color_attachments()], color_attachments: &[destination.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -160,7 +160,7 @@ impl ColorMatrixFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Color matrix filter").as_deref(), label: create_debug_label!("Color matrix filter").as_deref(),
color_attachments: &[target.color_attachments()], color_attachments: &[target.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -235,7 +235,7 @@ impl DisplacementMapFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Displacement map filter").as_deref(), label: create_debug_label!("Displacement map filter").as_deref(),
color_attachments: &[target.color_attachments()], color_attachments: &[target.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -214,7 +214,7 @@ impl GlowFilter {
let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = draw_encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Glow filter").as_deref(), label: create_debug_label!("Glow filter").as_deref(),
color_attachments: &[target.color_attachments()], color_attachments: &[target.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -16,7 +16,7 @@ use ruffle_render::{
use wgpu::util::StagingBelt; use wgpu::util::StagingBelt;
use wgpu::{ use wgpu::{
BindGroupEntry, BindingResource, BlendComponent, BufferDescriptor, BufferUsages, BindGroupEntry, BindingResource, BlendComponent, BufferDescriptor, BufferUsages,
ColorTargetState, ColorWrites, CommandEncoder, FrontFace, ImageCopyTexture, PipelineLayout, ColorTargetState, ColorWrites, CommandEncoder, ImageCopyTexture, PipelineLayout,
RenderPipeline, RenderPipelineDescriptor, SamplerBindingType, ShaderModuleDescriptor, RenderPipeline, RenderPipelineDescriptor, SamplerBindingType, ShaderModuleDescriptor,
TextureDescriptor, TextureFormat, TextureView, VertexState, TextureDescriptor, TextureFormat, TextureView, VertexState,
}; };
@ -71,11 +71,7 @@ impl PixelBenderWgpuShader {
write_mask: ColorWrites::all(), write_mask: ColorWrites::all(),
})], })],
}), }),
primitive: wgpu::PrimitiveState { primitive: Default::default(),
front_face: FrontFace::Ccw,
cull_mode: None,
..Default::default()
},
depth_stencil: None, depth_stencil: None,
multisample: wgpu::MultisampleState { multisample: wgpu::MultisampleState {
count: samples, count: samples,
@ -558,6 +554,7 @@ pub(super) fn run_pixelbender_shader_impl(
label: Some("PixelBender render pass"), label: Some("PixelBender render pass"),
color_attachments: &[color_attachment], color_attachments: &[color_attachment],
depth_stencil_attachment: None, depth_stencil_attachment: None,
..Default::default()
}); });
render_pass.set_bind_group(0, &bind_group, &[]); render_pass.set_bind_group(0, &bind_group, &[]);
render_pass.set_pipeline(pipeline); render_pass.set_pipeline(pipeline);

View File

@ -169,6 +169,7 @@ impl Surface {
} else { } else {
None None
}, },
..Default::default()
}); });
render_pass.set_bind_group(0, target.globals().bind_group(), &[]); render_pass.set_bind_group(0, target.globals().bind_group(), &[]);
let mut renderer = CommandRenderer::new( let mut renderer = CommandRenderer::new(
@ -298,6 +299,7 @@ impl Surface {
} else { } else {
None None
}, },
..Default::default()
}); });
render_pass.set_bind_group(0, target.globals().bind_group(), &[]); render_pass.set_bind_group(0, target.globals().bind_group(), &[]);

View File

@ -338,7 +338,7 @@ impl CommandTarget {
encoder.begin_render_pass(&wgpu::RenderPassDescriptor { encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Clearing command target").as_deref(), label: create_debug_label!("Clearing command target").as_deref(),
color_attachments: &[self.color_attachments()], color_attachments: &[self.color_attachments()],
depth_stencil_attachment: None, ..Default::default()
}); });
} }
} }
@ -367,7 +367,10 @@ impl CommandTarget {
Some(wgpu::RenderPassColorAttachment { Some(wgpu::RenderPassColorAttachment {
view: self.frame_buffer.view(), view: self.frame_buffer.view(),
resolve_target: self.resolve_buffer.as_ref().map(|b| b.view()), resolve_target: self.resolve_buffer.as_ref().map(|b| b.view()),
ops: wgpu::Operations { load, store: true }, ops: wgpu::Operations {
load,
store: wgpu::StoreOp::Store,
},
}) })
} }
@ -393,7 +396,7 @@ impl CommandTarget {
} else { } else {
wgpu::LoadOp::Load wgpu::LoadOp::Load
}, },
store: true, store: wgpu::StoreOp::Store,
}), }),
}) })
} }

View File

@ -248,13 +248,16 @@ pub fn run_copy_pipeline(
let load = wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT); let load = wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT);
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: create_debug_label!("Copy back to render target").as_deref(),
color_attachments: &[Some(wgpu::RenderPassColorAttachment { color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: frame_view, view: frame_view,
ops: wgpu::Operations { load, store: true }, ops: wgpu::Operations {
load,
store: wgpu::StoreOp::Store,
},
resolve_target: None, resolve_target: None,
})], })],
depth_stencil_attachment: None, ..Default::default()
label: create_debug_label!("Copy back to render target").as_deref(),
}); });
render_pass.set_pipeline(&pipeline); render_pass.set_pipeline(&pipeline);