chore(deps): update dependencies (#9240)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
renovate[bot]andConnor Fitzgerald authored and GitHub committed 2026-03-16 17:12:12 +00:00
1 parent fff3d25eb1
commit f778c388be
14 files changed
+201 -180

No files matched your search

+8 -4
View File
@@ -23,6 +23,10 @@ skip = [
# parking-lot uses an old version
{ name = "redox_syscall", version = "0.5.18" },
# deno uses an old version
{ name = "bit-vec", version = "0.8.0" },
{ name = "bit-set", version = "0.8.0" },
]
wildcards = "deny"
allow-wildcard-paths = true
@@ -65,10 +69,10 @@ private = { ignore = true }
allow-git = [
# Waiting on releases; used in examples/tests only
# Pending a release for https://github.com/Xudong-Huang/generator-rs/pull/75
"https://github.com/Xudong-Huang/generator-rs",
# Pending a release for https://github.com/gfx-rs/rspirv
"https://github.com/gfx-rs/rspirv",
# Pending a release for https://github.com/rust-cli/env_logger/commit/143fa647ab33ed3acc9f160dfa3cb075cc62b5a3
"https://github.com/rust-cli/env_logger",
# Pending merge/release for https://github.com/LukasKalbertodt/libtest-mimic/pull/58
"https://github.com/cwfitzgerald/libtest-mimic",
]
unknown-registry = "deny"
unknown-git = "deny"
Generated
+80 -65
View File
@@ -120,9 +120,9 @@ dependencies = [
[[package]]
name = "anstream"
version = "0.6.21"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -135,15 +135,15 @@ dependencies = [
[[package]]
name = "anstyle"
version = "1.0.13"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
[[package]]
name = "anstyle-parse"
version = "0.2.7"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [
"utf8parse",
]
@@ -194,9 +194,9 @@ dependencies = [
[[package]]
name = "argh"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a66b74feaa2a7eddc2a74d273f151b545742ef375581c5a566607df992565e"
checksum = "16a3bf61b195d0d2202b21a5783b273ccba8dc04c7f07c3bc22a70d02b81e154"
dependencies = [
"argh_derive",
"argh_shared",
@@ -204,9 +204,9 @@ dependencies = [
[[package]]
name = "argh_derive"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce8f59ed4ec07742760cf3593727c8caff28ef4537eeb33be25e5fb454850d1"
checksum = "8ba478f46c1c645512959fada39ced2b0d3552fb4a60ef3ff65d0c8850d222a5"
dependencies = [
"argh_shared",
"proc-macro2",
@@ -216,9 +216,9 @@ dependencies = [
[[package]]
name = "argh_shared"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "284b476f7c2b6af9aa49f059466ebfa725b0f53c33d271a691e613e9187bf507"
checksum = "2db5bbb2053ca6b6d64f11e8572f2e4a0a32421e87f4260ec49039cf75b07ef3"
dependencies = [
"serde",
]
@@ -362,7 +362,16 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
dependencies = [
"bit-vec",
"bit-vec 0.8.0",
]
[[package]]
name = "bit-set"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd"
dependencies = [
"bit-vec 0.9.1",
]
[[package]]
@@ -371,6 +380,12 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
name = "bit-vec"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -597,9 +612,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
version = "1.2.56"
version = "1.2.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2"
checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -662,9 +677,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.60"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351"
dependencies = [
"clap_builder",
"clap_derive",
@@ -672,9 +687,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.60"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
dependencies = [
"anstream",
"anstyle",
@@ -684,9 +699,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.55"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a"
dependencies = [
"heck",
"proc-macro2",
@@ -696,9 +711,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "1.0.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
[[package]]
name = "codespan-reporting"
@@ -713,9 +728,9 @@ dependencies = [
[[package]]
name = "colorchoice"
version = "1.0.4"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
[[package]]
name = "combine"
@@ -738,13 +753,12 @@ dependencies = [
[[package]]
name = "console"
version = "0.16.2"
version = "0.16.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4"
checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87"
dependencies = [
"encode_unicode",
"libc",
"once_cell",
"unicode-width",
"windows-sys 0.61.2",
]
@@ -939,8 +953,8 @@ dependencies = [
"anyhow",
"az",
"bincode 1.3.3",
"bit-set",
"bit-vec",
"bit-set 0.8.0",
"bit-vec 0.8.0",
"boxed_error",
"bytes",
"capacity_builder",
@@ -1293,8 +1307,7 @@ dependencies = [
[[package]]
name = "env_filter"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f"
source = "git+https://github.com/rust-cli/env_logger.git?rev=d550741#d550741cdcd1d64f8a564158d9d0b2554f5d900d"
dependencies = [
"log",
"regex",
@@ -1303,8 +1316,7 @@ dependencies = [
[[package]]
name = "env_logger"
version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d"
source = "git+https://github.com/rust-cli/env_logger.git?rev=d550741#d550741cdcd1d64f8a564158d9d0b2554f5d900d"
dependencies = [
"anstream",
"anstyle",
@@ -1575,15 +1587,17 @@ dependencies = [
[[package]]
name = "generator"
version = "0.8.7"
source = "git+https://github.com/Xudong-Huang/generator-rs?rev=70b89fdabcc0e82fe84ca17f65cc52ff25e8e6de#70b89fdabcc0e82fe84ca17f65cc52ff25e8e6de"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9"
dependencies = [
"cc",
"cfg-if",
"libc",
"log",
"rustversion",
"windows",
"windows-link",
"windows-result",
]
[[package]]
@@ -1986,9 +2000,9 @@ checksum = "cd62e6b5e86ea8eeeb8db1de02880a6abc01a397b2ebb64b5d74ac255318f5cb"
[[package]]
name = "image"
version = "0.25.9"
version = "0.25.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a"
checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"
dependencies = [
"bytemuck",
"byteorder-lite",
@@ -2214,8 +2228,7 @@ dependencies = [
[[package]]
name = "libtest-mimic"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5297962ef19edda4ce33aaa484386e0a5b3d7f2f4e037cbeee00503ef6b29d33"
source = "git+https://github.com/cwfitzgerald/libtest-mimic.git?rev=9979b3c#9979b3c1aa932bd210505029e4639aafa6e3d4f3"
dependencies = [
"anstream",
"anstyle",
@@ -2369,9 +2382,9 @@ dependencies = [
[[package]]
name = "moxcms"
version = "0.7.11"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97"
checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
dependencies = [
"num-traits",
"pxfm",
@@ -2383,7 +2396,7 @@ version = "28.0.0"
dependencies = [
"arbitrary",
"arrayvec",
"bit-set",
"bit-set 0.9.1",
"bitflags 2.11.0",
"cfg-if",
"cfg_aliases 0.2.1",
@@ -2629,9 +2642,9 @@ dependencies = [
[[package]]
name = "num_enum"
version = "0.7.5"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c"
checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26"
dependencies = [
"num_enum_derive",
"rustversion",
@@ -2639,9 +2652,9 @@ dependencies = [
[[package]]
name = "num_enum_derive"
version = "0.7.5"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7"
checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2959,9 +2972,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.21.3"
version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
[[package]]
name = "once_cell_polyfill"
@@ -2977,9 +2990,9 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
[[package]]
name = "orbclient"
version = "0.3.50"
version = "0.3.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd"
checksum = "59aed3b33578edcfa1bc96a321d590d31832b6ad55a26f0313362ce687e9abd6"
dependencies = [
"libc",
"libredox",
@@ -3188,9 +3201,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
[[package]]
name = "portable-atomic-util"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5"
checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3"
dependencies = [
"portable-atomic",
]
@@ -3485,8 +3498,9 @@ dependencies = [
[[package]]
name = "rspirv"
version = "0.12.0+sdk-1.4.309.0"
source = "git+https://github.com/gfx-rs/rspirv?rev=89ce4d0e64c91b0635f617409dc57cb031749a39#89ce4d0e64c91b0635f617409dc57cb031749a39"
version = "0.13.0+sdk-1.4.341.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "091dca2e1d6fd3098417b5ec88e77e80d1ba5945750943419dc976858082c296"
dependencies = [
"rustc-hash 1.1.0",
"spirv",
@@ -3825,8 +3839,9 @@ dependencies = [
[[package]]
name = "spirv"
version = "0.3.0+sdk-1.4.309.0"
source = "git+https://github.com/gfx-rs/rspirv?rev=89ce4d0e64c91b0635f617409dc57cb031749a39#89ce4d0e64c91b0635f617409dc57cb031749a39"
version = "0.4.0+sdk-1.4.341.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"
dependencies = [
"bitflags 2.11.0",
"serde",
@@ -3939,9 +3954,9 @@ checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b"
[[package]]
name = "tempfile"
version = "3.26.0"
version = "3.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.4.2",
@@ -4155,9 +4170,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
version = "0.3.22"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [
"matchers",
"nu-ansi-term",
@@ -4814,8 +4829,8 @@ name = "wgpu-core"
version = "28.0.0"
dependencies = [
"arrayvec",
"bit-set",
"bit-vec",
"bit-set 0.9.1",
"bit-vec 0.9.1",
"bitflags 2.11.0",
"bytemuck",
"cfg_aliases 0.2.1",
@@ -4938,7 +4953,7 @@ dependencies = [
"android_system_properties",
"arrayvec",
"ash",
"bit-set",
"bit-set 0.9.1",
"bitflags 2.11.0",
"block2 0.6.2",
"bytemuck",
+8 -8
View File
@@ -108,8 +108,8 @@ arbitrary = "1.4.2"
argh = "0.1.13"
arrayvec = { version = "0.7.1", default-features = false }
bincode = "2"
bit-set = { version = "0.8", default-features = false }
bit-vec = { version = "0.8", default-features = false }
bit-set = { version = "0.9", default-features = false }
bit-vec = { version = "0.9", default-features = false }
bitflags = "2.9"
bytemuck = { version = "1.22", features = [
"extern_crate_alloc",
@@ -148,7 +148,7 @@ libfuzzer-sys = ">0.4.0,<=0.4.7"
libloading = "0.8"
libm = { version = "0.2.6", default-features = false }
libtest-mimic = "0.8"
log = "0.4.21"
log = "0.4.29"
macro_rules_attribute = "0.2"
nanoserde = "0.2"
nanorand = { version = "0.8", default-features = false, features = ["wyrand"] }
@@ -171,7 +171,7 @@ pico-args = { version = "0.5", features = [
] }
png = "0.18"
pollster = "0.4"
portable-atomic = "1.8"
portable-atomic = "1.10"
portable-atomic-util = "0.2.4"
pp-rs = "0.2.1"
profiling = { version = "1.0.1", default-features = false }
@@ -181,7 +181,7 @@ rwh_05 = { version = "0.5.2", package = "raw-window-handle" } # temporary compat
rayon = "1.3"
regex-lite = "0.1"
renderdoc-sys = "1"
rspirv = { version = "0.12", git = "https://github.com/gfx-rs/rspirv", rev = "89ce4d0e64c91b0635f617409dc57cb031749a39" }
rspirv = "0.13"
ron = "0.12"
# NOTE: rustc-hash v2 is a completely different hasher with different performance characteristics
# see discussion here (including with some other alternatives): https://github.com/gfx-rs/wgpu/issues/6999
@@ -191,7 +191,7 @@ serde_json = "1.0.143"
serde = { version = "1.0.225", default-features = false }
shell-words = "1"
smallvec = "1.14"
spirv = { version = "0.3", git = "https://github.com/gfx-rs/rspirv", rev = "89ce4d0e64c91b0635f617409dc57cb031749a39" }
spirv = "0.4"
static_assertions = "1.1"
strum = { version = "0.27.1", default-features = false, features = ["derive"] }
syn = "2.0.98"
@@ -321,8 +321,8 @@ ndk-sys = "0.6"
[patch.crates-io]
wgpu = { path = "./wgpu" }
# https://github.com/Xudong-Huang/generator-rs/pull/75
generator = { git = "https://github.com/Xudong-Huang/generator-rs", rev = "70b89fdabcc0e82fe84ca17f65cc52ff25e8e6de" }
env_logger = { version = "0.11", git = "https://github.com/rust-cli/env_logger.git", rev = "d550741" }
libtest-mimic = { version = "0.8", git = "https://github.com/cwfitzgerald/libtest-mimic.git", rev = "9979b3c" }
[profile.release]
lto = "thin"
+3 -3
View File
@@ -41,12 +41,12 @@ impl<T> HandleSet<T> {
/// Remove all members from `self`.
pub fn clear(&mut self) {
self.members.clear();
self.members.make_empty();
}
/// Remove all members from `self`, and reserve space to hold handles from `arena`.
pub fn clear_for_arena(&mut self, arena: &impl ArenaType<T>) {
self.members.clear();
self.members.make_empty();
self.members.reserve_len(arena.len());
}
@@ -79,7 +79,7 @@ impl<T> HandleSet<T> {
/// Add all of the handles that can be included in this set.
pub fn add_all(&mut self) {
self.members.get_mut().set_all();
self.members.get_mut().fill(true);
}
pub fn contains(&self, handle: Handle<T>) -> bool {
+88 -86
View File
@@ -221,7 +221,7 @@ impl Writer {
let clamp_id = self.id_gen.next();
body.push(Instruction::ext_inst_gl_op(
self.gl450_ext_inst_id,
spirv::GLOp::FClamp,
spirv::GlslStd450Op::FClamp,
float_type_id,
clamp_id,
&[original_id, zero_scalar_id, one_scalar_id],
@@ -1264,7 +1264,7 @@ impl BlockContext<'_> {
} => {
use crate::MathFunction as Mf;
enum MathOp {
Ext(spirv::GLOp),
Ext(spirv::GlslStd450Op),
Custom(Instruction),
}
@@ -1289,8 +1289,10 @@ impl BlockContext<'_> {
// comparison
Mf::Abs => {
match arg_scalar_kind {
Some(crate::ScalarKind::Float) => MathOp::Ext(spirv::GLOp::FAbs),
Some(crate::ScalarKind::Sint) => MathOp::Ext(spirv::GLOp::SAbs),
Some(crate::ScalarKind::Float) => {
MathOp::Ext(spirv::GlslStd450Op::FAbs)
}
Some(crate::ScalarKind::Sint) => MathOp::Ext(spirv::GlslStd450Op::SAbs),
Some(crate::ScalarKind::Uint) => {
MathOp::Custom(Instruction::unary(
spirv::Op::CopyObject, // do nothing
@@ -1303,29 +1305,29 @@ impl BlockContext<'_> {
}
}
Mf::Min => MathOp::Ext(match arg_scalar_kind {
Some(crate::ScalarKind::Float) => spirv::GLOp::FMin,
Some(crate::ScalarKind::Sint) => spirv::GLOp::SMin,
Some(crate::ScalarKind::Uint) => spirv::GLOp::UMin,
Some(crate::ScalarKind::Float) => spirv::GlslStd450Op::FMin,
Some(crate::ScalarKind::Sint) => spirv::GlslStd450Op::SMin,
Some(crate::ScalarKind::Uint) => spirv::GlslStd450Op::UMin,
other => unimplemented!("Unexpected min({:?})", other),
}),
Mf::Max => MathOp::Ext(match arg_scalar_kind {
Some(crate::ScalarKind::Float) => spirv::GLOp::FMax,
Some(crate::ScalarKind::Sint) => spirv::GLOp::SMax,
Some(crate::ScalarKind::Uint) => spirv::GLOp::UMax,
Some(crate::ScalarKind::Float) => spirv::GlslStd450Op::FMax,
Some(crate::ScalarKind::Sint) => spirv::GlslStd450Op::SMax,
Some(crate::ScalarKind::Uint) => spirv::GlslStd450Op::UMax,
other => unimplemented!("Unexpected max({:?})", other),
}),
Mf::Clamp => match arg_scalar_kind {
// Clamp is undefined if min > max. In practice this means it can use a median-of-three
// instruction to determine the value. This is fine according to the WGSL spec for float
// clamp, but integer clamp _must_ use min-max. As such we write out min/max.
Some(crate::ScalarKind::Float) => MathOp::Ext(spirv::GLOp::FClamp),
Some(crate::ScalarKind::Float) => MathOp::Ext(spirv::GlslStd450Op::FClamp),
Some(_) => {
let (min_op, max_op) = match arg_scalar_kind {
Some(crate::ScalarKind::Sint) => {
(spirv::GLOp::SMin, spirv::GLOp::SMax)
(spirv::GlslStd450Op::SMin, spirv::GlslStd450Op::SMax)
}
Some(crate::ScalarKind::Uint) => {
(spirv::GLOp::UMin, spirv::GLOp::UMax)
(spirv::GlslStd450Op::UMin, spirv::GlslStd450Op::UMax)
}
_ => unreachable!(),
};
@@ -1375,37 +1377,37 @@ impl BlockContext<'_> {
MathOp::Custom(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::FClamp,
spirv::GlslStd450Op::FClamp,
result_type_id,
id,
&[arg0_id, arg1_id, arg2_id],
))
}
// trigonometry
Mf::Sin => MathOp::Ext(spirv::GLOp::Sin),
Mf::Sinh => MathOp::Ext(spirv::GLOp::Sinh),
Mf::Asin => MathOp::Ext(spirv::GLOp::Asin),
Mf::Cos => MathOp::Ext(spirv::GLOp::Cos),
Mf::Cosh => MathOp::Ext(spirv::GLOp::Cosh),
Mf::Acos => MathOp::Ext(spirv::GLOp::Acos),
Mf::Tan => MathOp::Ext(spirv::GLOp::Tan),
Mf::Tanh => MathOp::Ext(spirv::GLOp::Tanh),
Mf::Atan => MathOp::Ext(spirv::GLOp::Atan),
Mf::Atan2 => MathOp::Ext(spirv::GLOp::Atan2),
Mf::Asinh => MathOp::Ext(spirv::GLOp::Asinh),
Mf::Acosh => MathOp::Ext(spirv::GLOp::Acosh),
Mf::Atanh => MathOp::Ext(spirv::GLOp::Atanh),
Mf::Radians => MathOp::Ext(spirv::GLOp::Radians),
Mf::Degrees => MathOp::Ext(spirv::GLOp::Degrees),
Mf::Sin => MathOp::Ext(spirv::GlslStd450Op::Sin),
Mf::Sinh => MathOp::Ext(spirv::GlslStd450Op::Sinh),
Mf::Asin => MathOp::Ext(spirv::GlslStd450Op::Asin),
Mf::Cos => MathOp::Ext(spirv::GlslStd450Op::Cos),
Mf::Cosh => MathOp::Ext(spirv::GlslStd450Op::Cosh),
Mf::Acos => MathOp::Ext(spirv::GlslStd450Op::Acos),
Mf::Tan => MathOp::Ext(spirv::GlslStd450Op::Tan),
Mf::Tanh => MathOp::Ext(spirv::GlslStd450Op::Tanh),
Mf::Atan => MathOp::Ext(spirv::GlslStd450Op::Atan),
Mf::Atan2 => MathOp::Ext(spirv::GlslStd450Op::Atan2),
Mf::Asinh => MathOp::Ext(spirv::GlslStd450Op::Asinh),
Mf::Acosh => MathOp::Ext(spirv::GlslStd450Op::Acosh),
Mf::Atanh => MathOp::Ext(spirv::GlslStd450Op::Atanh),
Mf::Radians => MathOp::Ext(spirv::GlslStd450Op::Radians),
Mf::Degrees => MathOp::Ext(spirv::GlslStd450Op::Degrees),
// decomposition
Mf::Ceil => MathOp::Ext(spirv::GLOp::Ceil),
Mf::Round => MathOp::Ext(spirv::GLOp::RoundEven),
Mf::Floor => MathOp::Ext(spirv::GLOp::Floor),
Mf::Fract => MathOp::Ext(spirv::GLOp::Fract),
Mf::Trunc => MathOp::Ext(spirv::GLOp::Trunc),
Mf::Modf => MathOp::Ext(spirv::GLOp::ModfStruct),
Mf::Frexp => MathOp::Ext(spirv::GLOp::FrexpStruct),
Mf::Ldexp => MathOp::Ext(spirv::GLOp::Ldexp),
Mf::Ceil => MathOp::Ext(spirv::GlslStd450Op::Ceil),
Mf::Round => MathOp::Ext(spirv::GlslStd450Op::RoundEven),
Mf::Floor => MathOp::Ext(spirv::GlslStd450Op::Floor),
Mf::Fract => MathOp::Ext(spirv::GlslStd450Op::Fract),
Mf::Trunc => MathOp::Ext(spirv::GlslStd450Op::Trunc),
Mf::Modf => MathOp::Ext(spirv::GlslStd450Op::ModfStruct),
Mf::Frexp => MathOp::Ext(spirv::GlslStd450Op::FrexpStruct),
Mf::Ldexp => MathOp::Ext(spirv::GlslStd450Op::Ldexp),
// geometry
Mf::Dot => match *self.fun_info[arg].ty.inner_with(&self.ir_module.types) {
crate::TypeInner::Vector {
@@ -1545,26 +1547,26 @@ impl BlockContext<'_> {
arg0_id,
arg1_id,
)),
Mf::Cross => MathOp::Ext(spirv::GLOp::Cross),
Mf::Distance => MathOp::Ext(spirv::GLOp::Distance),
Mf::Length => MathOp::Ext(spirv::GLOp::Length),
Mf::Normalize => MathOp::Ext(spirv::GLOp::Normalize),
Mf::FaceForward => MathOp::Ext(spirv::GLOp::FaceForward),
Mf::Reflect => MathOp::Ext(spirv::GLOp::Reflect),
Mf::Refract => MathOp::Ext(spirv::GLOp::Refract),
Mf::Cross => MathOp::Ext(spirv::GlslStd450Op::Cross),
Mf::Distance => MathOp::Ext(spirv::GlslStd450Op::Distance),
Mf::Length => MathOp::Ext(spirv::GlslStd450Op::Length),
Mf::Normalize => MathOp::Ext(spirv::GlslStd450Op::Normalize),
Mf::FaceForward => MathOp::Ext(spirv::GlslStd450Op::FaceForward),
Mf::Reflect => MathOp::Ext(spirv::GlslStd450Op::Reflect),
Mf::Refract => MathOp::Ext(spirv::GlslStd450Op::Refract),
// exponent
Mf::Exp => MathOp::Ext(spirv::GLOp::Exp),
Mf::Exp2 => MathOp::Ext(spirv::GLOp::Exp2),
Mf::Log => MathOp::Ext(spirv::GLOp::Log),
Mf::Log2 => MathOp::Ext(spirv::GLOp::Log2),
Mf::Pow => MathOp::Ext(spirv::GLOp::Pow),
Mf::Exp => MathOp::Ext(spirv::GlslStd450Op::Exp),
Mf::Exp2 => MathOp::Ext(spirv::GlslStd450Op::Exp2),
Mf::Log => MathOp::Ext(spirv::GlslStd450Op::Log),
Mf::Log2 => MathOp::Ext(spirv::GlslStd450Op::Log2),
Mf::Pow => MathOp::Ext(spirv::GlslStd450Op::Pow),
// computational
Mf::Sign => MathOp::Ext(match arg_scalar_kind {
Some(crate::ScalarKind::Float) => spirv::GLOp::FSign,
Some(crate::ScalarKind::Sint) => spirv::GLOp::SSign,
Some(crate::ScalarKind::Float) => spirv::GlslStd450Op::FSign,
Some(crate::ScalarKind::Sint) => spirv::GlslStd450Op::SSign,
other => unimplemented!("Unexpected sign({:?})", other),
}),
Mf::Fma => MathOp::Ext(spirv::GLOp::Fma),
Mf::Fma => MathOp::Ext(spirv::GlslStd450Op::Fma),
Mf::Mix => {
let selector = arg2.unwrap();
let selector_ty =
@@ -1589,27 +1591,27 @@ impl BlockContext<'_> {
MathOp::Custom(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::FMix,
spirv::GlslStd450Op::FMix,
result_type_id,
id,
&[arg0_id, arg1_id, selector_id],
))
}
_ => MathOp::Ext(spirv::GLOp::FMix),
_ => MathOp::Ext(spirv::GlslStd450Op::FMix),
}
}
Mf::Step => MathOp::Ext(spirv::GLOp::Step),
Mf::SmoothStep => MathOp::Ext(spirv::GLOp::SmoothStep),
Mf::Sqrt => MathOp::Ext(spirv::GLOp::Sqrt),
Mf::InverseSqrt => MathOp::Ext(spirv::GLOp::InverseSqrt),
Mf::Inverse => MathOp::Ext(spirv::GLOp::MatrixInverse),
Mf::Step => MathOp::Ext(spirv::GlslStd450Op::Step),
Mf::SmoothStep => MathOp::Ext(spirv::GlslStd450Op::SmoothStep),
Mf::Sqrt => MathOp::Ext(spirv::GlslStd450Op::Sqrt),
Mf::InverseSqrt => MathOp::Ext(spirv::GlslStd450Op::InverseSqrt),
Mf::Inverse => MathOp::Ext(spirv::GlslStd450Op::MatrixInverse),
Mf::Transpose => MathOp::Custom(Instruction::unary(
spirv::Op::Transpose,
result_type_id,
id,
arg0_id,
)),
Mf::Determinant => MathOp::Ext(spirv::GLOp::Determinant),
Mf::Determinant => MathOp::Ext(spirv::GlslStd450Op::Determinant),
Mf::QuantizeToF16 => MathOp::Custom(Instruction::unary(
spirv::Op::QuantizeToF16,
result_type_id,
@@ -1646,7 +1648,7 @@ impl BlockContext<'_> {
let lsb_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::FindILsb,
spirv::GlslStd450Op::FindILsb,
result_type_id,
lsb_id,
&[arg0_id],
@@ -1654,7 +1656,7 @@ impl BlockContext<'_> {
MathOp::Custom(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
result_type_id,
id,
&[uint_id, lsb_id],
@@ -1696,9 +1698,9 @@ impl BlockContext<'_> {
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
if width != 4 {
spirv::GLOp::FindILsb
spirv::GlslStd450Op::FindILsb
} else {
spirv::GLOp::FindUMsb
spirv::GlslStd450Op::FindUMsb
},
int_type_id,
msb_id,
@@ -1752,7 +1754,7 @@ impl BlockContext<'_> {
let offset_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
u32_type,
offset_id,
&[arg1_id, width_constant],
@@ -1772,7 +1774,7 @@ impl BlockContext<'_> {
let count_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
u32_type,
count_id,
&[arg2_id, max_count_id],
@@ -1802,7 +1804,7 @@ impl BlockContext<'_> {
let offset_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
u32_type,
offset_id,
&[arg2_id, width_constant],
@@ -1822,7 +1824,7 @@ impl BlockContext<'_> {
let count_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
u32_type,
count_id,
&[arg3_id, max_count_id],
@@ -1838,12 +1840,12 @@ impl BlockContext<'_> {
count_id,
))
}
Mf::FirstTrailingBit => MathOp::Ext(spirv::GLOp::FindILsb),
Mf::FirstTrailingBit => MathOp::Ext(spirv::GlslStd450Op::FindILsb),
Mf::FirstLeadingBit => {
if arg_ty.scalar_width() == Some(4) {
let thing = match arg_scalar_kind {
Some(crate::ScalarKind::Uint) => spirv::GLOp::FindUMsb,
Some(crate::ScalarKind::Sint) => spirv::GLOp::FindSMsb,
Some(crate::ScalarKind::Uint) => spirv::GlslStd450Op::FindUMsb,
Some(crate::ScalarKind::Sint) => spirv::GlslStd450Op::FindSMsb,
other => unimplemented!("Unexpected firstLeadingBit({:?})", other),
};
MathOp::Ext(thing)
@@ -1851,11 +1853,11 @@ impl BlockContext<'_> {
unreachable!("This is validated out until a polyfill is implemented. https://github.com/gfx-rs/wgpu/issues/5276");
}
}
Mf::Pack4x8unorm => MathOp::Ext(spirv::GLOp::PackUnorm4x8),
Mf::Pack4x8snorm => MathOp::Ext(spirv::GLOp::PackSnorm4x8),
Mf::Pack2x16float => MathOp::Ext(spirv::GLOp::PackHalf2x16),
Mf::Pack2x16unorm => MathOp::Ext(spirv::GLOp::PackUnorm2x16),
Mf::Pack2x16snorm => MathOp::Ext(spirv::GLOp::PackSnorm2x16),
Mf::Pack4x8unorm => MathOp::Ext(spirv::GlslStd450Op::PackUnorm4x8),
Mf::Pack4x8snorm => MathOp::Ext(spirv::GlslStd450Op::PackSnorm4x8),
Mf::Pack2x16float => MathOp::Ext(spirv::GlslStd450Op::PackHalf2x16),
Mf::Pack2x16unorm => MathOp::Ext(spirv::GlslStd450Op::PackUnorm2x16),
Mf::Pack2x16snorm => MathOp::Ext(spirv::GlslStd450Op::PackSnorm2x16),
fun @ (Mf::Pack4xI8 | Mf::Pack4xU8 | Mf::Pack4xI8Clamp | Mf::Pack4xU8Clamp) => {
let is_signed = matches!(fun, Mf::Pack4xI8 | Mf::Pack4xI8Clamp);
let should_clamp = matches!(fun, Mf::Pack4xI8Clamp | Mf::Pack4xU8Clamp);
@@ -1883,11 +1885,11 @@ impl BlockContext<'_> {
MathOp::Custom(last_instruction)
}
Mf::Unpack4x8unorm => MathOp::Ext(spirv::GLOp::UnpackUnorm4x8),
Mf::Unpack4x8snorm => MathOp::Ext(spirv::GLOp::UnpackSnorm4x8),
Mf::Unpack2x16float => MathOp::Ext(spirv::GLOp::UnpackHalf2x16),
Mf::Unpack2x16unorm => MathOp::Ext(spirv::GLOp::UnpackUnorm2x16),
Mf::Unpack2x16snorm => MathOp::Ext(spirv::GLOp::UnpackSnorm2x16),
Mf::Unpack4x8unorm => MathOp::Ext(spirv::GlslStd450Op::UnpackUnorm4x8),
Mf::Unpack4x8snorm => MathOp::Ext(spirv::GlslStd450Op::UnpackSnorm4x8),
Mf::Unpack2x16float => MathOp::Ext(spirv::GlslStd450Op::UnpackHalf2x16),
Mf::Unpack2x16unorm => MathOp::Ext(spirv::GlslStd450Op::UnpackUnorm2x16),
Mf::Unpack2x16snorm => MathOp::Ext(spirv::GlslStd450Op::UnpackSnorm2x16),
fun @ (Mf::Unpack4xI8 | Mf::Unpack4xU8) => {
let is_signed = matches!(fun, Mf::Unpack4xI8);
@@ -2402,7 +2404,7 @@ impl BlockContext<'_> {
let clamp_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::FClamp,
spirv::GlslStd450Op::FClamp,
expr_type_id,
clamp_id,
&[expr_id, min_const_id, max_const_id],
@@ -3168,13 +3170,13 @@ impl BlockContext<'_> {
(
crate::Literal::I32(-128),
crate::Literal::I32(127),
spirv::GLOp::SClamp,
spirv::GlslStd450Op::SClamp,
)
} else {
(
crate::Literal::U32(0),
crate::Literal::U32(255),
spirv::GLOp::UClamp,
spirv::GlslStd450Op::UClamp,
)
};
let [min, max] = [min, max].map(|lit| {
@@ -3268,13 +3270,13 @@ impl BlockContext<'_> {
(
crate::Literal::I32(-128),
crate::Literal::I32(127),
spirv::GLOp::SClamp,
spirv::GlslStd450Op::SClamp,
)
} else {
(
crate::Literal::U32(0),
crate::Literal::U32(255),
spirv::GLOp::UClamp,
spirv::GlslStd450Op::UClamp,
)
};
let [min, max] = [min, max].map(|lit| self.writer.get_constant_scalar(lit));
+3 -3
View File
@@ -448,7 +448,7 @@ impl BlockContext<'_> {
let restricted_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
type_id,
restricted_id,
&[input_id, limit_id],
@@ -582,7 +582,7 @@ impl BlockContext<'_> {
let restricted_coordinates_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
coordinates.type_id,
restricted_coordinates_id,
&[coordinates.value_id, coordinate_limit_id],
@@ -925,7 +925,7 @@ impl BlockContext<'_> {
let clamped_coords_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::NClamp,
spirv::GlslStd450Op::NClamp,
vec2f_type_id,
clamped_coords_id,
&[coordinates.value_id, margin_left_id, margin_right_id],
+1 -1
View File
@@ -368,7 +368,7 @@ impl BlockContext<'_> {
let restricted_index_id = self.gen_id();
block.body.push(Instruction::ext_inst_gl_op(
self.writer.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
self.writer.get_u32_type_id(),
restricted_index_id,
&[index_id, max_index_id],
+1 -1
View File
@@ -158,7 +158,7 @@ impl super::Instruction {
pub(super) fn ext_inst_gl_op(
set_id: Word,
op: spirv::GLOp,
op: spirv::GlslStd450Op,
result_type_id: Word,
id: Word,
operands: &[Word],
+1 -1
View File
@@ -662,7 +662,7 @@ impl super::Writer {
let id = self.id_gen.next();
block.body.push(Instruction::ext_inst_gl_op(
self.gl450_ext_inst_id,
spirv::GLOp::UMin,
spirv::GlslStd450Op::UMin,
u32_id,
id,
&[before_min_id, max],
+1 -1
View File
@@ -1685,7 +1685,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
}
Op::ExtInst => {
use crate::MathFunction as Mf;
use spirv::GLOp as Glo;
use spirv::GlslStd450Op as Glo;
let base_wc = 5;
inst.expect_at_least(base_wc)?;
+3 -3
View File
@@ -871,7 +871,7 @@ impl VaryingContext<'_> {
let span_context = self.types.get_span_context(ty);
// If there's any blend_src usage, it must apply to all members of which there must be exactly 2.
if members.len() != 2 || self.blend_src_mask.len() != 2 {
if members.len() != 2 || self.blend_src_mask.count() != 2 {
return Err(
VaryingError::IncompleteBlendSrcUsage.with_span_context(span_context)
);
@@ -1360,7 +1360,7 @@ impl super::Validator {
}
}
self.location_mask.clear();
self.location_mask.make_empty();
let mut argument_built_ins = crate::FastHashSet::default();
// TODO: add span info to function arguments
for (index, fa) in ep.function.arguments.iter().enumerate() {
@@ -1381,7 +1381,7 @@ impl super::Validator {
.map_err_inner(|e| EntryPointError::Argument(index as u32, e).with_span())?;
}
self.location_mask.clear();
self.location_mask.make_empty();
if let Some(ref fr) = ep.function.result {
let mut result_built_ins = crate::FastHashSet::default();
let mut ctx = VaryingContext {
+2 -2
View File
@@ -637,8 +637,8 @@ impl Validator {
pub fn reset(&mut self) {
self.types.clear();
self.layouter.clear();
self.location_mask.clear();
self.blend_src_mask.clear();
self.location_mask.make_empty();
self.blend_src_mask.make_empty();
self.ep_resource_bindings.clear();
self.switch_values.clear();
self.valid_expression_list.clear();
+1 -1
View File
@@ -15,7 +15,7 @@ pub(crate) struct UniqueIndex<'a, I: Iterator<Item = usize>> {
impl<'a, I: Iterator<Item = usize>> UniqueIndex<'a, I> {
fn new(inner: I, scratch: &'a mut UniqueIndexScratch) -> Self {
scratch.0.clear();
scratch.0.make_empty();
Self { inner, scratch }
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ impl<T: Clone> ResourceMetadata<T> {
pub(super) fn clear(&mut self) {
self.resources.clear();
self.owned.clear();
self.owned.fill(false);
}
/// Ensures a given index is in bounds for all arrays and does