diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 2af41777..7d502216 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -4,6 +4,5 @@
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f0849112..33ea7acb 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -12,7 +12,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -71,14 +82,15 @@
"cf.first.check.clang-format": "false",
"cidr.known.project.marker": "true",
"git-widget-placeholder": "feat-wgpu-runtime",
- "last_opened_file_path": "F:/coding/librashader",
+ "ignore.virus.scanning.warn.message": "true",
+ "last_opened_file_path": "D:/Runtime/Rust/rustup",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"org.rust.cargo.project.model.PROJECT_DISCOVERY": "true",
- "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
+ "settings.editor.selected.configurable": "language.rust",
"vue.rearranger.settings.migration": "true"
}
}]]>
@@ -88,10 +100,11 @@
-
+
+
@@ -99,7 +112,6 @@
-
@@ -109,6 +121,7 @@
+
@@ -116,7 +129,6 @@
-
@@ -126,6 +138,7 @@
+
@@ -133,7 +146,6 @@
-
@@ -143,6 +155,7 @@
+
@@ -150,16 +163,16 @@
-
-
-
+
+
+
@@ -167,16 +180,16 @@
-
-
-
+
+
+
@@ -184,16 +197,16 @@
-
-
-
+
+
+
@@ -201,7 +214,6 @@
-
@@ -210,25 +222,25 @@
-
+
+
-
+
-
-
+
@@ -260,6 +272,8 @@
+
+
diff --git a/Cargo.lock b/Cargo.lock
index b030b0ac..695f9c08 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -51,6 +51,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
dependencies = [
"cfg-if",
+ "getrandom",
"once_cell",
"version_check",
"zerocopy",
@@ -73,20 +74,23 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
[[package]]
name = "android-activity"
-version = "0.4.3"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0"
+checksum = "39b801912a977c3fd52d80511fe1c0c8480c6f957f21ae2ce1b92ffe970cf4b9"
dependencies = [
"android-properties",
- "bitflags 1.3.2",
+ "bitflags 2.4.1",
"cc",
+ "cesu8",
+ "jni",
"jni-sys",
"libc",
"log",
- "ndk",
+ "ndk 0.8.0",
"ndk-context",
- "ndk-sys",
- "num_enum 0.6.1",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum 0.7.2",
+ "thiserror",
]
[[package]]
@@ -182,6 +186,12 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+[[package]]
+name = "as-raw-xcb-connection"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
+
[[package]]
name = "ash"
version = "0.37.3+1.3.251"
@@ -213,6 +223,12 @@ dependencies = [
"syn 2.0.48",
]
+[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
[[package]]
name = "atty"
version = "0.2.14"
@@ -351,21 +367,21 @@ dependencies = [
[[package]]
name = "block-sys"
-version = "0.1.0-beta.1"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146"
+checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7"
dependencies = [
"objc-sys",
]
[[package]]
name = "block2"
-version = "0.2.0-alpha.6"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42"
+checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68"
dependencies = [
"block-sys",
- "objc2-encode",
+ "objc2",
]
[[package]]
@@ -412,6 +428,12 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+[[package]]
+name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
[[package]]
name = "calloop"
version = "0.10.6"
@@ -426,6 +448,32 @@ dependencies = [
"vec_map",
]
+[[package]]
+name = "calloop"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298"
+dependencies = [
+ "bitflags 2.4.1",
+ "log",
+ "polling",
+ "rustix",
+ "slab",
+ "thiserror",
+]
+
+[[package]]
+name = "calloop-wayland-source"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02"
+dependencies = [
+ "calloop 0.12.4",
+ "rustix",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+]
+
[[package]]
name = "cbindgen"
version = "0.26.0"
@@ -455,6 +503,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
[[package]]
name = "cfg-if"
version = "1.0.0"
@@ -609,10 +663,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
-name = "com-rs"
-version = "0.2.1"
+name = "com"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642"
+checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6"
+dependencies = [
+ "com_macros",
+]
+
+[[package]]
+name = "com_macros"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5"
+dependencies = [
+ "com_macros_support",
+ "proc-macro2",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "com_macros_support"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "combine"
+version = "4.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "concurrent-queue"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
+dependencies = [
+ "crossbeam-utils",
+]
[[package]]
name = "config"
@@ -792,11 +890,17 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
+[[package]]
+name = "cursor-icon"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
+
[[package]]
name = "d3d12"
-version = "0.7.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20"
+checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307"
dependencies = [
"bitflags 2.4.1",
"libloading 0.8.1",
@@ -1029,9 +1133,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
- "futures-core",
- "futures-sink",
- "nanorand",
"spin",
]
@@ -1111,27 +1212,6 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
-[[package]]
-name = "futures-core"
-version = "0.3.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
-
-[[package]]
-name = "futures-sink"
-version = "0.3.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
-
-[[package]]
-name = "fxhash"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
-dependencies = [
- "byteorder",
-]
-
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -1142,6 +1222,16 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "gethostname"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
+dependencies = [
+ "libc",
+ "windows-targets 0.48.5",
+]
+
[[package]]
name = "getrandom"
version = "0.2.12"
@@ -1149,10 +1239,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [
"cfg-if",
- "js-sys",
"libc",
"wasi",
- "wasm-bindgen",
]
[[package]]
@@ -1243,9 +1331,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "glow"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4"
+checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1"
dependencies = [
"js-sys",
"slotmap",
@@ -1295,11 +1383,10 @@ dependencies = [
[[package]]
name = "gpu-allocator"
-version = "0.23.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad"
+checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
dependencies = [
- "backtrace",
"log",
"presser",
"thiserror",
@@ -1366,14 +1453,14 @@ dependencies = [
[[package]]
name = "hassle-rs"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0"
+checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890"
dependencies = [
- "bitflags 1.3.2",
- "com-rs",
+ "bitflags 2.4.1",
+ "com",
"libc",
- "libloading 0.7.4",
+ "libloading 0.8.1",
"thiserror",
"widestring",
"winapi",
@@ -1412,6 +1499,17 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+[[package]]
+name = "icrate"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319"
+dependencies = [
+ "block2",
+ "dispatch",
+ "objc2",
+]
+
[[package]]
name = "ident_case"
version = "1.0.1"
@@ -1485,6 +1583,22 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
+[[package]]
+name = "jni"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
+dependencies = [
+ "cesu8",
+ "cfg-if",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror",
+ "walkdir",
+ "windows-sys 0.45.0",
+]
+
[[package]]
name = "jni-sys"
version = "0.3.0"
@@ -1839,14 +1953,15 @@ dependencies = [
"librashader-runtime",
"librashader-spirv-cross",
"log",
+ "once_cell",
"parking_lot",
"pollster",
- "raw-window-handle 0.5.2",
+ "raw-window-handle 0.6.0",
"rayon",
"rustc-hash",
"thiserror",
"wgpu",
- "winit 0.28.7",
+ "winit 0.29.10",
]
[[package]]
@@ -1951,6 +2066,15 @@ dependencies = [
"libc",
]
+[[package]]
+name = "memmap2"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "memoffset"
version = "0.6.5"
@@ -1960,6 +2084,15 @@ dependencies = [
"autocfg",
]
+[[package]]
+name = "memoffset"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "metal"
version = "0.27.0"
@@ -2005,9 +2138,9 @@ dependencies = [
[[package]]
name = "naga"
-version = "0.14.2"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e"
+checksum = "8878eb410fc90853da3908aebfe61d73d26d4437ef850b70050461f939509899"
dependencies = [
"bit-set",
"bitflags 2.4.1",
@@ -2025,25 +2158,31 @@ dependencies = [
]
[[package]]
-name = "nanorand"
+name = "ndk"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0"
dependencies = [
- "getrandom",
+ "bitflags 1.3.2",
+ "jni-sys",
+ "ndk-sys 0.4.1+23.1.7779620",
+ "num_enum 0.5.11",
+ "raw-window-handle 0.5.2",
+ "thiserror",
]
[[package]]
name = "ndk"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0"
+checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.1",
"jni-sys",
- "ndk-sys",
- "num_enum 0.5.11",
- "raw-window-handle 0.5.2",
+ "log",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum 0.7.2",
+ "raw-window-handle 0.6.0",
"thiserror",
]
@@ -2061,10 +2200,10 @@ checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f"
dependencies = [
"libc",
"log",
- "ndk",
+ "ndk 0.7.0",
"ndk-context",
"ndk-macro",
- "ndk-sys",
+ "ndk-sys 0.4.1+23.1.7779620",
"once_cell",
"parking_lot",
]
@@ -2091,6 +2230,15 @@ dependencies = [
"jni-sys",
]
+[[package]]
+name = "ndk-sys"
+version = "0.5.0+25.2.9519653"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691"
+dependencies = [
+ "jni-sys",
+]
+
[[package]]
name = "nix"
version = "0.24.3"
@@ -2100,7 +2248,7 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
- "memoffset",
+ "memoffset 0.6.5",
]
[[package]]
@@ -2113,7 +2261,19 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
- "memoffset",
+ "memoffset 0.6.5",
+]
+
+[[package]]
+name = "nix"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "libc",
+ "memoffset 0.7.1",
]
[[package]]
@@ -2224,11 +2384,11 @@ dependencies = [
[[package]]
name = "num_enum"
-version = "0.6.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1"
+checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845"
dependencies = [
- "num_enum_derive 0.6.1",
+ "num_enum_derive 0.7.2",
]
[[package]]
@@ -2245,9 +2405,9 @@ dependencies = [
[[package]]
name = "num_enum_derive"
-version = "0.6.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
+checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2267,29 +2427,25 @@ dependencies = [
[[package]]
name = "objc-sys"
-version = "0.2.0-beta.2"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7"
+checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459"
[[package]]
name = "objc2"
-version = "0.3.0-beta.3.patch-leaks.3"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468"
+checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d"
dependencies = [
- "block2",
"objc-sys",
"objc2-encode",
]
[[package]]
name = "objc2-encode"
-version = "2.0.0-pre.2"
+version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512"
-dependencies = [
- "objc-sys",
-]
+checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
[[package]]
name = "objc_exception"
@@ -2445,6 +2601,12 @@ dependencies = [
"indexmap 2.1.0",
]
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
[[package]]
name = "pkg-config"
version = "0.3.28"
@@ -2473,6 +2635,20 @@ dependencies = [
"miniz_oxide",
]
+[[package]]
+name = "polling"
+version = "3.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "pin-project-lite",
+ "rustix",
+ "tracing",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "pollster"
version = "0.3.0"
@@ -2519,6 +2695,15 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "quick-xml"
+version = "0.30.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "quote"
version = "1.0.35"
@@ -2555,6 +2740,12 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
+[[package]]
+name = "raw-window-handle"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544"
+
[[package]]
name = "raw-window-metal"
version = "0.3.2"
@@ -2673,12 +2864,11 @@ dependencies = [
[[package]]
name = "rspirv"
-version = "0.11.0+1.5.4"
+version = "0.12.0+sdk-1.3.268.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1503993b59ca9ae4127365c3293517576d7ce56be9f3d8abb1625c85ddc583ba"
+checksum = "69cf3a93856b6e5946537278df0d3075596371b1950ccff012f02b0f7eafec8d"
dependencies = [
- "fxhash",
- "num-traits",
+ "rustc-hash",
"spirv",
]
@@ -2746,6 +2936,15 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
[[package]]
name = "scoped-tls"
version = "1.0.1"
@@ -2766,21 +2965,21 @@ checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339"
dependencies = [
"crossfont",
"log",
- "smithay-client-toolkit",
+ "smithay-client-toolkit 0.16.1",
"tiny-skia 0.7.0",
]
[[package]]
name = "sctk-adwaita"
-version = "0.5.4"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09"
+checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550"
dependencies = [
"ab_glyph",
"log",
- "memmap2",
- "smithay-client-toolkit",
- "tiny-skia 0.8.4",
+ "memmap2 0.9.3",
+ "smithay-client-toolkit 0.18.0",
+ "tiny-skia 0.11.3",
]
[[package]]
@@ -2873,6 +3072,15 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "slotmap"
version = "1.0.7"
@@ -2895,16 +3103,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9"
dependencies = [
"bitflags 1.3.2",
- "calloop",
+ "calloop 0.10.6",
"dlib",
"lazy_static",
"log",
- "memmap2",
+ "memmap2 0.5.10",
"nix 0.24.3",
"pkg-config",
- "wayland-client",
- "wayland-cursor",
- "wayland-protocols",
+ "wayland-client 0.29.5",
+ "wayland-cursor 0.29.5",
+ "wayland-protocols 0.29.5",
+]
+
+[[package]]
+name = "smithay-client-toolkit"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f"
+dependencies = [
+ "bitflags 2.4.1",
+ "calloop 0.12.4",
+ "calloop-wayland-source",
+ "cursor-icon",
+ "libc",
+ "log",
+ "memmap2 0.9.3",
+ "rustix",
+ "thiserror",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+ "wayland-csd-frame",
+ "wayland-cursor 0.31.0",
+ "wayland-protocols 0.31.0",
+ "wayland-protocols-wlr",
+ "wayland-scanner 0.31.0",
+ "xkeysym",
+]
+
+[[package]]
+name = "smol_str"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49"
+dependencies = [
+ "serde",
]
[[package]]
@@ -2918,12 +3160,11 @@ dependencies = [
[[package]]
name = "spirv"
-version = "0.2.0+1.5.4"
+version = "0.3.0+sdk-1.3.268.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830"
+checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844"
dependencies = [
- "bitflags 1.3.2",
- "num-traits",
+ "bitflags 2.4.1",
]
[[package]]
@@ -3070,16 +3311,16 @@ dependencies = [
[[package]]
name = "tiny-skia"
-version = "0.8.4"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67"
+checksum = "b6a067b809476893fce6a254cf285850ff69c847e6cfbade6a20b655b6c7e80d"
dependencies = [
"arrayref",
"arrayvec 0.7.4",
"bytemuck",
"cfg-if",
- "png",
- "tiny-skia-path 0.8.4",
+ "log",
+ "tiny-skia-path 0.11.3",
]
[[package]]
@@ -3094,9 +3335,9 @@ dependencies = [
[[package]]
name = "tiny-skia-path"
-version = "0.8.4"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c"
+checksum = "5de35e8a90052baaaf61f171680ac2f8e925a1e43ea9d2e3a00514772250e541"
dependencies = [
"arrayref",
"bytemuck",
@@ -3129,6 +3370,22 @@ dependencies = [
"winnow",
]
+[[package]]
+name = "tracing"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+dependencies = [
+ "pin-project-lite",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+
[[package]]
name = "ttf-parser"
version = "0.20.0"
@@ -3153,6 +3410,12 @@ version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+[[package]]
+name = "unicode-segmentation"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
+
[[package]]
name = "unicode-width"
version = "0.1.11"
@@ -3195,6 +3458,16 @@ version = "0.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314"
+[[package]]
+name = "walkdir"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -3267,6 +3540,20 @@ version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
+[[package]]
+name = "wayland-backend"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4"
+dependencies = [
+ "cc",
+ "downcast-rs",
+ "nix 0.26.4",
+ "scoped-tls",
+ "smallvec",
+ "wayland-sys 0.31.1",
+]
+
[[package]]
name = "wayland-client"
version = "0.29.5"
@@ -3279,8 +3566,20 @@ dependencies = [
"nix 0.24.3",
"scoped-tls",
"wayland-commons",
- "wayland-scanner",
- "wayland-sys",
+ "wayland-scanner 0.29.5",
+ "wayland-sys 0.29.5",
+]
+
+[[package]]
+name = "wayland-client"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3"
+dependencies = [
+ "bitflags 2.4.1",
+ "nix 0.26.4",
+ "wayland-backend",
+ "wayland-scanner 0.31.0",
]
[[package]]
@@ -3292,7 +3591,18 @@ dependencies = [
"nix 0.24.3",
"once_cell",
"smallvec",
- "wayland-sys",
+ "wayland-sys 0.29.5",
+]
+
+[[package]]
+name = "wayland-csd-frame"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e"
+dependencies = [
+ "bitflags 2.4.1",
+ "cursor-icon",
+ "wayland-backend",
]
[[package]]
@@ -3302,7 +3612,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661"
dependencies = [
"nix 0.24.3",
- "wayland-client",
+ "wayland-client 0.29.5",
+ "xcursor",
+]
+
+[[package]]
+name = "wayland-cursor"
+version = "0.31.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b"
+dependencies = [
+ "nix 0.26.4",
+ "wayland-client 0.31.1",
"xcursor",
]
@@ -3313,9 +3634,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6"
dependencies = [
"bitflags 1.3.2",
- "wayland-client",
+ "wayland-client 0.29.5",
"wayland-commons",
- "wayland-scanner",
+ "wayland-scanner 0.29.5",
+]
+
+[[package]]
+name = "wayland-protocols"
+version = "0.31.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c"
+dependencies = [
+ "bitflags 2.4.1",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+ "wayland-scanner 0.31.0",
+]
+
+[[package]]
+name = "wayland-protocols-plasma"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479"
+dependencies = [
+ "bitflags 2.4.1",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+ "wayland-protocols 0.31.0",
+ "wayland-scanner 0.31.0",
+]
+
+[[package]]
+name = "wayland-protocols-wlr"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6"
+dependencies = [
+ "bitflags 2.4.1",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+ "wayland-protocols 0.31.0",
+ "wayland-scanner 0.31.0",
]
[[package]]
@@ -3329,6 +3688,17 @@ dependencies = [
"xml-rs",
]
+[[package]]
+name = "wayland-scanner"
+version = "0.31.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c"
+dependencies = [
+ "proc-macro2",
+ "quick-xml",
+ "quote",
+]
+
[[package]]
name = "wayland-sys"
version = "0.29.5"
@@ -3340,11 +3710,33 @@ dependencies = [
"pkg-config",
]
+[[package]]
+name = "wayland-sys"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af"
+dependencies = [
+ "dlib",
+ "log",
+ "once_cell",
+ "pkg-config",
+]
+
[[package]]
name = "web-sys"
-version = "0.3.64"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "web-time"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -3358,19 +3750,19 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
[[package]]
name = "wgpu"
-version = "0.18.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24"
+checksum = "d0b71d2ded29e2161db50ab731d6cb42c037bd7ab94864a98fa66ff36b4721a8"
dependencies = [
"arrayvec 0.7.4",
"cfg-if",
- "flume",
+ "cfg_aliases",
"js-sys",
"log",
"naga",
"parking_lot",
"profiling",
- "raw-window-handle 0.5.2",
+ "raw-window-handle 0.6.0",
"smallvec",
"static_assertions",
"wasm-bindgen",
@@ -3383,19 +3775,22 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "0.18.1"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726"
+checksum = "6b15e451d4060ada0d99a64df44e4d590213496da7c4f245572d51071e8e30ed"
dependencies = [
"arrayvec 0.7.4",
"bit-vec",
"bitflags 2.4.1",
+ "cfg_aliases",
"codespan-reporting",
+ "indexmap 2.1.0",
"log",
"naga",
+ "once_cell",
"parking_lot",
"profiling",
- "raw-window-handle 0.5.2",
+ "raw-window-handle 0.6.0",
"rustc-hash",
"smallvec",
"thiserror",
@@ -3406,9 +3801,9 @@ dependencies = [
[[package]]
name = "wgpu-hal"
-version = "0.18.1"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b84ecc802da3eb67b4cf3dd9ea6fe45bbb47ef13e6c49c5c3240868a9cc6cdd9"
+checksum = "11f259ceb56727fb097da108d92f8a5cbdb5b74a77f9e396bd43626f67299d61"
dependencies = [
"android_system_properties",
"arrayvec 0.7.4",
@@ -3416,12 +3811,13 @@ dependencies = [
"bit-set",
"bitflags 2.4.1",
"block",
+ "cfg_aliases",
"core-graphics-types",
"d3d12",
"glow",
"glutin_wgl_sys",
"gpu-alloc",
- "gpu-allocator 0.23.0",
+ "gpu-allocator 0.25.0",
"gpu-descriptor",
"hassle-rs",
"js-sys",
@@ -3436,7 +3832,7 @@ dependencies = [
"parking_lot",
"profiling",
"range-alloc",
- "raw-window-handle 0.5.2",
+ "raw-window-handle 0.6.0",
"renderdoc-sys",
"rustc-hash",
"smallvec",
@@ -3449,9 +3845,9 @@ dependencies = [
[[package]]
name = "wgpu-types"
-version = "0.18.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd"
+checksum = "895fcbeb772bfb049eb80b2d6e47f6c9af235284e9703c96fc0218a42ffd5af2"
dependencies = [
"bitflags 2.4.1",
"js-sys",
@@ -3779,7 +4175,7 @@ dependencies = [
"libc",
"log",
"mio",
- "ndk",
+ "ndk 0.7.0",
"ndk-glue",
"objc",
"once_cell",
@@ -3788,10 +4184,10 @@ dependencies = [
"raw-window-handle 0.4.3",
"raw-window-handle 0.5.2",
"sctk-adwaita 0.4.3",
- "smithay-client-toolkit",
+ "smithay-client-toolkit 0.16.1",
"wasm-bindgen",
- "wayland-client",
- "wayland-protocols",
+ "wayland-client 0.29.5",
+ "wayland-protocols 0.29.5",
"web-sys",
"windows-sys 0.36.1",
"x11-dl",
@@ -3799,37 +4195,50 @@ dependencies = [
[[package]]
name = "winit"
-version = "0.28.7"
+version = "0.29.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94"
+checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf"
dependencies = [
+ "ahash 0.8.7",
"android-activity",
- "bitflags 1.3.2",
+ "atomic-waker",
+ "bitflags 2.4.1",
+ "bytemuck",
+ "calloop 0.12.4",
"cfg_aliases",
"core-foundation",
- "core-graphics 0.22.3",
- "dispatch",
- "instant",
+ "core-graphics 0.23.1",
+ "cursor-icon",
+ "icrate",
+ "js-sys",
"libc",
"log",
- "mio",
- "ndk",
+ "memmap2 0.9.3",
+ "ndk 0.8.0",
+ "ndk-sys 0.5.0+25.2.9519653",
"objc2",
"once_cell",
"orbclient",
"percent-encoding",
- "raw-window-handle 0.5.2",
+ "raw-window-handle 0.6.0",
"redox_syscall 0.3.5",
- "sctk-adwaita 0.5.4",
- "smithay-client-toolkit",
+ "rustix",
+ "sctk-adwaita 0.8.1",
+ "smithay-client-toolkit 0.18.0",
+ "smol_str",
+ "unicode-segmentation",
"wasm-bindgen",
- "wayland-client",
- "wayland-commons",
- "wayland-protocols",
- "wayland-scanner",
+ "wasm-bindgen-futures",
+ "wayland-backend",
+ "wayland-client 0.31.1",
+ "wayland-protocols 0.31.0",
+ "wayland-protocols-plasma",
"web-sys",
- "windows-sys 0.45.0",
+ "web-time",
+ "windows-sys 0.48.0",
"x11-dl",
+ "x11rb",
+ "xkbcommon-dl",
]
[[package]]
@@ -3870,12 +4279,52 @@ dependencies = [
"pkg-config",
]
+[[package]]
+name = "x11rb"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a"
+dependencies = [
+ "as-raw-xcb-connection",
+ "gethostname",
+ "libc",
+ "libloading 0.8.1",
+ "once_cell",
+ "rustix",
+ "x11rb-protocol",
+]
+
+[[package]]
+name = "x11rb-protocol"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34"
+
[[package]]
name = "xcursor"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911"
+[[package]]
+name = "xkbcommon-dl"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699"
+dependencies = [
+ "bitflags 2.4.1",
+ "dlib",
+ "log",
+ "once_cell",
+ "xkeysym",
+]
+
+[[package]]
+name = "xkeysym"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621"
+
[[package]]
name = "xml-rs"
version = "0.8.19"
diff --git a/librashader-common/Cargo.toml b/librashader-common/Cargo.toml
index 3dd71c31..aaf9a7ff 100644
--- a/librashader-common/Cargo.toml
+++ b/librashader-common/Cargo.toml
@@ -23,7 +23,7 @@ wgpu = ["wgpu-types"]
[dependencies]
gl = { version = "0.14.0", optional = true }
ash = { version = "0.37", optional = true }
-wgpu-types = { version = "0.18.0", optional = true }
+wgpu-types = { version = "0.19.0", optional = true }
num-traits = "0.2.15"
diff --git a/librashader-reflect/Cargo.toml b/librashader-reflect/Cargo.toml
index 5e1554dc..e4d92827 100644
--- a/librashader-reflect/Cargo.toml
+++ b/librashader-reflect/Cargo.toml
@@ -25,9 +25,9 @@ librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2
spirv_cross = { package = "librashader-spirv-cross", version = "0.23", optional = true }
-naga = { version = "0.14.2", features = ["spv-in", "wgsl-out"], optional = true }
-rspirv = { version = "0.11.0+1.5.4", optional = true }
-spirv = { version = "0.2.0+1.5.4", optional = true}
+naga = { version = "0.19.0", features = ["spv-in", "wgsl-out"], optional = true }
+rspirv = { version = "0.12.0+sdk-1.3.268.0", optional = true }
+spirv = { version = "0.3.0+sdk-1.3.268.0", optional = true}
serde = { version = "1.0", features = ["derive"], optional = true }
diff --git a/librashader-reflect/src/reflect/naga.rs b/librashader-reflect/src/reflect/naga.rs
index 29320cc8..5ed99e00 100644
--- a/librashader-reflect/src/reflect/naga.rs
+++ b/librashader-reflect/src/reflect/naga.rs
@@ -1,9 +1,6 @@
use crate::error::{SemanticsErrorKind, ShaderReflectError};
-use naga::{
- AddressSpace, Binding, GlobalVariable, Handle, ImageClass, Module, ResourceBinding, ScalarKind,
- TypeInner, VectorSize,
-};
+use naga::{AddressSpace, Binding, GlobalVariable, Handle, ImageClass, Module, ResourceBinding, Scalar, ScalarKind, TypeInner, VectorSize};
use crate::reflect::helper::{SemanticErrorBlame, TextureData, UboData};
use crate::reflect::semantics::{
@@ -29,7 +26,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
match self {
UniqueSemantics::MVP => {
- if matches!(ty, TypeInner::Matrix { columns, rows, width } if *columns == VectorSize::Quad
+ if matches!(ty, TypeInner::Matrix { columns, rows, scalar: Scalar { width, .. } } if *columns == VectorSize::Quad
&& *rows == VectorSize::Quad && *width == 4)
{
return Some(TypeInfo {
@@ -40,7 +37,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
}
UniqueSemantics::FrameCount => {
// Uint32 == width 4
- if matches!(ty, TypeInner::Scalar { kind, width } if *kind == ScalarKind::Uint && *width == 4)
+ if matches!(ty, TypeInner::Scalar( Scalar { kind, width }) if *kind == ScalarKind::Uint && *width == 4)
{
return Some(TypeInfo {
size: 1,
@@ -50,7 +47,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
}
UniqueSemantics::FrameDirection => {
// Uint32 == width 4
- if matches!(ty, TypeInner::Scalar { kind, width } if *kind == ScalarKind::Sint && *width == 4)
+ if matches!(ty, TypeInner::Scalar( Scalar { kind, width }) if *kind == ScalarKind::Sint && *width == 4)
{
return Some(TypeInfo {
size: 1,
@@ -60,7 +57,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
}
UniqueSemantics::FloatParameter => {
// Float32 == width 4
- if matches!(ty, TypeInner::Scalar { kind, width } if *kind == ScalarKind::Float && *width == 4)
+ if matches!(ty, TypeInner::Scalar( Scalar { kind, width }) if *kind == ScalarKind::Float && *width == 4)
{
return Some(TypeInfo {
size: 1,
@@ -69,7 +66,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
}
}
_ => {
- if matches!(ty, TypeInner::Vector { kind, width, size } if *kind == ScalarKind::Float && *width == 4 && *size == VectorSize::Quad)
+ if matches!(ty, TypeInner::Vector { scalar: Scalar { width, kind }, size } if *kind == ScalarKind::Float && *width == 4 && *size == VectorSize::Quad)
{
return Some(TypeInfo {
size: 4,
@@ -85,7 +82,7 @@ impl ValidateTypeSemantics<&TypeInner> for UniqueSemantics {
impl ValidateTypeSemantics<&TypeInner> for TextureSemantics {
fn validate_type(&self, ty: &&TypeInner) -> Option {
- let TypeInner::Vector { size, kind, width } = ty else {
+ let TypeInner::Vector { scalar: Scalar { width, kind }, size } = ty else {
return None;
};
diff --git a/librashader-runtime-wgpu/Cargo.toml b/librashader-runtime-wgpu/Cargo.toml
index cf9eecd3..8a0c076c 100644
--- a/librashader-runtime-wgpu/Cargo.toml
+++ b/librashader-runtime-wgpu/Cargo.toml
@@ -12,7 +12,7 @@ librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = [] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.2" }
-wgpu = { version = "0.18.0", features = ["spirv"] }
+wgpu = { version = "0.19.0", features = ["spirv"] }
rustc-hash = "1.1.0"
image = "0.24.7"
thiserror = "1.0.50"
@@ -22,12 +22,14 @@ rayon = "1.8.0"
bytemuck = { version = "1.14.0", features = ["derive"] }
array-concat = "0.5.2"
+config = "0.13.4"
+once_cell = "1.19.0"
[dev-dependencies]
config = { version = "0.13.4", features = [] }
env_logger = "0.10.1"
-raw-window-handle = "0.5"
-winit = "0.28.7"
+raw-window-handle = "0.6.0"
+winit = "0.29.10"
pollster = "0.3"
log = "0.4.20"
diff --git a/librashader-runtime-wgpu/src/draw_quad.rs b/librashader-runtime-wgpu/src/draw_quad.rs
index 401795ce..ab5a5485 100644
--- a/librashader-runtime-wgpu/src/draw_quad.rs
+++ b/librashader-runtime-wgpu/src/draw_quad.rs
@@ -1,7 +1,8 @@
use array_concat::concat_arrays;
+use once_cell::sync::Lazy;
use librashader_runtime::quad::QuadType;
use wgpu::util::{BufferInitDescriptor, DeviceExt};
-use wgpu::{Buffer, BufferDescriptor, Device, RenderPass};
+use wgpu::{Buffer, BufferAddress, BufferDescriptor, Device, Queue, RenderPass};
#[rustfmt::skip]
const VBO_OFFSCREEN: [f32; 16] = [
@@ -21,19 +22,22 @@ const VBO_DEFAULT_FINAL: [f32; 16] = [
1.0, 1.0, 1.0, 1.0,
];
-static VBO_DATA: &[f32; 32] = &concat_arrays!(VBO_OFFSCREEN, VBO_DEFAULT_FINAL);
+const VBO_DATA: [f32; 32] = concat_arrays!(VBO_OFFSCREEN, VBO_DEFAULT_FINAL);
+
+static VBO_DATA_BYTES: Lazy<&[u8]> = once_cell::sync::Lazy::new(|| bytemuck::cast_slice(&VBO_DATA));
pub struct DrawQuad {
buffer: Buffer,
}
impl DrawQuad {
- pub fn new(device: &Device) -> DrawQuad {
+ pub fn new(device: &Device, queue: &mut Queue) -> DrawQuad {
let buffer = device.create_buffer_init(&BufferInitDescriptor {
label: Some("librashader vbo"),
- contents: bytemuck::cast_slice(VBO_DATA),
- usage: wgpu::BufferUsages::VERTEX,
+ contents: *VBO_DATA_BYTES,
+ usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST,
});
+ queue.write_buffer(&buffer, 0, *VBO_DATA_BYTES);
DrawQuad { buffer }
}
diff --git a/librashader-runtime-wgpu/src/filter_chain.rs b/librashader-runtime-wgpu/src/filter_chain.rs
index 5f1809b0..1b3a3fc3 100644
--- a/librashader-runtime-wgpu/src/filter_chain.rs
+++ b/librashader-runtime-wgpu/src/filter_chain.rs
@@ -126,7 +126,7 @@ impl FilterChainWGPU {
// FrameResiduals::new(&device.device)
// });
- let draw_quad = DrawQuad::new(&device);
+ let draw_quad = DrawQuad::new(&device, queue);
Ok(FilterChainWGPU {
common: FilterCommon {
diff --git a/librashader-runtime-wgpu/tests/hello_triangle.rs b/librashader-runtime-wgpu/tests/hello_triangle.rs
index 414107e8..0db9cc9a 100644
--- a/librashader-runtime-wgpu/tests/hello_triangle.rs
+++ b/librashader-runtime-wgpu/tests/hello_triangle.rs
@@ -1,3 +1,5 @@
+use std::sync::Arc;
+use wgpu::{ Maintain, };
use winit::{
event::*,
event_loop::{ControlFlow, EventLoop},
@@ -8,6 +10,7 @@ use librashader_presets::ShaderPreset;
use librashader_runtime_wgpu::FilterChainWGPU;
use wgpu::util::DeviceExt;
use winit::event_loop::EventLoopBuilder;
+use winit::keyboard::{Key, KeyCode, PhysicalKey};
use winit::platform::windows::EventLoopBuilderExtWindows;
#[cfg(target_arch = "wasm32")]
@@ -58,9 +61,9 @@ const VERTICES: &[Vertex] = &[
},
];
-struct State {
- surface: wgpu::Surface,
- device: wgpu::Device,
+struct State<'a> {
+ surface: wgpu::Surface<'a>,
+ device: Arc,
queue: wgpu::Queue,
config: wgpu::SurfaceConfiguration,
size: winit::dpi::PhysicalSize,
@@ -72,8 +75,8 @@ struct State {
num_vertices: u32,
chain: FilterChainWGPU,
}
-impl State {
- async fn new(window: &Window) -> Self {
+impl<'a> State<'a> {
+ async fn new(window: &'a Window) -> Self {
let size = window.inner_size();
let instance = wgpu::Instance::default();
@@ -88,11 +91,11 @@ impl State {
.await
.unwrap();
- let (device, queue) = adapter
+ let (device, mut queue) = adapter
.request_device(
&wgpu::DeviceDescriptor {
- features: wgpu::Features::default(),
- limits: wgpu::Limits::default(),
+ required_features: wgpu::Features::ADDRESS_MODE_CLAMP_TO_BORDER,
+ required_limits: wgpu::Limits::default(),
label: None,
},
None,
@@ -108,13 +111,27 @@ impl State {
width: size.width,
height: size.height,
present_mode: wgpu::PresentMode::Fifo,
+ desired_maximum_frame_latency: 2,
alpha_mode: swapchain_capabilities.alpha_modes[0],
view_formats: vec![],
};
+ let device = Arc::new(device);
+
+ let mut cmd = device.create_command_encoder(&wgpu::CommandEncoderDescriptor {
+ label: Some("start encoder"),
+ });
+
let preset =
ShaderPreset::try_parse("../test/shaders_slang/crt/crt-royale.slangp").unwrap();
- let chain = FilterChainWGPU::load_from_preset_deferred(&device, preset).unwrap();
+
+
+ let chain = FilterChainWGPU::load_from_preset_deferred(Arc::clone(&device), &mut queue, &mut cmd, preset).unwrap();
+
+ let cmd = cmd.finish();
+
+ let index = queue.submit([cmd]);
+ device.poll(Maintain::WaitForSubmissionIndex(index));
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("Shader"),
@@ -243,56 +260,45 @@ pub fn run() {
let event_loop = EventLoopBuilder::new()
.with_any_thread(true)
.with_dpi_aware(true)
- .build();
+ .build()
+ .unwrap();
let window = WindowBuilder::new().build(&event_loop).unwrap();
pollster::block_on(async {
let mut state = State::new(&window).await;
- event_loop.run(move |event, _, control_flow| {
+ event_loop.run(|event, target| {
+
match event {
Event::WindowEvent {
- ref event,
- window_id,
- } if window_id == window.id() => {
- if !state.input(event) {
- // UPDATED!
- match event {
- WindowEvent::CloseRequested
- | WindowEvent::KeyboardInput {
- input:
- KeyboardInput {
- state: ElementState::Pressed,
- virtual_keycode: Some(VirtualKeyCode::Escape),
- ..
- },
- ..
- } => *control_flow = ControlFlow::Exit,
- WindowEvent::Resized(physical_size) => {
- state.resize(*physical_size);
- }
- WindowEvent::ScaleFactorChanged { new_inner_size, .. } => {
- state.resize(**new_inner_size);
- }
- _ => {}
- }
+ window_id: _,
+ event
+ } => match event {
+ WindowEvent::Resized(new_size) => {
+ state.resize(new_size);
+ // On macos the window needs to be redrawn manually after resizing
+ window.request_redraw();
}
- }
- Event::RedrawRequested(window_id) if window_id == window.id() => {
- state.update();
- match state.render() {
- Ok(_) => {}
- Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => {
- state.resize(state.size)
+ WindowEvent::RedrawRequested => {
+ state.update();
+ match state.render() {
+ Ok(_) => {}
+ Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => {
+ state.resize(state.size)
+ }
+ Err(wgpu::SurfaceError::OutOfMemory) => target.exit(),
+ Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"),
}
- Err(wgpu::SurfaceError::OutOfMemory) => *control_flow = ControlFlow::Exit,
- Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"),
}
+ WindowEvent::CloseRequested => target.exit(),
+ _ => {}
}
- Event::RedrawEventsCleared => {
- window.request_redraw();
+ Event::AboutToWait => {
+ window.request_redraw()
}
_ => {}
}
- });
+
+
+ }).unwrap();
});
}