diff --git a/.cargo/config.toml.in b/.cargo/config.toml.in index ffae3e2f6ea4..31551df9ae65 100644 --- a/.cargo/config.toml.in +++ b/.cargo/config.toml.in @@ -40,9 +40,9 @@ git = "https://github.com/franziskuskiefer/cose-rust" rev = "43c22248d136c8b38fe42ea709d08da6355cf04b" replace-with = "vendored-sources" -[source."git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c"] +[source."git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0"] git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" replace-with = "vendored-sources" [source."git+https://github.com/glandium/rust-objc?rev=4de89f5aa9851ceca4d40e7ac1e2759410c04324"] diff --git a/Cargo.lock b/Cargo.lock index e8ae8b8806e1..99491139d3b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,7 +51,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce34de545ad29bcc00cb1b87a94c132256dcf83aa7eeb9674482568405a6ff0a" dependencies = [ "alsa-sys", - "bitflags 2.9.0", + "bitflags 2.7.0", "libc", "nix 0.26.99", ] @@ -451,7 +451,7 @@ dependencies = [ name = "bindgen" version = "0.69.4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cexpr", "clang-sys", "itertools", @@ -484,14 +484,14 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" name = "bitflags" version = "1.999.999" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", ] [[package]] name = "bitflags" -version = "2.9.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" dependencies = [ "serde", ] @@ -998,7 +998,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.10.0", "libc", ] @@ -1293,7 +1293,7 @@ source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=2407441a2f67341a dependencies = [ "atomic", "audio-mixer", - "bitflags 2.9.0", + "bitflags 2.7.0", "coreaudio-sys-utils", "cubeb-backend", "float-cmp", @@ -1623,7 +1623,7 @@ dependencies = [ name = "dom" version = "0.1.0" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "malloc_size_of", ] @@ -2682,7 +2682,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "gpu-alloc-types", ] @@ -2692,7 +2692,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", ] [[package]] @@ -2713,7 +2713,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "gpu-descriptor-types", "hashbrown 0.14.5", ] @@ -2724,7 +2724,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", ] [[package]] @@ -3799,7 +3799,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block", "core-graphics-types 0.1.999", "foreign-types", @@ -3909,7 +3909,7 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cd8a9fb054833d2f402e82e256aeef544e595e45fe8fca2de6d03ed605f6647" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "debugid", "num-derive", "num-traits", @@ -3942,7 +3942,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c75ff36a030d76801ed7ec3ea4ae45f12c0f1297f3447790288194274e9aa98" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "cfg-if", "crash-context", @@ -4237,7 +4237,7 @@ dependencies = [ "allocator-api2", "arrayvec", "bindgen 0.69.4", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "bytes", "cc", @@ -4423,11 +4423,11 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664" [[package]] name = "naga" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.9.0", + "bitflags 2.7.0", "cfg_aliases", "codespan-reporting", "hashbrown 0.14.5", @@ -4598,7 +4598,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cfg-if", "cfg_aliases", "libc", @@ -4654,7 +4654,7 @@ dependencies = [ name = "nsstring" version = "0.1.0" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "encoding_rs", ] @@ -4874,7 +4874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ec3b43050c38ffb9de87e17d874e9956e3a9131b343c9b7b7002597727c3891" dependencies = [ "arrayvec", - "bitflags 2.9.0", + "bitflags 2.7.0", "thiserror 1.999.999", "zerocopy", "zerocopy-derive", @@ -5115,7 +5115,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "hex", ] @@ -5172,7 +5172,7 @@ name = "pulse" version = "0.3.0" source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=8678dcab1c287de79c4c184ccc2e065bc62b70e2#8678dcab1c287de79c4c184ccc2e065bc62b70e2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "pulse-ffi", ] @@ -5432,7 +5432,7 @@ checksum = "2c6d906922d99c677624d2042a93f89b2b7df0f6411032237d5d99a602c2487c" dependencies = [ "arrayref", "bincode", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "id-arena", "lazy_static", @@ -5476,7 +5476,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.3", - "bitflags 2.9.0", + "bitflags 2.7.0", "serde", "serde_derive", ] @@ -5519,7 +5519,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -5593,7 +5593,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "errno", "libc", "linux-raw-sys", @@ -5678,7 +5678,7 @@ dependencies = [ name = "selectors" version = "0.26.0" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cssparser", "derive_more 0.99.999", "fxhash", @@ -5946,7 +5946,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", ] [[package]] @@ -6056,7 +6056,7 @@ dependencies = [ "arrayvec", "atomic_refcell", "bindgen 0.69.4", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "cssparser", "derive_more 0.99.999", @@ -6120,7 +6120,7 @@ name = "style_traits" version = "0.0.1" dependencies = [ "app_units", - "bitflags 2.9.0", + "bitflags 2.7.0", "cssparser", "euclid", "lazy_static", @@ -7091,7 +7091,7 @@ version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "indexmap", ] @@ -7163,7 +7163,7 @@ version = "0.62.0" dependencies = [ "allocator-api2", "bincode", - "bitflags 2.9.0", + "bitflags 2.7.0", "build-parallel", "byteorder", "derive_more 0.99.999", @@ -7200,7 +7200,7 @@ name = "webrender_api" version = "0.62.0" dependencies = [ "app_units", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "crossbeam-channel", "euclid", @@ -7248,7 +7248,7 @@ dependencies = [ name = "webrender_build" version = "0.0.2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "lazy_static", "serde", ] @@ -7275,11 +7275,11 @@ dependencies = [ [[package]] name = "wgpu-core" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.9.0", + "bitflags 2.7.0", "cfg_aliases", "document-features", "hashbrown 0.14.5", @@ -7303,7 +7303,7 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ "wgpu-hal", ] @@ -7311,7 +7311,7 @@ dependencies = [ [[package]] name = "wgpu-core-deps-windows-linux-android" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ "wgpu-hal", ] @@ -7319,13 +7319,13 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.9.0", + "bitflags 2.7.0", "block", "cfg_aliases", "core-graphics-types 0.1.999", @@ -7354,9 +7354,9 @@ dependencies = [ [[package]] name = "wgpu-types" version = "24.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c#dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +source = "git+https://github.com/gfx-rs/wgpu?rev=93f64dc847a0e6788b17b292ae4d7d59361e3be0#93f64dc847a0e6788b17b292ae4d7d59361e3be0" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "js-sys", "log", "serde", diff --git a/gfx/wgpu_bindings/Cargo.toml b/gfx/wgpu_bindings/Cargo.toml index 3a02fd31e0a4..acfacd058d7c 100644 --- a/gfx/wgpu_bindings/Cargo.toml +++ b/gfx/wgpu_bindings/Cargo.toml @@ -17,7 +17,7 @@ default = [] [dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" # TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182 features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info", "indirect-validation"] @@ -26,32 +26,32 @@ features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" features = ["metal"] # We want the wgpu-core Direct3D backends on Windows. [target.'cfg(windows)'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" features = ["dx12"] # We want the wgpu-core Vulkan backend on Linux and Windows. [target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" features = ["vulkan"] [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" [dependencies.wgh] package = "wgpu-hal" git = "https://github.com/gfx-rs/wgpu" -rev = "dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +rev = "93f64dc847a0e6788b17b292ae4d7d59361e3be0" features = ["oom_panic", "device_lost_panic", "internal_error_panic"] [target.'cfg(windows)'.dependencies] diff --git a/gfx/wgpu_bindings/moz.yaml b/gfx/wgpu_bindings/moz.yaml index 7832de51c2d6..8e4cf0207b91 100644 --- a/gfx/wgpu_bindings/moz.yaml +++ b/gfx/wgpu_bindings/moz.yaml @@ -20,11 +20,11 @@ origin: # Human-readable identifier for this version/release # Generally "version NNN", "tag SSS", "bookmark SSS" - release: dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c (2025-03-07T03:44:36Z). + release: commit 93f64dc847a0e6788b17b292ae4d7d59361e3be0 # Revision to pull in # Must be a long or short commit SHA (long preferred) - revision: dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c + revision: 93f64dc847a0e6788b17b292ae4d7d59361e3be0 license: ['MIT', 'Apache-2.0'] diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index c265b4e0c1d4..2a738fc0bd50 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -3583,12 +3583,9 @@ criteria = "safe-to-deploy" delta = "23.1.0 -> 24.0.0" [[audits.naga]] -who = [ - "Teodor Tanasoaia ", - "Erich Gubler ", -] +who = "Teodor Tanasoaia " criteria = "safe-to-deploy" -delta = "24.0.0 -> 24.0.0@git:dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +delta = "24.0.0 -> 24.0.0@git:93f64dc847a0e6788b17b292ae4d7d59361e3be0" importable = false [[audits.net2]] @@ -5795,12 +5792,9 @@ criteria = "safe-to-deploy" delta = "23.0.1 -> 24.0.0" [[audits.wgpu-core]] -who = [ - "Teodor Tanasoaia ", - "Erich Gubler ", -] +who = "Teodor Tanasoaia " criteria = "safe-to-deploy" -delta = "24.0.0 -> 24.0.0@git:dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +delta = "24.0.0 -> 24.0.0@git:93f64dc847a0e6788b17b292ae4d7d59361e3be0" importable = false [[audits.wgpu-hal]] @@ -5882,12 +5876,9 @@ criteria = "safe-to-deploy" delta = "23.0.1 -> 24.0.0" [[audits.wgpu-hal]] -who = [ - "Teodor Tanasoaia ", - "Erich Gubler ", -] +who = "Teodor Tanasoaia " criteria = "safe-to-deploy" -delta = "24.0.0 -> 24.0.0@git:dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +delta = "24.0.0 -> 24.0.0@git:93f64dc847a0e6788b17b292ae4d7d59361e3be0" importable = false [[audits.wgpu-types]] @@ -5964,12 +5955,9 @@ criteria = "safe-to-deploy" delta = "23.0.0 -> 24.0.0" [[audits.wgpu-types]] -who = [ - "Teodor Tanasoaia ", - "Erich Gubler ", -] +who = "Teodor Tanasoaia " criteria = "safe-to-deploy" -delta = "24.0.0 -> 24.0.0@git:dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c" +delta = "24.0.0 -> 24.0.0@git:93f64dc847a0e6788b17b292ae4d7d59361e3be0" importable = false [[audits.whatsys]] diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index bda6a14ed019..b4b601b88792 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -997,34 +997,6 @@ criteria = "safe-to-deploy" version = "0.21.0" notes = "This crate has no dependencies, no build.rs, and contains no unsafe code." -[[audits.bytecode-alliance.audits.bitflags]] -who = "Jamey Sharp " -criteria = "safe-to-deploy" -delta = "2.1.0 -> 2.2.1" -notes = """ -This version adds unsafe impls of traits from the bytemuck crate when built -with that library enabled, but I believe the impls satisfy the documented -safety requirements for bytemuck. The other changes are minor. -""" - -[[audits.bytecode-alliance.audits.bitflags]] -who = "Alex Crichton " -criteria = "safe-to-deploy" -delta = "2.3.2 -> 2.3.3" -notes = """ -Nothing outside the realm of what one would expect from a bitflags generator, -all as expected. -""" - -[[audits.bytecode-alliance.audits.bitflags]] -who = "Alex Crichton " -criteria = "safe-to-deploy" -delta = "2.4.1 -> 2.6.0" -notes = """ -Changes in how macros are invoked and various bits and pieces of macro-fu. -Otherwise no major changes and nothing dealing with `unsafe`. -""" - [[audits.bytecode-alliance.audits.block-buffer]] who = "Benjamin Bouvier " criteria = "safe-to-deploy" @@ -1376,31 +1348,31 @@ aggregated-from = "https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/th [[audits.google.audits.bitflags]] who = "Lukasz Anforowicz " criteria = "safe-to-deploy" -version = "1.3.2" +version = "2.4.2" notes = """ -Security review of earlier versions of the crate can be found at -(Google-internal, sorry): go/image-crate-chromium-security-review +Audit notes: -The crate exposes a function marked as `unsafe`, but doesn't use any -`unsafe` blocks (except for tests of the single `unsafe` function). I -think this justifies marking this crate as `ub-risk-1`. - -Additional review comments can be found at https://crrev.com/c/4723145/31 +* I've checked for any discussion in Google-internal cl/546819168 (where audit + of version 2.3.3 happened) +* `src/lib.rs` contains `#![cfg_attr(not(test), forbid(unsafe_code))]` +* There are 2 cases of `unsafe` in `src/external.rs` but they seem to be + correct in a straightforward way - they just propagate the marker trait's + impl (e.g. `impl bytemuck::Pod`) from the inner to the outer type +* Additional discussion and/or notes may be found in https://crrev.com/c/5238056 """ aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" [[audits.google.audits.bitflags]] -who = "Lukasz Anforowicz " +who = "Adrian Taylor " criteria = "safe-to-deploy" -delta = "2.6.0 -> 2.8.0" -notes = "No changes related to `unsafe impl ... bytemuck` pieces from `src/external.rs`." +delta = "2.4.2 -> 2.5.0" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" [[audits.google.audits.bitflags]] -who = "Daniel Cheng " +who = "Adrian Taylor " criteria = "safe-to-deploy" -delta = "2.8.0 -> 2.9.0" -notes = "Adds a straightforward clear() function, but no new unsafe code." +delta = "2.5.0 -> 2.6.0" +notes = "The changes from the previous version are negligible and thus it retains the same properties." aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" [[audits.google.audits.bitreader]] @@ -1917,13 +1889,6 @@ version = "0.1.2" notes = "TOML parser, forked from toml 0.5" aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" -[[audits.mozilla.audits.bitflags]] -who = "Jan-Erik Rediger " -criteria = "safe-to-deploy" -delta = "2.4.0 -> 2.4.1" -notes = "Only allowing new clippy lints" -aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" - [[audits.mozilla.audits.crossbeam-channel]] who = "Jan-Erik Rediger " criteria = "safe-to-deploy" diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/render_pipeline/sample_mask/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/render_pipeline/sample_mask/cts.https.html.ini index 5e963586601e..8ea9de807d0f 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/render_pipeline/sample_mask/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/render_pipeline/sample_mask/cts.https.html.ini @@ -102,10 +102,10 @@ expected: if os == "win": [OK, ERROR] [:interpolated=false;sampleCount=1;rasterizationMask=0] + expected: FAIL [:interpolated=false;sampleCount=1;rasterizationMask=1] - expected: - if os == "mac": FAIL + expected: FAIL [:interpolated=false;sampleCount=4;rasterizationMask=0] expected: FAIL @@ -156,10 +156,10 @@ expected: FAIL [:interpolated=true;sampleCount=1;rasterizationMask=0] + expected: FAIL [:interpolated=true;sampleCount=1;rasterizationMask=1] - expected: - if os == "mac": FAIL + expected: FAIL [:interpolated=true;sampleCount=4;rasterizationMask=0] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxBufferSize/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxBufferSize/cts.https.html.ini index 1f310648a640..1ce50e3302b3 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxBufferSize/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxBufferSize/cts.https.html.ini @@ -7,8 +7,6 @@ [:limitTest="atDefault";testValueName="overLimit"] [:limitTest="atMaximum";testValueName="atLimit"] - expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxColorAttachmentBytesPerSample/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxColorAttachmentBytesPerSample/cts.https.html.ini index f0f2ff6e6959..c78d927e2acf 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxColorAttachmentBytesPerSample/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxColorAttachmentBytesPerSample/cts.https.html.ini @@ -72,11 +72,7 @@ if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] - expected: - if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + expected: FAIL [:limitTest="atDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: @@ -87,11 +83,7 @@ if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] - expected: - if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + expected: FAIL [:limitTest="atDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: @@ -108,7 +100,7 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -119,7 +111,7 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -136,7 +128,7 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -147,7 +139,7 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -166,7 +158,8 @@ [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -179,7 +172,8 @@ [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -199,7 +193,8 @@ [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -212,7 +207,8 @@ [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -230,7 +226,7 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -241,7 +237,6 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -258,7 +253,7 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -269,7 +264,7 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -288,7 +283,8 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -301,7 +297,8 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -321,7 +318,8 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -334,7 +332,8 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux": [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -352,7 +351,7 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -363,7 +362,7 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -380,7 +379,7 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -391,7 +390,7 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -408,7 +407,7 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -419,7 +418,7 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -436,7 +435,7 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -447,7 +446,7 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: - if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -464,7 +463,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -474,7 +472,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -490,7 +487,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -501,7 +497,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -520,8 +515,7 @@ [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] @@ -534,8 +528,7 @@ [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] @@ -555,8 +548,7 @@ [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] @@ -569,8 +561,7 @@ [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "win": FAIL - if os == "linux" and debug: FAIL - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] @@ -680,7 +671,6 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -688,7 +678,6 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -699,7 +688,6 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -707,7 +695,6 @@ [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -719,8 +706,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -729,8 +715,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -742,8 +727,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -752,8 +736,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -767,7 +750,6 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: @@ -778,7 +760,6 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: @@ -792,7 +773,6 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -800,7 +780,6 @@ [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -812,8 +791,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -822,8 +800,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -835,8 +812,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -845,8 +821,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [FAIL, TIMEOUT, NOTRUN] @@ -857,7 +832,6 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -865,7 +839,6 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -876,7 +849,6 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -884,7 +856,6 @@ [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -895,7 +866,6 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -903,7 +873,6 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -914,7 +883,6 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -922,7 +890,6 @@ [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: [PASS, TIMEOUT, NOTRUN] @@ -958,7 +925,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rg16uint"] expected: if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: @@ -968,7 +934,6 @@ [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba16uint"] expected: if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: @@ -986,8 +951,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rg8unorm"] expected: @@ -1000,8 +964,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";sampleCount=1;interleaveFormat="rgba8unorm"] expected: @@ -1021,8 +984,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rg8unorm"] expected: @@ -1035,8 +997,7 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";sampleCount=4;interleaveFormat="rgba8unorm"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxComputeWorkgroupsPerDimension/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxComputeWorkgroupsPerDimension/cts.https.html.ini index 5bbe219fc460..6660c4fa1d72 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxComputeWorkgroupsPerDimension/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxComputeWorkgroupsPerDimension/cts.https.html.ini @@ -316,15 +316,13 @@ expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=2] expected: if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and debug: FAIL - if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=0] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage/cts.https.html.ini index 408a016fe527..921b8dbd0c7b 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage/cts.https.html.ini @@ -942,17 +942,14 @@ [:limitTest="atDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="backward"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="forward"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="shiftByHalf"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="atLimit";visibility=6;type="storage";order="backward"] @@ -965,17 +962,14 @@ [:limitTest="atDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="backward"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="forward"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="shiftByHalf"] expected: if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="atDefault";testValueName="overLimit";visibility=1;type="read-only-storage";order="backward"] expected: @@ -1712,181 +1706,151 @@ expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=1;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=1;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=2;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=4;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=6;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";visibility=1;type="read-only-storage";order="backward"] expected: @@ -2162,541 +2126,451 @@ expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=1;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=1;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=2;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=3;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=4;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=5;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=6;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";visibility=7;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=1;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=1;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=1;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=2;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=3;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=3;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=3;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=4;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=5;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=5;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=5;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=6;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=7;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=7;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";visibility=7;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=1;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=1;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=1;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=2;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=3;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=3;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=3;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=4;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=5;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=5;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=5;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=6;type="storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="backward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="forward"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";visibility=7;type="read-only-storage";order="shiftByHalf"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";visibility=1;type="read-only-storage";order="backward"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageTexturesPerShaderStage/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageTexturesPerShaderStage/cts.https.html.ini index 051c08b8a15e..c071be18531a 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageTexturesPerShaderStage/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxStorageTexturesPerShaderStage/cts.https.html.ini @@ -785,7 +785,10 @@ [cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxStorageTexturesPerShaderStage:createPipeline,at_over:*] implementation-status: backlog - expected: [OK, TIMEOUT] + expected: + if os == "win" and debug: [OK, TIMEOUT] + if os == "linux": [OK, TIMEOUT] + if os == "mac": [OK, TIMEOUT] [:limitTest="atDefault";testValueName="atLimit";async=false;bindingCombination="compute";access="read-only"] [:limitTest="atDefault";testValueName="atLimit";async=false;bindingCombination="compute";access="read-write"] @@ -864,558 +867,450 @@ [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="atMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux": [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="overMaximum";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";async=false;bindingCombination="compute";access="read-only"] @@ -1441,8 +1336,6 @@ [:limitTest="underDefault";testValueName="atLimit";async=true;bindingCombination="compute";access="read-write"] [:limitTest="underDefault";testValueName="atLimit";async=true;bindingCombination="compute";access="write-only"] - expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="atLimit";async=true;bindingCombination="fragment";access="read-only"] @@ -1458,101 +1351,80 @@ [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux" and debug: FAIL if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-only"] - expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="fragment";access="read-write"] - expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux" and debug: FAIL if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="vertex";access="read-only"] - expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="compute";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="compute";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="compute";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux" and debug: FAIL if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="fragment";access="read-write"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="fragment";access="write-only"] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": FAIL if os == "linux" and debug: FAIL if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": FAIL [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="vertex";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleFragmentStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:limitTest="underDefault";testValueName="overLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";access="read-only"] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleBias/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleBias/cts.https.html.ini index f4d0d7a27512..2859765d78b2 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleBias/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleBias/cts.https.html.ini @@ -10438,18 +10438,30 @@ [:format="bc2-rgba-unorm";filt="linear";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm";filt="linear";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm";filt="linear";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm";filt="nearest";mode="c"] expected: @@ -10458,78 +10470,138 @@ [:format="bc2-rgba-unorm";filt="nearest";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm";filt="nearest";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="linear";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="linear";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="linear";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="nearest";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="nearest";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc2-rgba-unorm-srgb";filt="nearest";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="linear";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="linear";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="linear";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="nearest";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="nearest";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm";filt="nearest";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm-srgb";filt="linear";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm-srgb";filt="linear";mode="m"] expected: @@ -10538,23 +10610,39 @@ [:format="bc3-rgba-unorm-srgb";filt="linear";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="c"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="m"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="r"] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="bc4-r-snorm";filt="linear";mode="c"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini index c89a92cd3e66..b1768b0d2149 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini @@ -852,33 +852,31 @@ [:format="depth24plus";filt="nearest";modeU="c";modeV="m";offset=false] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win": FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac": FAIL [:format="depth24plus";filt="nearest";modeU="c";modeV="m";offset=true] expected: - if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win": FAIL if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux" and not debug: FAIL - if os == "mac" and debug: [TIMEOUT, NOTRUN] - if os == "mac" and not debug: FAIL + if os == "mac": FAIL [:format="depth24plus";filt="nearest";modeU="c";modeV="r";offset=false] expected: if os == "win": FAIL if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux" and not debug: FAIL - if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and not debug: FAIL + if os == "mac": FAIL [:format="depth24plus";filt="nearest";modeU="c";modeV="r";offset=true] expected: if os == "win": FAIL if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux" and not debug: FAIL - if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac" and not debug: FAIL + if os == "mac": FAIL [:format="depth24plus";filt="nearest";modeU="m";modeV="c";offset=false] expected: @@ -912,8 +910,11 @@ [:format="depth24plus";filt="nearest";modeU="r";modeV="c";offset=false] expected: - if debug: [FAIL, TIMEOUT, NOTRUN] - if not debug: FAIL + if os == "win": FAIL + if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="depth24plus";filt="nearest";modeU="r";modeV="c";offset=true] expected: @@ -1229,25 +1230,13 @@ if os == "mac" and not debug: FAIL [:format="depth32float";filt="linear";modeU="c";modeV="c";offset=false] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="linear";modeU="c";modeV="c";offset=true] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="linear";modeU="c";modeV="m";offset=false] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="linear";modeU="c";modeV="m";offset=true] expected: @@ -1257,18 +1246,10 @@ if os == "mac": FAIL [:format="depth32float";filt="linear";modeU="c";modeV="r";offset=false] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="linear";modeU="c";modeV="r";offset=true] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="linear";modeU="m";modeV="c";offset=false] expected: @@ -1379,18 +1360,10 @@ expected: FAIL [:format="depth32float";filt="nearest";modeU="m";modeV="m";offset=false] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="nearest";modeU="m";modeV="m";offset=true] - expected: - if os == "win": FAIL - if os == "linux" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:format="depth32float";filt="nearest";modeU="m";modeV="r";offset=false] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini index ac3d9b7ad769..50ac3590e09f 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini @@ -25774,7 +25774,7 @@ tags: [webgpu, webgpu-long] implementation-status: backlog expected: - if os == "win": CRASH + if os == "win" and debug: CRASH if os == "linux" and debug: CRASH if os == "mac": CRASH [:stage="c";format="astc-10x10-unorm";filt="linear";modeU="c";modeV="c";offset=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini index 279bff16f5b8..06f8f77076fe 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini @@ -1,5 +1,7 @@ [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureStore:bgra8unorm_swizzle:*] + implementation-status: backlog [:] + expected: FAIL [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/workgroupUniformLoad/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/workgroupUniformLoad/cts.https.html.ini index 72cd2043c54d..1d6cf2b04897 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/workgroupUniformLoad/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/workgroupUniformLoad/cts.https.html.ini @@ -1,26 +1,16 @@ [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,workgroupUniformLoad:types:*] - implementation-status: - if os == "win": backlog - if os == "mac": backlog + implementation-status: backlog [:type="ComplexStruct";wgsize=[1,128\]] - expected: - if os == "win": FAIL - if os == "mac": FAIL + expected: FAIL [:type="ComplexStruct";wgsize=[1,1\]] - expected: - if os == "win": FAIL - if os == "mac": FAIL + expected: FAIL [:type="ComplexStruct";wgsize=[16,16\]] - expected: - if os == "win": FAIL - if os == "mac": FAIL + expected: FAIL [:type="ComplexStruct";wgsize=[3,7\]] - expected: - if os == "win": FAIL - if os == "mac": FAIL + expected: FAIL [:type="SimpleStruct";wgsize=[1,128\]] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/zero_init/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/zero_init/cts.https.html.ini index 322f2a723289..415e1e1e3300 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/zero_init/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/zero_init/cts.https.html.ini @@ -4,7 +4,6 @@ expected: if os == "win" and not debug: CRASH if os == "linux" and debug: [OK, CRASH] - if os == "linux" and not debug: CRASH [:addressSpace="function";workgroupSize=[1,1,1\];batch__=0] expected: if os == "win" and debug: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/array/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/array/cts.https.html.ini index 107b043f4fad..2aa9afcdb674 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/array/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/array/cts.https.html.ini @@ -20,14 +20,17 @@ expected: FAIL [:case="override_oob_neg"] + expected: FAIL [:case="override_oob_pos"] + expected: FAIL [:case="runtime_array_const_oob_neg"] [:case="runtime_array_override_oob_neg"] [:case="runtime_in_bounds"] + expected: FAIL [:case="runtime_oob_neg"] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/matrix/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/matrix/cts.https.html.ini index fc8c8fe5fea4..4bac62d0db30 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/matrix/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/access/matrix/cts.https.html.ini @@ -20,14 +20,17 @@ expected: FAIL [:case="override_oob_neg"] + expected: FAIL [:case="override_oob_pos"] + expected: FAIL [:case="runtime_array_const_oob_neg"] [:case="runtime_array_override_oob_neg"] [:case="runtime_in_bounds"] + expected: FAIL [:case="runtime_oob_neg"] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/short_circuiting_and_or/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/short_circuiting_and_or/cts.https.html.ini index 61c360cd027f..ee06d27c1bf6 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/short_circuiting_and_or/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/short_circuiting_and_or/cts.https.html.ini @@ -111,6 +111,7 @@ expected: FAIL [:op="%26%26";rhs="overflow";short_circuit=false] + expected: FAIL [:op="%26%26";rhs="overflow";short_circuit=true] expected: FAIL @@ -131,6 +132,7 @@ expected: FAIL [:op="%7C%7C";rhs="overflow";short_circuit=false] + expected: FAIL [:op="%7C%7C";rhs="overflow";short_circuit=true] expected: FAIL @@ -154,6 +156,7 @@ expected: FAIL [:op="%26%26";rhs="overflow";short_circuit=false] + expected: FAIL [:op="%26%26";rhs="overflow";short_circuit=true] expected: FAIL @@ -174,6 +177,7 @@ expected: FAIL [:op="%7C%7C";rhs="overflow";short_circuit=false] + expected: FAIL [:op="%7C%7C";rhs="overflow";short_circuit=true] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures/cts.https.html.ini index 1e3caf761c63..24becc025f55 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures/cts.https.html.ini @@ -1,7 +1,5 @@ [cts.https.html?q=webgpu:shader,validation,extension,readonly_and_readwrite_storage_textures:textureBarrier:*] - implementation-status: backlog [:] - expected: FAIL [cts.https.html?q=webgpu:shader,validation,extension,readonly_and_readwrite_storage_textures:var_decl:*] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/shadow_builtins/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/shadow_builtins/cts.https.html.ini index 71df8a014c74..de147ec41686 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/shadow_builtins/cts.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/shadow_builtins/cts.https.html.ini @@ -58,8 +58,10 @@ [:inject="module"] [:inject="none"] + expected: FAIL [:inject="sibling"] + expected: FAIL [cts.https.html?q=webgpu:shader,validation,parse,shadow_builtins:shadow_hides_builtin_f16:*] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/getCurrentTexture/dedicated.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/getCurrentTexture/dedicated.https.html.ini index aa40e3acfeb0..df6a37c32dca 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/getCurrentTexture/dedicated.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/getCurrentTexture/dedicated.https.html.ini @@ -11,8 +11,7 @@ expected: if os == "win" and debug: [OK, ERROR] if os == "win" and not debug: ERROR - if os == "linux" and debug: [OK, ERROR] - if os == "linux" and not debug: ERROR + if os == "linux": ERROR if os == "mac": ERROR [:canvasType="offscreen";prevFrameCallsite="requestAnimationFrame";getCurrentTextureAgain=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/dedicated.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/dedicated.https.html.ini index bd204bdc8762..a03c5ac44915 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/dedicated.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/dedicated.https.html.ini @@ -352,7 +352,9 @@ [dedicated.https.html?worker=dedicated&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_huge_size:*] + implementation-status: backlog [:] + expected: FAIL [dedicated.https.html?worker=dedicated&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_unconfigured_nonzero_size:*] @@ -367,6 +369,7 @@ [dedicated.https.html?worker=dedicated&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_zero_size:*] implementation-status: backlog [:configure=false] + expected: FAIL [:configure=true] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/shared.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/shared.https.html.ini index b83deeb4d5b0..734ede5d1b22 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/shared.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/shared.https.html.ini @@ -352,7 +352,9 @@ [shared.https.html?worker=shared&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_huge_size:*] + implementation-status: backlog [:] + expected: FAIL [shared.https.html?worker=shared&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_unconfigured_nonzero_size:*] @@ -367,6 +369,7 @@ [shared.https.html?worker=shared&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_zero_size:*] implementation-status: backlog [:configure=false] + expected: FAIL [:configure=true] expected: FAIL diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini index 3d89ddf63c4b..7692bc5b86f2 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini @@ -796,7 +796,6 @@ [:alpha="none";orientation="none";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="r16float";dstPremultiplied=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -963,7 +962,6 @@ [:alpha="none";orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba32float";dstPremultiplied=true] expected: if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:alpha="none";orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba8unorm";dstPremultiplied=false] @@ -2817,7 +2815,6 @@ [:orientation="none";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="r16float";dstPremultiplied=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -2988,7 +2985,6 @@ [:orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba32float";dstPremultiplied=true] expected: if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba8unorm";dstPremultiplied=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini index 2691a91a08e1..a106a23b6857 100644 --- a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini +++ b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini @@ -964,7 +964,6 @@ [:alpha="none";orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba32float";dstPremultiplied=true] expected: if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:alpha="none";orientation="none";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="rgba8unorm";dstPremultiplied=false] @@ -1380,8 +1379,7 @@ if os == "win": [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="none";colorSpaceConversion="default";srcFlipYInCopy=false;dstFormat="bgra8unorm";dstPremultiplied=false] expected: diff --git a/third_party/rust/bitflags/.cargo-checksum.json b/third_party/rust/bitflags/.cargo-checksum.json index 77ada2c97378..720a2bb0851f 100644 --- a/third_party/rust/bitflags/.cargo-checksum.json +++ b/third_party/rust/bitflags/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"f8561b74af7d35cb8ab137a49b6909aec5f170436627861b6588b6d2ef87f62c","CODE_OF_CONDUCT.md":"42634d0f6d922f49857175af991802822f7f920487aefa2ee250a50d12251a66","CONTRIBUTING.md":"6c9f96eacb20af877ae2d16f024904f3038b93448a8488e9dbcac0df7f6439a5","Cargo.lock":"c015d2383bb7be3d8b925429edde2de35958db71da031b4a11a78dd382f621b4","Cargo.toml":"35d0e72b650c99012bd5359e8ec58c0f613aaea8c35a11ca0cb8a7352f799bc6","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"4f3444268f136cd4e49aafd68921597ae1ec9373778fb23ce91874635e6b2d51","SECURITY.md":"68704c8128fa2e776ed7cbda741fbf61ad52f998a96350ee7ee4dbf64c6573bc","benches/parse.rs":"f1390d62322c6880d65bd931e183d49b313f287879a6bfaa36b1cb1921090b51","examples/custom_bits_type.rs":"e53b32051adc5d97860e0b48c8f3a301a041d73b4939c0d7caa5f0cfcc0b9739","examples/custom_derive.rs":"730589695eb68dda21d0d9f69e90cbdbf9823b13d6f16c5f22b0083c00981813","examples/fmt.rs":"87ba37a1fb8528570c74ea26d8e8948e1179c3d867b928bea1080880258e0a99","examples/macro_free.rs":"69e7f284b53b5214d51228a686e87f127b52a3b74711e45537ebfa5583a180e5","examples/serde.rs":"08b21b35d5c10fdca132fe0f36c8067bb44f559e96617a9257ab6316a20cbc75","spec.md":"fcdd939df30c59b0643be09027df664b71cbea9b9989185441482c5576160fed","src/example_generated.rs":"d018caf059f6ffc4c2403b771a6d76679fa5af03c329a91bd9252957df695e7f","src/external.rs":"734d3f470e6a669297d2df421ce3976fe613d8aa9c071d5ce6fe3ca890e5b815","src/external/arbitrary.rs":"43908bb4fe0a076078dcb3fa70c654aaed8c7b38aa66574414165a82037def83","src/external/bytemuck.rs":"3afcef382122867040fddd5e4153d633d1ed5596fe5d7dfac66a8e61c2513df5","src/external/serde.rs":"4a09db12534a20fe554a08dc5f1c8124b379292d41fa75628abcd2ca21587573","src/internal.rs":"645b13af0c7302258df61239073a4b8203d09f27b6c17f8a6f1f8c3e427f5334","src/iter.rs":"dbaa6437c1c044f689185ce3fafe43df8796bed19bbdd2c20334a52de5eeee73","src/lib.rs":"2bf548fc73823263c29a6199704fc63fdc97023656fa61d470baf38fd091b78d","src/parser.rs":"4e788b29f5d0542c409a8b43c703bcb4a6c2a57c181cadd17f565f0abb39681e","src/public.rs":"78ba06e1a5830b36960adf9bd79aaf47d783b9b8a0f1fa33b0d7a340c15fd1d1","src/tests.rs":"8e480dc78bd29bbb62cfaf62c3c8f779b39f96edc1e83f230a353296bfb4ffff","src/tests/all.rs":"e99a865cd4271a524c2fe95503e96d851b35990570aed6fb2e9dac7a14da31b6","src/tests/bitflags_match.rs":"601ad186930908b681f24312132000518fc927ba569d394e5c4440462f037aec","src/tests/bits.rs":"3840c34b2ea5d1802404b9ce5bcc1d3fa6ccd8dfba2e29e6d07c605f817d90df","src/tests/clear.rs":"6976fcda2f3367c8219485d33bd5d754da6769770cf164c12baace010ad7686d","src/tests/complement.rs":"d0e6d4c3daf49e0a7438c9f1c1ac91fad1b37f258c03593f6cd6a695ee626f5e","src/tests/contains.rs":"58bb3cb8c86550e775d11134da1d4aca85c83f943ea454e3a5f222772c674a24","src/tests/difference.rs":"d0d2b96bb52658b8ac019210da74ca75a53e76622f668855142ea6e97c28cb0e","src/tests/empty.rs":"817d6e93ced7cb7576ff0e334aa1a44703f3f96871ff2c6bdcb8f207e6551f67","src/tests/eq.rs":"b816767680a029e9c163e37af074dd4e604c4a3e4936f829f0ca3774fd5f0e37","src/tests/extend.rs":"5fabb9fd0254c64da019149c24063fceff72da3eb4ad73b57c1cc4c04b008364","src/tests/flags.rs":"2f48d3a25db1cf66fe98c9959abc70875deb9f7b38b2c278dc70c46e0d4ec277","src/tests/fmt.rs":"a2d4148491f3202f030f63633eee941b741e3be29a68cf376f008dbe5cb11e5c","src/tests/from_bits.rs":"d94c65b88bf89961d0cfc1b3152a7f1acc285bae160a1628438effda11b8e2c1","src/tests/from_bits_retain.rs":"980591dfaf91e940f42d9a1ce890f237514dd59d458fc264abcf9ceabbc40677","src/tests/from_bits_truncate.rs":"d3406b5e107ebb6449b98a59eee6cc5d84f947d4aaee1ee7e80dc7202de179f0","src/tests/from_name.rs":"f4a055d1f3c86decef70ef8f3020cef5c4e229718c20b3d59d5a3abc3a8b1298","src/tests/insert.rs":"3fab5da800a6fc0654dfb5f859f95da65a507eb9fda8695083c2712266dff0b9","src/tests/intersection.rs":"baf1454c9e4eba552264870a556ee0032d9f2bb8cac361833d571235e0b52221","src/tests/intersects.rs":"c55e36179fd8bc636f04ea9bbce346dcaafe57915d13f1df28c5b83117dbd08e","src/tests/is_all.rs":"b2f11faa7c954bd85c8fb39999e0c37d983cf7895152bc13c7ddde106aa33b6d","src/tests/is_empty.rs":"11f21323cdca7ff92dd89e09de667dba69e8dce88e2d3e27ea68ace91d15d070","src/tests/iter.rs":"4ba121932b527e787b82745405c7c65c1084c242e2dda3290d475ec160d265e4","src/tests/parser.rs":"fa2fb8dedcf16601af609a5e21d9c5840c7f96a1e3a587f7f2ea3dc8387f7628","src/tests/remove.rs":"6e75f8508d2dc1a2cba89ef691f4387a665a4fd13853bb1dd0fd80c783b89947","src/tests/symmetric_difference.rs":"0a89f084f9de1dd5b1932fe72c3b10a3c93cbaa16832b3a31b6a85e3bbd3ba6e","src/tests/truncate.rs":"683430af4a0e47ec73c737a6908fac5d851bed7c41d47c73a642e96d966aa5ae","src/tests/union.rs":"88f398ee4600bb1e59bf6d02d1f6ff33f5f853eab5a6c700bd8a683c6ee4651a","src/tests/unknown.rs":"fa9e8ee461f176c0d892cde487fef0fe66df2aa5906aaef21b093102e590f5f5","src/traits.rs":"3fe39d06f36daf914174b49ad2424873ece199fc1bf7e7264644ddeecef0e559"},"package":"5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"} \ No newline at end of file +{"files":{"CHANGELOG.md":"f2635274b6b8c496e855b4cf6ec7852102d794263292fe81f1c088e4ff253716","CODE_OF_CONDUCT.md":"42634d0f6d922f49857175af991802822f7f920487aefa2ee250a50d12251a66","CONTRIBUTING.md":"6c9f96eacb20af877ae2d16f024904f3038b93448a8488e9dbcac0df7f6439a5","Cargo.lock":"6fda29b7daf6af4dc0c5d3f32765e9052192ee960e90f180cdaee3f7f13adca6","Cargo.toml":"f931d505da26360b34271181dcc19b43cf68d11d05514789d24aeb2d814438cc","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"4a9814dba6a6fdacf1ad20edd17905375550b2d4dc407ed5f00f2f0597ab437d","SECURITY.md":"68704c8128fa2e776ed7cbda741fbf61ad52f998a96350ee7ee4dbf64c6573bc","benches/parse.rs":"f1390d62322c6880d65bd931e183d49b313f287879a6bfaa36b1cb1921090b51","examples/custom_bits_type.rs":"e53b32051adc5d97860e0b48c8f3a301a041d73b4939c0d7caa5f0cfcc0b9739","examples/custom_derive.rs":"730589695eb68dda21d0d9f69e90cbdbf9823b13d6f16c5f22b0083c00981813","examples/fmt.rs":"87ba37a1fb8528570c74ea26d8e8948e1179c3d867b928bea1080880258e0a99","examples/macro_free.rs":"69e7f284b53b5214d51228a686e87f127b52a3b74711e45537ebfa5583a180e5","examples/serde.rs":"08b21b35d5c10fdca132fe0f36c8067bb44f559e96617a9257ab6316a20cbc75","spec.md":"fcdd939df30c59b0643be09027df664b71cbea9b9989185441482c5576160fed","src/example_generated.rs":"d018caf059f6ffc4c2403b771a6d76679fa5af03c329a91bd9252957df695e7f","src/external.rs":"734d3f470e6a669297d2df421ce3976fe613d8aa9c071d5ce6fe3ca890e5b815","src/external/arbitrary.rs":"43908bb4fe0a076078dcb3fa70c654aaed8c7b38aa66574414165a82037def83","src/external/bytemuck.rs":"3afcef382122867040fddd5e4153d633d1ed5596fe5d7dfac66a8e61c2513df5","src/external/serde.rs":"4a09db12534a20fe554a08dc5f1c8124b379292d41fa75628abcd2ca21587573","src/internal.rs":"645b13af0c7302258df61239073a4b8203d09f27b6c17f8a6f1f8c3e427f5334","src/iter.rs":"dbaa6437c1c044f689185ce3fafe43df8796bed19bbdd2c20334a52de5eeee73","src/lib.rs":"9d571acbfe33d90e61b097ad3bfa821545c67319558365f8d06337504a2d5dfe","src/parser.rs":"4e788b29f5d0542c409a8b43c703bcb4a6c2a57c181cadd17f565f0abb39681e","src/public.rs":"78ba06e1a5830b36960adf9bd79aaf47d783b9b8a0f1fa33b0d7a340c15fd1d1","src/tests.rs":"fb14f80509a991af90a0aef85e55429ad79d7e499112ff06f8ac54e5a6a7acfa","src/tests/all.rs":"e99a865cd4271a524c2fe95503e96d851b35990570aed6fb2e9dac7a14da31b6","src/tests/bits.rs":"3840c34b2ea5d1802404b9ce5bcc1d3fa6ccd8dfba2e29e6d07c605f817d90df","src/tests/complement.rs":"d0e6d4c3daf49e0a7438c9f1c1ac91fad1b37f258c03593f6cd6a695ee626f5e","src/tests/contains.rs":"58bb3cb8c86550e775d11134da1d4aca85c83f943ea454e3a5f222772c674a24","src/tests/difference.rs":"d0d2b96bb52658b8ac019210da74ca75a53e76622f668855142ea6e97c28cb0e","src/tests/empty.rs":"817d6e93ced7cb7576ff0e334aa1a44703f3f96871ff2c6bdcb8f207e6551f67","src/tests/eq.rs":"b816767680a029e9c163e37af074dd4e604c4a3e4936f829f0ca3774fd5f0e37","src/tests/extend.rs":"5fabb9fd0254c64da019149c24063fceff72da3eb4ad73b57c1cc4c04b008364","src/tests/flags.rs":"2f48d3a25db1cf66fe98c9959abc70875deb9f7b38b2c278dc70c46e0d4ec277","src/tests/fmt.rs":"a2d4148491f3202f030f63633eee941b741e3be29a68cf376f008dbe5cb11e5c","src/tests/from_bits.rs":"d94c65b88bf89961d0cfc1b3152a7f1acc285bae160a1628438effda11b8e2c1","src/tests/from_bits_retain.rs":"980591dfaf91e940f42d9a1ce890f237514dd59d458fc264abcf9ceabbc40677","src/tests/from_bits_truncate.rs":"d3406b5e107ebb6449b98a59eee6cc5d84f947d4aaee1ee7e80dc7202de179f0","src/tests/from_name.rs":"f4a055d1f3c86decef70ef8f3020cef5c4e229718c20b3d59d5a3abc3a8b1298","src/tests/insert.rs":"3fab5da800a6fc0654dfb5f859f95da65a507eb9fda8695083c2712266dff0b9","src/tests/intersection.rs":"baf1454c9e4eba552264870a556ee0032d9f2bb8cac361833d571235e0b52221","src/tests/intersects.rs":"c55e36179fd8bc636f04ea9bbce346dcaafe57915d13f1df28c5b83117dbd08e","src/tests/is_all.rs":"b2f11faa7c954bd85c8fb39999e0c37d983cf7895152bc13c7ddde106aa33b6d","src/tests/is_empty.rs":"11f21323cdca7ff92dd89e09de667dba69e8dce88e2d3e27ea68ace91d15d070","src/tests/iter.rs":"4ba121932b527e787b82745405c7c65c1084c242e2dda3290d475ec160d265e4","src/tests/parser.rs":"fa2fb8dedcf16601af609a5e21d9c5840c7f96a1e3a587f7f2ea3dc8387f7628","src/tests/remove.rs":"6e75f8508d2dc1a2cba89ef691f4387a665a4fd13853bb1dd0fd80c783b89947","src/tests/symmetric_difference.rs":"0a89f084f9de1dd5b1932fe72c3b10a3c93cbaa16832b3a31b6a85e3bbd3ba6e","src/tests/truncate.rs":"683430af4a0e47ec73c737a6908fac5d851bed7c41d47c73a642e96d966aa5ae","src/tests/union.rs":"88f398ee4600bb1e59bf6d02d1f6ff33f5f853eab5a6c700bd8a683c6ee4651a","src/tests/unknown.rs":"fa9e8ee461f176c0d892cde487fef0fe66df2aa5906aaef21b093102e590f5f5","src/traits.rs":"370c414a6b621ffe6e018861b481671dffa2689de39759922d03cdd12e5b612b"},"package":"1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be"} \ No newline at end of file diff --git a/third_party/rust/bitflags/CHANGELOG.md b/third_party/rust/bitflags/CHANGELOG.md index 6503ab246919..fc6134ad566f 100644 --- a/third_party/rust/bitflags/CHANGELOG.md +++ b/third_party/rust/bitflags/CHANGELOG.md @@ -1,23 +1,3 @@ -# 2.9.0 - -## What's Changed -* `Flags` trait: add `clear(&mut self)` method by @wysiwys in https://github.com/bitflags/bitflags/pull/437 -* Fix up UI tests by @KodrAus in https://github.com/bitflags/bitflags/pull/438 - - -**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0 - -# 2.8.0 - -## What's Changed -* feat(core): Add bitflags_match macro for bitflag matching by @YuniqueUnic in https://github.com/bitflags/bitflags/pull/423 -* Finalize bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/431 - -## New Contributors -* @YuniqueUnic made their first contribution in https://github.com/bitflags/bitflags/pull/423 - -**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0 - # 2.7.0 ## What's Changed diff --git a/third_party/rust/bitflags/Cargo.lock b/third_party/rust/bitflags/Cargo.lock index 759ff5c59cc9..10910a36b04f 100644 --- a/third_party/rust/bitflags/Cargo.lock +++ b/third_party/rust/bitflags/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.0" +version = "2.7.0" dependencies = [ "arbitrary", "bytemuck", @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +checksum = "882ce8da04f2b62f52b2485ed297687a43a8438374e7c2261a80601ecb4bac04" dependencies = [ "proc-macro2", "quote", @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "compiler_builtins" -version = "0.1.149" +version = "0.1.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5567db738d0fcdaaa007240b051c70aa7f0f08762e489ad1072298380eb3d84c" +checksum = "78013b42e2946a76d348a858fa5a06ca7d6b5cccdfccd660ea7a0aa4a44d40ca" [[package]] name = "derive_arbitrary" @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "glob" @@ -85,9 +85,9 @@ checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "indexmap" -version = "2.7.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown", @@ -107,9 +107,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -137,24 +137,24 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "serde" -version = "1.0.218" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.139" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "itoa", "memchr", @@ -193,9 +193,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "target-triple" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" +checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" [[package]] name = "termcolor" @@ -219,9 +219,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -240,9 +240,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -253,9 +253,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.103" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b812699e0c4f813b872b373a4471717d9eb550da14b311058a4d9cf4173cbca6" +checksum = "8dcd332a5496c026f1e14b7f3d2b7bd98e509660c04239c58b0ba38a12daded4" dependencies = [ "glob", "serde", @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "winapi-util" @@ -356,27 +356,27 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.3" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] [[package]] name = "zerocopy" -version = "0.8.21" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf01143b2dd5d134f11f545cf9f1431b13b749695cb33bcce051e7568f99478" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.21" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712c8386f4f4299382c9abee219bee7084f78fb939d88b6840fcc1320d5f6da2" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" dependencies = [ "proc-macro2", "quote", diff --git a/third_party/rust/bitflags/Cargo.toml b/third_party/rust/bitflags/Cargo.toml index 87be92f4d27d..1e9a2ff04ada 100644 --- a/third_party/rust/bitflags/Cargo.toml +++ b/third_party/rust/bitflags/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.56.0" name = "bitflags" -version = "2.9.0" +version = "2.7.0" authors = ["The Rust Project Developers"] build = false exclude = [ @@ -44,14 +44,6 @@ repository = "https://github.com/bitflags/bitflags" [package.metadata.docs.rs] features = ["example_generated"] -[features] -example_generated = [] -rustc-dep-of-std = [ - "core", - "compiler_builtins", -] -std = [] - [lib] name = "bitflags" path = "src/lib.rs" @@ -128,3 +120,11 @@ version = "1.0.18" [dev-dependencies.zerocopy] version = "0.8" features = ["derive"] + +[features] +example_generated = [] +rustc-dep-of-std = [ + "core", + "compiler_builtins", +] +std = [] diff --git a/third_party/rust/bitflags/README.md b/third_party/rust/bitflags/README.md index 19a5d050be0e..19f92680386f 100644 --- a/third_party/rust/bitflags/README.md +++ b/third_party/rust/bitflags/README.md @@ -28,7 +28,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -bitflags = "2.9.0" +bitflags = "2.7.0" ``` and this to your source code: diff --git a/third_party/rust/bitflags/src/lib.rs b/third_party/rust/bitflags/src/lib.rs index 54f4245a6e8b..97e808fa2c18 100644 --- a/third_party/rust/bitflags/src/lib.rs +++ b/third_party/rust/bitflags/src/lib.rs @@ -17,7 +17,7 @@ Add `bitflags` to your `Cargo.toml`: ```toml [dependencies.bitflags] -version = "2.9.0" +version = "2.7.0" ``` ## Generating flags types @@ -792,104 +792,6 @@ macro_rules! __impl_bitflags { }; } -/// A macro that matches flags values, similar to Rust's `match` statement. -/// -/// In a regular `match` statement, the syntax `Flag::A | Flag::B` is interpreted as an or-pattern, -/// instead of the bitwise-or of `Flag::A` and `Flag::B`. This can be surprising when combined with flags types -/// because `Flag::A | Flag::B` won't match the pattern `Flag::A | Flag::B`. This macro is an alternative to -/// `match` for flags values that doesn't have this issue. -/// -/// # Syntax -/// -/// ```ignore -/// bitflags_match!(expression, { -/// pattern1 => result1, -/// pattern2 => result2, -/// .. -/// _ => default_result, -/// }) -/// ``` -/// -/// The final `_ => default_result` arm is required, otherwise the macro will fail to compile. -/// -/// # Examples -/// -/// ```rust -/// use bitflags::{bitflags, bitflags_match}; -/// -/// bitflags! { -/// #[derive(PartialEq)] -/// struct Flags: u8 { -/// const A = 1 << 0; -/// const B = 1 << 1; -/// const C = 1 << 2; -/// } -/// } -/// -/// let flags = Flags::A | Flags::B; -/// -/// bitflags_match!(flags, { -/// Flags::A | Flags::B => println!("A and/or B are set"), -/// _ => println!("neither A nor B are set"), -/// }) -/// ``` -/// -/// # How it works -/// -/// The macro expands to a series of `if` statements, checking equality between the input expression -/// and each pattern. This allows for correct matching of bitflag combinations, which is not possible -/// with a regular match expression due to the way bitflags are implemented. -/// -/// Patterns are evaluated in order. -#[macro_export] -macro_rules! bitflags_match { - ($operation:expr, { - $($t:tt)* - }) => { - // Expand to a closure so we can use `return` - // This makes it possible to apply attributes to the "match arms" - (|| { - $crate::__bitflags_match!($operation, { $($t)* }) - })() - }; -} - -/// Expand the `bitflags_match` macro -#[macro_export] -#[doc(hidden)] -macro_rules! __bitflags_match { - // Eat an optional `,` following a block match arm - ($operation:expr, { $pattern:expr => { $($body:tt)* } , $($t:tt)+ }) => { - $crate::__bitflags_match!($operation, { $pattern => { $($body)* } $($t)+ }) - }; - // Expand a block match arm `A => { .. }` - ($operation:expr, { $pattern:expr => { $($body:tt)* } $($t:tt)+ }) => { - { - if $operation == $pattern { - return { - $($body)* - }; - } - - $crate::__bitflags_match!($operation, { $($t)+ }) - } - }; - // Expand an expression match arm `A => x,` - ($operation:expr, { $pattern:expr => $body:expr , $($t:tt)+ }) => { - { - if $operation == $pattern { - return $body; - } - - $crate::__bitflags_match!($operation, { $($t)+ }) - } - }; - // Expand the default case - ($operation:expr, { _ => $default:expr $(,)? }) => { - $default - } -} - /// A macro that processed the input to `bitflags!` and shuffles attributes around /// based on whether or not they're "expression-safe". /// diff --git a/third_party/rust/bitflags/src/tests.rs b/third_party/rust/bitflags/src/tests.rs index 0770e1b3f934..28ed0a671931 100644 --- a/third_party/rust/bitflags/src/tests.rs +++ b/third_party/rust/bitflags/src/tests.rs @@ -1,7 +1,5 @@ mod all; -mod bitflags_match; mod bits; -mod clear; mod complement; mod contains; mod difference; diff --git a/third_party/rust/bitflags/src/tests/bitflags_match.rs b/third_party/rust/bitflags/src/tests/bitflags_match.rs deleted file mode 100644 index 93190f8bb4ef..000000000000 --- a/third_party/rust/bitflags/src/tests/bitflags_match.rs +++ /dev/null @@ -1,93 +0,0 @@ -bitflags! { - #[derive(PartialEq)] - struct Flags: u8 { - const A = 1 << 0; - const B = 1 << 1; - const C = 1 << 2; - const D = 1 << 3; - } -} - -fn flag_to_string(flag: Flags) -> String { - bitflags_match!(flag, { - Flags::A => "A".to_string(), - Flags::B => { "B".to_string() } - Flags::C => "C".to_string(), - Flags::D => "D".to_string(), - Flags::A | Flags::B => "A or B".to_string(), - Flags::A & Flags::B => { "A and B | empty".to_string() }, - Flags::A ^ Flags::B => "A xor B".to_string(), - Flags::A | Flags::B | Flags::C => "A or B or C".to_string(), - Flags::A & Flags::B & Flags::C => "A and B and C".to_string(), - Flags::A ^ Flags::B ^ Flags::C => "A xor B xor C".to_string(), - Flags::A | Flags::B | Flags::C | Flags::D => "All flags".to_string(), - _ => "Unknown combination".to_string() - }) -} - -#[test] -fn test_single_flags() { - assert_eq!(flag_to_string(Flags::A), "A"); - assert_eq!(flag_to_string(Flags::B), "B"); - assert_eq!(flag_to_string(Flags::C), "C"); - assert_eq!(flag_to_string(Flags::D), "D"); -} - -#[test] -fn test_or_operations() { - assert_eq!(flag_to_string(Flags::A | Flags::B), "A or B"); - assert_eq!( - flag_to_string(Flags::A | Flags::B | Flags::C), - "A or B or C" - ); - assert_eq!( - flag_to_string(Flags::A | Flags::B | Flags::C | Flags::D), - "All flags" - ); -} - -#[test] -fn test_and_operations() { - assert_eq!(flag_to_string(Flags::A & Flags::A), "A"); - assert_eq!(flag_to_string(Flags::A & Flags::B), "A and B | empty"); - assert_eq!( - flag_to_string(Flags::A & Flags::B & Flags::C), - "A and B | empty" - ); // Since A, B, and C are mutually exclusive, the result of A & B & C is 0 ==> A & B & C = 0000 (i.e., empty). - // However, in the bitflags_match! statement (actually is if {..} else if {..} .. else {..}), - // the "A & B = 0000" condition is listed first, so 0000 will match "A & B" first, - // resulting in the output of the "A and B | empty" branch. - assert_eq!( - flag_to_string(Flags::A & Flags::B & Flags::C & Flags::D), - "A and B | empty" - ); -} - -#[test] -fn test_xor_operations() { - assert_eq!(flag_to_string(Flags::A ^ Flags::B), "A or B"); // A | B = A ^ B == 0011 - assert_eq!(flag_to_string(Flags::A ^ Flags::A), "A and B | empty"); - assert_eq!( - flag_to_string(Flags::A ^ Flags::B ^ Flags::C), - "A or B or C" - ); -} - -#[test] -fn test_complex_operations() { - assert_eq!(flag_to_string(Flags::A | (Flags::B & Flags::C)), "A"); - assert_eq!( - flag_to_string((Flags::A | Flags::B) & (Flags::B | Flags::C)), - "B" - ); - assert_eq!( - flag_to_string(Flags::A ^ (Flags::B | Flags::C)), - "A or B or C" - ); -} - -#[test] -fn test_empty_and_full_flags() { - assert_eq!(flag_to_string(Flags::empty()), "A and B | empty"); - assert_eq!(flag_to_string(Flags::all()), "All flags"); -} diff --git a/third_party/rust/bitflags/src/tests/clear.rs b/third_party/rust/bitflags/src/tests/clear.rs deleted file mode 100644 index 2d42cce4e3f9..000000000000 --- a/third_party/rust/bitflags/src/tests/clear.rs +++ /dev/null @@ -1,27 +0,0 @@ -use super::*; - -use crate::Flags; - -#[test] -fn cases() { - case(TestFlags::from_bits_retain(0)); - - case(TestFlags::from_bits_retain(1 << 3)); - - case(TestFlags::ABC | TestFlags::from_bits_retain(1 << 3)); - - case(TestZero::empty()); - - case(TestZero::all()); - - case(TestFlags::from_bits_retain(1 << 3) | TestFlags::all()); -} - -#[track_caller] -fn case(mut flags: T) -where - T: std::fmt::Debug + PartialEq + Copy, -{ - flags.clear(); - assert_eq!(flags, T::empty(), "{:?}.clear()", flags); -} diff --git a/third_party/rust/bitflags/src/traits.rs b/third_party/rust/bitflags/src/traits.rs index d7c4d13b454d..d351bfce45dd 100644 --- a/third_party/rust/bitflags/src/traits.rs +++ b/third_party/rust/bitflags/src/traits.rs @@ -293,14 +293,6 @@ pub trait Flags: Sized + 'static { } } - /// Unsets all bits in the flags. - fn clear(&mut self) - where - Self: Sized, - { - *self = Self::empty(); - } - /// The bitwise and (`&`) of the bits in two flags values. #[must_use] fn intersection(self, other: Self) -> Self { diff --git a/third_party/rust/naga/.cargo-checksum.json b/third_party/rust/naga/.cargo-checksum.json index a1d0f4e9c47e..57b63b2dab68 100644 --- a/third_party/rust/naga/.cargo-checksum.json +++ b/third_party/rust/naga/.cargo-checksum.json @@ -1 +1 @@ -{"files":{".cargo/config.toml":"d7389d2a0c08ec72b79e83a3c76980903e3f9123625c32e69c798721193e2e74","CHANGELOG.md":"e60105d413f857e37dae165f819c47491d0a595183d3c9146b259d811b98b14f","Cargo.toml":"00ca156a4882d62106663bb1e83f562f9b1604b955fa14a1a2e2c648e15e1651","README.md":"9550cbc1a518ad0f624aabe12c342c72f670705cb4a6878c0c87d172f1dacea0","build.rs":"a08840f5b18ab09f453e1fc3a09dd16df83caa7798b6ecb7e7ac2f8addab276b","src/arena/handle.rs":"897b2b0eebe0d9ae6a65bf2e8c210c8391924da06ef4c9e2a1225ad622400b6c","src/arena/handle_set.rs":"271f89abb20927eb9f45f552ad2365c4976885cb3dc50078950795f8741b402e","src/arena/handlevec.rs":"999de9d55d01213789072a63ad4ae9b4635e6653984d38db8b308d42bb1e7be3","src/arena/mod.rs":"c5f01ef55278337f7b96068b5e52e307cb9281b311230b5bec6dd1ea700d905e","src/arena/range.rs":"b783969dfe32b4937593d871aa5190d561bdd79b6f615da53cb54346e300b9e2","src/arena/unique_arena.rs":"031bba0907a0eccf7d652a22f88d0e27289072ac72b123743a9602d6cf68b587","src/back/continue_forward.rs":"f962e445f0618cf817c2d26e2dbc066c5992eca6e5dd50024cb3ecf7d1d243e6","src/back/dot/mod.rs":"345a6ef4fa0e9f19ec1c87d436f4c0df13f5e3094e45f470cf8ceb5bc4641c58","src/back/glsl/features.rs":"3fc385fb0b793c963fbab0f07a8a6d4412b68762074372c72facbbc5dad51138","src/back/glsl/keywords.rs":"b8883e5ee8a3d400fa44fef2baffe2853e72ff91e832499c128454d325ceccd9","src/back/glsl/mod.rs":"846bd077834b78760cf5759bdda4e521613abffb1f51787ceda654463819a029","src/back/hlsl/conv.rs":"c586d5f44104c4d8cbbd83872d5f943b00463568c82e6cd915b2f30bb4b308fd","src/back/hlsl/help.rs":"bf2a9d05c4545b53f72e167674849c48c0062424095b2dd0baa467cde1f50069","src/back/hlsl/keywords.rs":"2db780c1e13b1d1af5a51d7124b0a449a072b308f295fd778c3d2faac7ee937d","src/back/hlsl/mod.rs":"d6fb5db5c14f0e1700adb9ac7d70e3e0d3f05e31ba6133e0b01f6606780a9ced","src/back/hlsl/ray.rs":"259db3bc8fd5b8ec343fb8620c7cef50048cbea2b9db1f17dc8813ff848269df","src/back/hlsl/storage.rs":"7443cea2abb6ce8d0c0c9bfe805b37b5600bd28618de44ba1ebd8e4e38eac92f","src/back/hlsl/writer.rs":"86283f5feb14ee8acb9bba461e1a5f0ebd694e955fd3ebb98b7775d51bfdb8ae","src/back/mod.rs":"70888dd341313f6c5857359944a7dd32b518e37e3dd0474b0ab760ad5ffbaf3c","src/back/msl/keywords.rs":"4cfcf429cc15fb35d811ee7f80a2664b98b4aeaf96e26f1e7720aa4f74a11bbd","src/back/msl/mod.rs":"dadb12468b17c765489facc8ffecc99ea55cb714ca85cbf906b146879376e86e","src/back/msl/sampler.rs":"9be8805063258b0ff6b6db2e6856d59326caa18f6f64eaf413c5abfcbd1ad341","src/back/msl/writer.rs":"314cc0daf12ca28c94ebc40db33c188a5bb96b6a8147dfd4105913759f4b10e0","src/back/pipeline_constants.rs":"7660e72057534ca205c8300cfee7307c9f753e2944604731a368e19ee0bb3d8c","src/back/spv/block.rs":"5884a668c56bee3afa996a6033d05b1e59812102a9b802243106ba3579d9e1a1","src/back/spv/helpers.rs":"37ef7388b1e97edb2682b93f1f0eceb71039ecd54923d91346d974b29322077c","src/back/spv/image.rs":"4677d14047e1172ea9dd05fd83d5116b5a5e6e30e6818ac2475fc123258001b3","src/back/spv/index.rs":"64b1afa6fe8a51305bdf5c5d6bf370fa0e2a419effa37fbdb124efc8fbc634b6","src/back/spv/instructions.rs":"9bc909a1441ae72193c044cb9c6c24cd402fafaaecfebb46dd8eff631181504e","src/back/spv/layout.rs":"52b965e9efd572dac72e0ee51041256fcc666eb4b2eadebe786e8ff39f6e031a","src/back/spv/mod.rs":"cebb1eb3bb28e6f40366ceab7a369027aac9c27cce37fd4a1b3e4d16617553bd","src/back/spv/ray.rs":"b4ac7b61765f42cb474bbd19da30626fcebf6144712282f2226b302095a77988","src/back/spv/recyclable.rs":"8ea397d4d8d3f2cd5fbc8e0be94d136c2d6e0f0e8a4b5eb567dcc1be104c9ae5","src/back/spv/selection.rs":"aea4bb4da7c0fa4e907b8f1e185433a48f2f0eb7ded97fdd3225beb3f6c1f249","src/back/spv/subgroup.rs":"6fc3e390b1c19c0f3ca5f232efd8af939fe23320e456d77e955a9c05ac606256","src/back/spv/writer.rs":"2525ae0ce5305104f0633983fc853a8b97164a1df21a96f48682a8a220450fd8","src/back/wgsl/mod.rs":"1b04d66e8dba609513d43431d1f0ee9a209fbfd8453862d6e8a7aa41f8910997","src/back/wgsl/polyfill/inverse/inverse_2x2_f16.wgsl":"9e7635d04724822931c805a8b35e76d6d294d447e4ea8d57b308ce45609bf736","src/back/wgsl/polyfill/inverse/inverse_2x2_f32.wgsl":"340d491abde07f93996391796db65a5f88402663eaf6b9d2d894d11cb8cf8b6d","src/back/wgsl/polyfill/inverse/inverse_3x3_f16.wgsl":"4f13a1a4b3e1b51f0f992d13c55cf854a80917554a4d13c997819fa1fe776ba4","src/back/wgsl/polyfill/inverse/inverse_3x3_f32.wgsl":"9b16d2f4b9e433c8e03a0cb46ab48508f3bf7e185ce1b4e26106c47e81a677cb","src/back/wgsl/polyfill/inverse/inverse_4x4_f16.wgsl":"86d39d1db5d03995b404950279db7f1698ad9622982aa319fdedb7532673235b","src/back/wgsl/polyfill/inverse/inverse_4x4_f32.wgsl":"dc510525ac2dce66389a8c4bf8b2f31f0dedd9e6debdbe4ffd939a0a7fc533d3","src/back/wgsl/polyfill/mod.rs":"f4ab3c9b9cdc36d16dab00d0f7f07d6e6beda0e27a36053e9b5ffeeb7ca18edc","src/back/wgsl/writer.rs":"5b4308a2c699b76c0ae5665503f1c13ed553e337c6ba14bbe0fc47ccf3ddb4ad","src/block.rs":"1c59138385fe197a4e96574c792010bcd216cfb0edb3ee4f3ad546dabb803778","src/common/mod.rs":"dd29d3abd51cd1bdd84f35b39e665d6d3f87d98627f14a361e8e72db41152aeb","src/common/wgsl.rs":"e6795e107deeed10a97db38d74874138a75be7b8df69526a3b04b2d71d29663d","src/compact/expressions.rs":"7e3987aeb7c99eafb9904cbc46149ab08762522dc3c04f2295cae4c815a11547","src/compact/functions.rs":"9618539e9d3641d85c11573447d9773e7376cad23b1fd868ed5565b5eb93e05f","src/compact/handle_set_map.rs":"c190919a19f1f6b8d064459114937fdd1eaeb057963e4eab8f05a5219759cf34","src/compact/mod.rs":"099158376c7cbe86740a846fa62ed8beb78ba664fadd4fd141413670a4b910cd","src/compact/statements.rs":"9d877ff561e2d5d45fef9a8f5e0147ad55bcbaca73898949b689b41e683fdb60","src/compact/types.rs":"d5b3491cf87d7a500d5ea2dba66c000fd7e6f67b75c901105ad64c1161f7823f","src/diagnostic_filter.rs":"7478de8ed51cca0ef57e29c8a0f981f2876f8ae6805bd244fc3846efea9cb3cc","src/error.rs":"3157d57126886c9db0d3c5871a569eaf0b79d8f27292808300fe4f3e50732b1d","src/front/atomic_upgrade.rs":"86ce9f9628d92a1a09802cb534bb4310236b83f2799c921b81c687f009c589be","src/front/glsl/ast.rs":"c4e283a3f2c37b0ef68338644c978eefda2a7b993aceae2ef36bc28c2bb99dce","src/front/glsl/builtins.rs":"e394efbd0a70e11592468dc79fcc8402871229e522fa582f190f9ae9e5c48853","src/front/glsl/context.rs":"11a7c1013d223db3ce5caff29ce538731b0a04f1fc27a8e85d850c778de1de82","src/front/glsl/error.rs":"18536d8aa9ce9379309abb371876de061eef0efb18c31476bba4b061b8892848","src/front/glsl/functions.rs":"9ff43889f04921b16b248d1d3db387041f1ae56cfdaa8c9be1013914fc9eb580","src/front/glsl/lex.rs":"24706628b600b5ce435cef464c84196ac5d58013122a97e7b59d509cc25f85a2","src/front/glsl/mod.rs":"f4f1cce6911935b305c415afe3c15f84c7824a3bb828a5d15e6f9ae4b0316df0","src/front/glsl/offset.rs":"7e7d29e5f6c4ea65c13ad07f2f20bc3a1ff305276dd3cfad8e4fbe60dd2a4acb","src/front/glsl/parser.rs":"6a13b4737f53b09d5bbc0add01f8fc1b2633b7957f0318374edfe0b903939912","src/front/glsl/parser/declarations.rs":"9949649fba43636d03eaf7f7560d3bb3743b19c7204fb95859283ee84b5dd239","src/front/glsl/parser/expressions.rs":"e056fbdde3bc7c8473acbd485aecd14120d3dbefbabd813ddbc5cfedaf605889","src/front/glsl/parser/functions.rs":"302e24e06190aff555131c33f9a80b15df6a0390d6c776f888a44d5ef7df697e","src/front/glsl/parser/types.rs":"69297706c27b556c61974ea58029ebe1e6db01d8d9f4803d4ac1d9832e5fe584","src/front/glsl/parser_tests.rs":"6834f0d595f4077266054e5da43e4f1b60e5c6780611ab0f530d9964cc62fad3","src/front/glsl/token.rs":"83780c0c1954ef216896c9d8a48e412b357783e00ccd4909a7a249935c742629","src/front/glsl/types.rs":"24e08a8c64373cf301c12c5968107f1c83517ea7bf29a43d49ace30bc20aba6d","src/front/glsl/variables.rs":"66cb49fccf53e9f91301e72f6365d80e3f083a7ed109c2e55730f12a92fa6d73","src/front/interpolator.rs":"9b6ca498d5fbd9bc1515510a04e303a00b324121d7285da3c955cfe18eb4224c","src/front/mod.rs":"e78e91bf1f17409c5e25fd360415e999bb69b159750d2c1673a3db9973f586e0","src/front/spv/convert.rs":"16b8281fc1ae75dc62a02893db2c5b6d8994166e78b3b6b8cac7a01e0da4eae2","src/front/spv/error.rs":"8e09837ab8f03898cbdacda52ff66830bb948a9684b3264a7e9546119c5adb42","src/front/spv/function.rs":"6da0d7dec521039a3c81669ff171c7f15673bb3e93402f2a0f1c8e6f92d7f004","src/front/spv/image.rs":"f920749cb923416e6079297fa54efe68267c00093d990a59cc907edbbbfcdbad","src/front/spv/mod.rs":"95d2212c5098d5e3d78e882a1ce36c43e88fb6aae2a9a4bc01e8c4f0874fdff3","src/front/spv/null.rs":"ee20287365e025e8bcc91f29df930ff8b63cb6d7f26db0b1789d54de614a7353","src/front/type_gen.rs":"4dfaeefc671b8b5a882d3dcbb1b32895eaa5b05ecd9380f30e652164b0aac58c","src/front/wgsl/error.rs":"6f61c8e7d7cee868b131e0eaf2d2c035904555f59286a2a42a21e929dd0bf173","src/front/wgsl/index.rs":"0feb3e21921a8f68ffc3418610dd9b7b6eb6c4e9b45045f2498b4f2f77674283","src/front/wgsl/lower/construction.rs":"ab368fedfb724867a4c4dcd299f6a1e3ac40b81e34bdfea100367cce72d1d1c4","src/front/wgsl/lower/conversion.rs":"63b53a497dcc2649083213d7082503a128a5612297b92ca9ab7579e41c3f34be","src/front/wgsl/lower/mod.rs":"6b24c1c920f82110b3f0c172d46e1bf4c0a12477a6d0a680bebfdba6b2fcb2e4","src/front/wgsl/mod.rs":"73c27e64f9fa3314a61764b581e7395743e802738f78d158d488900bacd6a32a","src/front/wgsl/parse/ast.rs":"e029f193ff551c670a5143c795e7678215529441cbf81c7aefc13d08dec9feb8","src/front/wgsl/parse/conv.rs":"95942e5b0423943bb88903d2eb69ce21debd4bae7b1ff12ac317b8ca4e98c7d1","src/front/wgsl/parse/directive.rs":"f371a1222196f678b6c266352fd2a3298f5a0b7bb6c22895db1e19eb755761e0","src/front/wgsl/parse/directive/enable_extension.rs":"f92356be89f8418320ab627f1270192f17644ddf8837d478757387e0ef29f01d","src/front/wgsl/parse/directive/language_extension.rs":"b769f340f4f89410734d0d0fa3bc8530eb10ddb05bbd175da7bf61b062334cc0","src/front/wgsl/parse/lexer.rs":"2e857f2f40d52df2a08fbb8368f6eb925b239dfb8e17ccf19fd8dda3536ed209","src/front/wgsl/parse/mod.rs":"2c88b099b9a9d43ec6eb4a09ceb3ae5ec3196bdfe4a7ba3797d793ffe046d5c9","src/front/wgsl/parse/number.rs":"05f2e73fa12810b195e4eb1cb4f4ef83d254380c68248b3a2dd5581eb20c7aeb","src/front/wgsl/tests.rs":"2d572786959ed879b3f5120708fdf80970ba0712fdf86caa732376915112a7da","src/front/wgsl/to_wgsl.rs":"ed5b11c7ecfe787ea5c37f0dd853ea3243707ecdcbb03a907fbe0fa4a3a27907","src/keywords/mod.rs":"47a6fde012bf7d1e70f0fac7762f6a8e7dca6b9bbb99e2cada773c61527cfbfe","src/keywords/wgsl.rs":"c648ac44241ad55c8c8bad3d8f1bab973d11ddb9c380dcca369b735ed3975309","src/lib.rs":"aa46c85635d904e990f2a325b53aa00359de4013e821d369d583b6e9d9518011","src/non_max_u32.rs":"01c87cc4244da9585e7ea404d3916aaa0005ae5d9d16ca9f33f33ef525c7a7df","src/proc/constant_evaluator.rs":"455b9f091a8bfc5ed3192d1f12d937dcbfacdaae56438fd36578985a8200d0b2","src/proc/emitter.rs":"39ac886c651e2ad33c06a676a7e4826a0e93de0af660c01e8e4b1f7406742f88","src/proc/index.rs":"6214182b9484078d46fa066265d4554d3dc40d646295c2623d9888240ea1d45e","src/proc/layouter.rs":"bf50fed8cf4b15400218fa1cf897f04925795939b09c9ce658eb8bc7559a5705","src/proc/mod.rs":"de0d75194bc349a4ff5a9b99bc33102cb09c9e93505389b3d235b7602c1d0bd6","src/proc/namer.rs":"abcad4c4f63e2316f528c5aa9957e0371b0df078dfecc6dd1db18506fe0cbca7","src/proc/terminator.rs":"66b0082dce3b29d6d20e9a891c66524d756c8e567ac844d61355248ac4623b07","src/proc/type_methods.rs":"1aba860b3beaa81c0ba2c99a39761e4c85ef68f4e921978442c8cd96ff61d6d1","src/proc/typifier.rs":"2e54c6fbe1b9afdd4875555d04905460ab6932d712c1a977c4cb4c5c7a2f43cb","src/span.rs":"e4ebe5d7bc6b03c158881ae0bf90ed398777fd904fb9c1f9774821fbd43fa1f1","src/valid/analyzer.rs":"d7683f470f50546bdc5e29e9a64b67dbdc3121bda79a97532c8e30bfe5b8804a","src/valid/compose.rs":"f27a6bc13180fcd1ecbbab698faab5e25ecf0115676fda6f367fb3e8fb72a6b0","src/valid/expression.rs":"4d73813a5d829733434a5d33e1ac4e7df4f23b2cc2af216b195e61382e6389a3","src/valid/function.rs":"eb847de29dc39513a1a685ecf7e88304911e0b886024ba9716132e01d217e9a7","src/valid/handles.rs":"864ed0fe0b158119c8beaf5abe864bf3093960c75639dbeae1ce3a9739262d78","src/valid/interface.rs":"331a20e8a313f5b1f65537c27a0c89457511e05d3d932119d61d4e11fc442f74","src/valid/mod.rs":"5a79165fff6eb0b5525edd8a66e6d0c43c973ff8c4a2bb6890adae83c00b218e","src/valid/type.rs":"9c62a650d2b71c71a4134c2734d5b5f97b225624b332dd1460e3b35768fd046a"},"package":null} \ No newline at end of file +{"files":{".cargo/config.toml":"d7389d2a0c08ec72b79e83a3c76980903e3f9123625c32e69c798721193e2e74","CHANGELOG.md":"e60105d413f857e37dae165f819c47491d0a595183d3c9146b259d811b98b14f","Cargo.toml":"93aaec4148e1d97a84fcf1bcfd57a2331daf2cbc28f8bde3640c3e5faad22d10","README.md":"00a6070ebadb15a9488f117b286f50e4838a7dd0a28d41c9fcff4781c6b49171","build.rs":"a08840f5b18ab09f453e1fc3a09dd16df83caa7798b6ecb7e7ac2f8addab276b","src/arena/handle.rs":"1bf2edcca03d7cb466e1f8bd4bf1c966b805505ea2ee3641c39aa04811413478","src/arena/handle_set.rs":"cf73f190c066257dca6e92444d10a5e75cc1b5383c7dfe920c6c188f9dbfedf0","src/arena/handlevec.rs":"dfc9249478eb6980c13587c740d91234214bc7e0eef90e6f40b3d99decf70a58","src/arena/mod.rs":"1482d793968eece2e877347a8708c478c1c50888db198b5a9e6492af33ee2849","src/arena/range.rs":"88683c36b137499ab537cf906505c2bd0871e0b9177e3a4e55da9db4e86df6a2","src/arena/unique_arena.rs":"83c8ee1185281f7198725e40a281216b95412f908e8495aebda7c13395d16c9f","src/back/continue_forward.rs":"a00eac975fd2f1d23ebb579f1abc24ed1a30055df313033f969ed0f388b56b41","src/back/dot/mod.rs":"f16d29109ac5e09148a0636f08890e7b05a4c92fb1c3f2cd58af44f2226afe8d","src/back/glsl/features.rs":"c8da15759d4efbf9b4d72d12aea9791af94ff700723cb9da653f3365930b6c96","src/back/glsl/keywords.rs":"b8883e5ee8a3d400fa44fef2baffe2853e72ff91e832499c128454d325ceccd9","src/back/glsl/mod.rs":"42d7a9d79f7bfcb4689a3b812911b078457d6a1948508c5bec6832eea2811316","src/back/hlsl/conv.rs":"05db8a8e982b66a0eae60818799f28952ddcc121cca93a80ae761c84bde86324","src/back/hlsl/help.rs":"386a5f55b7388eeeb8899e6843ead64db720e7cbcf440065d9ca2970b2efe848","src/back/hlsl/keywords.rs":"2db780c1e13b1d1af5a51d7124b0a449a072b308f295fd778c3d2faac7ee937d","src/back/hlsl/mod.rs":"51558d154114370eb2166661ed300abc10dd0171f86182452346ab99d7adb837","src/back/hlsl/ray.rs":"d929fbdd8c7c191e4b8973a5347f8d785ae89bf047841bdd15d62c60a7a46af5","src/back/hlsl/storage.rs":"0023cf02eca4b61adf6c30ca289ada5545629d2e1a60f31145a4b22f5efb41e6","src/back/hlsl/writer.rs":"359714a5714ccc837ebb25061c22b8ab9d5bdb0a6b4255918b963acbf721c509","src/back/mod.rs":"5265adc192b91397770bfab4bdc91995face3e731bc618953bc129e587d56fcc","src/back/msl/keywords.rs":"4cfcf429cc15fb35d811ee7f80a2664b98b4aeaf96e26f1e7720aa4f74a11bbd","src/back/msl/mod.rs":"d593419db8b7e0b73f2b5793fef167bf2d854048967f62ef49a02ac4c01cbe0c","src/back/msl/sampler.rs":"9b01d68669e12ff7123243284b85e1a9d2c4d49140bd74ca32dedc007cbf15af","src/back/msl/writer.rs":"fb4fbed0dfa02121a7330909b1d6bc68397e4bd8141ed411e5526fcbdbc76431","src/back/pipeline_constants.rs":"c5345824944332babc361eae459e58ca44f29b8bd6668286440127dafb25b5a6","src/back/spv/block.rs":"722da1c5181a3c47a44151f61d80df86648ccb3e34107892f8a55373a86898e7","src/back/spv/helpers.rs":"0ba90760dd2dbc6ad461454d33d6b4a75a603326e8ba7e3c2538c6360da9b445","src/back/spv/image.rs":"771c716548efab1943798f1876b58b44e4ab4f154f252e442890093f1d494be1","src/back/spv/index.rs":"4845ad1f5e7abbd6b7ea24b3e0cfa4a04c6653656d70f522055737e72c9d562a","src/back/spv/instructions.rs":"45c749e11272c77218fd80ed9d309d47dd09a8eb977e4fe3b3fc787240f9b1b7","src/back/spv/layout.rs":"164899d72e73afea08433c70484d0baa2492ebbfc26351e8decad5bcb90a794c","src/back/spv/mod.rs":"b51158e4c7d7ab7d7935f58a3fd0dab62e4056059ef619fec0a8fd78dc68e9ff","src/back/spv/ray.rs":"70bb459a109af7c61f6a7389f398af8a7b766b8027b128ff712a12cd5402a848","src/back/spv/recyclable.rs":"aea0e8054f8d9a5c8bd36019673af1a46adb6c89d40defdda2f6ac3df98773cd","src/back/spv/selection.rs":"81e404abfa0a977f7c1f76ccb37a78d13ccadbda229048dad53cc67687cc39db","src/back/spv/subgroup.rs":"6fc3e390b1c19c0f3ca5f232efd8af939fe23320e456d77e955a9c05ac606256","src/back/spv/writer.rs":"56744bd46d057e1bb41f8754e6955075566a6d256ec27aacb7479e0f01be27ac","src/back/wgsl/mod.rs":"70a108f4d297ce0581067500e0c6a579bcbc2ae63f4ed0afbd2da8f0199c435e","src/back/wgsl/polyfill/inverse/inverse_2x2_f16.wgsl":"9e7635d04724822931c805a8b35e76d6d294d447e4ea8d57b308ce45609bf736","src/back/wgsl/polyfill/inverse/inverse_2x2_f32.wgsl":"340d491abde07f93996391796db65a5f88402663eaf6b9d2d894d11cb8cf8b6d","src/back/wgsl/polyfill/inverse/inverse_3x3_f16.wgsl":"4f13a1a4b3e1b51f0f992d13c55cf854a80917554a4d13c997819fa1fe776ba4","src/back/wgsl/polyfill/inverse/inverse_3x3_f32.wgsl":"9b16d2f4b9e433c8e03a0cb46ab48508f3bf7e185ce1b4e26106c47e81a677cb","src/back/wgsl/polyfill/inverse/inverse_4x4_f16.wgsl":"86d39d1db5d03995b404950279db7f1698ad9622982aa319fdedb7532673235b","src/back/wgsl/polyfill/inverse/inverse_4x4_f32.wgsl":"dc510525ac2dce66389a8c4bf8b2f31f0dedd9e6debdbe4ffd939a0a7fc533d3","src/back/wgsl/polyfill/mod.rs":"f4ab3c9b9cdc36d16dab00d0f7f07d6e6beda0e27a36053e9b5ffeeb7ca18edc","src/back/wgsl/writer.rs":"5caee232f9c8642764eaab1ae023a8ddba79df4f3a80d9078ae30de6b314cd16","src/block.rs":"e447f7e041fd67052b23d1139cf0574eea93220a818af71691d960bdf026d45f","src/common/mod.rs":"0adff0748e365649b0a80d81b5f2e04814c692967f6de95c49989a1596a7b2b8","src/common/wgsl.rs":"f629cae3cf175001b74b9393331e71b579db210e155eec55fe3b16661c31ce2a","src/compact/expressions.rs":"4d040d2c7b7eb40ef5fb22c1b23a2d9cc86ec79ae499b09602adce43b572de14","src/compact/functions.rs":"8e3d336c988b0c72e4f5ba20c881539a2878a8e273f710d62b84261af7dc1bad","src/compact/handle_set_map.rs":"748de9563f0ff897c113ba665f3e59ab3a023050e2206eb7d566a31f61fc32e5","src/compact/mod.rs":"32382e818918a791cb05c93b772189f5e473470ecd6960c19ab8d23dad09f122","src/compact/statements.rs":"7f98b7ec132c9efda40586617c217506d596908415df4111b849b6e63c6856df","src/compact/types.rs":"026bd27fef115fb8546efc03baa54552495d23ceebbbae342679bde32c48ce2e","src/diagnostic_filter.rs":"1afa6eb4627b404474b7c69f028b47434efb14ec42adee10bb61232ecd3140e7","src/error.rs":"ca7b251c0d09e4cc46a79a3c249c6849a85b5a6c6745b35ae613166fc30b50ba","src/front/atomic_upgrade.rs":"9c7e1cdfc1218c9d11b8c99339c050ae98fd628f030cab2da0ebc1d7b1fbe17d","src/front/glsl/ast.rs":"79d7178631f1c1ebe29af1b8cbab5c7b08a3cfb61fe6f2208b6b796e5cb15e2e","src/front/glsl/builtins.rs":"c4bcdf6e5ed6333baa638d35f448d4c128ccd6b11b1699b10ee641abf18fec7e","src/front/glsl/context.rs":"d054644a076bbca5de0a03413fa37f8bd33862b6559a38e90c549bcb057a8898","src/front/glsl/error.rs":"b91af75612c224eeb51a2205ada2bc5d0808d3cd94d1f0a8842f475ee6396f82","src/front/glsl/functions.rs":"5ea6742833a54a32c9f435496eae6f7a8a363da2ed83f707bc0e7cd663cd03e3","src/front/glsl/lex.rs":"a6b545da840ee8102596c4290e77dae26da08b072e9eeea70d9cdbbce1d6e8c7","src/front/glsl/mod.rs":"bf97bf1710d5d1f8facb77913cb82868697920914a96ed309adf0f19154a2ab4","src/front/glsl/offset.rs":"78816d52527131d774c4a7fc21146d1450bdca777e2c91df226da460f81a5530","src/front/glsl/parser.rs":"98b937cda012c1a77d27846da40cc482112014ad1c7bcb8f953cc99370ed8b85","src/front/glsl/parser/declarations.rs":"b6c1348c4954c78cc3781e7e91df04e58a1e133842a7cfb9aa32ba4a40aee8ac","src/front/glsl/parser/expressions.rs":"c18eb3ca46dcba89f9c8a9ed00d5b824138398905737fb4457b4ac02e7097c47","src/front/glsl/parser/functions.rs":"f13347c2644f20bf0e775a1b460f618e3d1d2ddaebb810e6f4882a0fa147550d","src/front/glsl/parser/types.rs":"e3cca02746b21f7d1c293a319deea4d4654b64ab92409620911381a91378aef2","src/front/glsl/parser_tests.rs":"c44ed3252096c83a0ce1ea9be8d2b867784cdc1c11aa4501aee1a85d86c62511","src/front/glsl/token.rs":"c25c489b152ee2d445ace3c2046473abe64d558b8d27fa08709110e58718b6ac","src/front/glsl/types.rs":"651c3692768493adf26b3cdb394fd2ce45f9803f9561619c16d9d00af4bbddac","src/front/glsl/variables.rs":"4b95ce4e6dd76bcf8eec5e54f4be85ead6062a59e1235cfdbbfc8cf3f1671a83","src/front/interpolator.rs":"9b6ca498d5fbd9bc1515510a04e303a00b324121d7285da3c955cfe18eb4224c","src/front/mod.rs":"ba984fc9b933a844fa8dadf05dea70f308911054ad3f10448d652706e158b4bd","src/front/spv/convert.rs":"c2ec1288cb565c7c7cb1fadc6a677b41bd14857b3b55ab7fafe7b856204a5179","src/front/spv/error.rs":"6835a4fd90f675a90b39eb2af52c689d0339668d89f2fe5ba9a0afa5b7f0a561","src/front/spv/function.rs":"04682910667fd70f752b8660c6574b4c95bb43b2737700a85acaff6674a9e155","src/front/spv/image.rs":"676f7c71a2c12d2ce75ca96d7a79dea2a3db1f1f665a0c10e3d6d658791ce2ef","src/front/spv/mod.rs":"50b63c5dcf9dcff11dcb860624a8e9262ec9b1fd27ec5112b8bf5eb479b4c68b","src/front/spv/null.rs":"a8ff44e97ffe42a4773d89b88fdb3a8ef8fba58bf6645c73b7a66470234ccf10","src/front/type_gen.rs":"4fef73f32ffa7a88242f187646bada4ea10b94721b4e1cae57da3b1335086dfe","src/front/wgsl/error.rs":"2f23dcbf990f2b2d863ce841cce076a9b7744108cdf9119ac408612851fbc439","src/front/wgsl/index.rs":"caf16ac352824d580a5073253ec13a284cb66d6dbe7b9ac08262fc722e31292a","src/front/wgsl/lower/construction.rs":"5facd234f4e251a323dc21a9ba40f308a1a0d08de8f979978f9bacf9e332949d","src/front/wgsl/lower/conversion.rs":"b78708892a66f095f147c8dd28d55fc43367ccac4eb0757ee357370d5d05f253","src/front/wgsl/lower/mod.rs":"bb1966a17770994c00860fb04960ca74916c3dc6742f20f3c0f7b42ca58c9e73","src/front/wgsl/mod.rs":"89acb71816d78e553cdbbd43b16a0beb2ea573ff17afb96171c9a02b63abfb80","src/front/wgsl/parse/ast.rs":"842f9c5c5a4d0fc2af8dfcc4746474e4119899dce882e8696a537e2e497527e3","src/front/wgsl/parse/conv.rs":"95942e5b0423943bb88903d2eb69ce21debd4bae7b1ff12ac317b8ca4e98c7d1","src/front/wgsl/parse/directive.rs":"3beee2d7d0dd2e5fa2cc91adf41b99b182f790dd5758ef8cd0421934e32df888","src/front/wgsl/parse/directive/enable_extension.rs":"3e2c6b21603b3d52bddf3c3ef872fa1027a74e11c0a8ded7a3b507b775a5b6ce","src/front/wgsl/parse/directive/language_extension.rs":"b769f340f4f89410734d0d0fa3bc8530eb10ddb05bbd175da7bf61b062334cc0","src/front/wgsl/parse/lexer.rs":"234636e07df580ee5e7b7557dd1f16643227bedc5dde11659c852c8c81896f27","src/front/wgsl/parse/mod.rs":"3b026907950bf702d8923edc88056080185a31092bf6550e9151f65f731337d5","src/front/wgsl/parse/number.rs":"4828ee57a87da95f42060100f71c7b54e414793431e50d35bd9c3ea967af81ba","src/front/wgsl/tests.rs":"73fd17ae675200ec075562f39c2cbd493c7be3dbda5730e4008f38c98f13fb2e","src/front/wgsl/to_wgsl.rs":"6927884d7562d80687bf8207fc5c8b71cd146e6f366c97fa82abef5a0738b39f","src/keywords/mod.rs":"47a6fde012bf7d1e70f0fac7762f6a8e7dca6b9bbb99e2cada773c61527cfbfe","src/keywords/wgsl.rs":"c648ac44241ad55c8c8bad3d8f1bab973d11ddb9c380dcca369b735ed3975309","src/lib.rs":"b6671c3d0d7ffbdb04e1c9b2b2527526bebbe2760425d4a6fcf00fcb5c6567a1","src/non_max_u32.rs":"3f4aafc8e2775982187507d49e7aa58befffdaba71c9287be42afdfde28bcb66","src/proc/constant_evaluator.rs":"8cafff7395b3e21c430dd22a16c99d080577062de18d59eeb26994493e970506","src/proc/emitter.rs":"39ac886c651e2ad33c06a676a7e4826a0e93de0af660c01e8e4b1f7406742f88","src/proc/index.rs":"6214182b9484078d46fa066265d4554d3dc40d646295c2623d9888240ea1d45e","src/proc/layouter.rs":"e95fd9defa08e0c610d22d7cd795a6af787610d1ff0d4ed27798b4ffd2098cf1","src/proc/mod.rs":"7001168c3f659c733627b7e26c9a19d8d71b8165c6b1df75c570466c9e6de1c7","src/proc/namer.rs":"7328fac41e40890c64c7ee2fa985a4395424f18b08d30f30ca2583fdabd2fd35","src/proc/terminator.rs":"66b0082dce3b29d6d20e9a891c66524d756c8e567ac844d61355248ac4623b07","src/proc/type_methods.rs":"9345f2e3e6c09b3ab14d3c166ea903ec63b5cb634b88f6837c7463f76e21ea41","src/proc/typifier.rs":"01820d774e34dbd66937e87fdc3e9b2ebb7f1442480ae03d08b8f65d9f084376","src/span.rs":"7dc912e50c62ab8088c21f7a63752f29e58e0c3c0de377c9e116062492ecc6ec","src/valid/analyzer.rs":"c67e47a158e134f6f140faf7c7025a7c9c41c8f8708b452797215b18052d1a4d","src/valid/compose.rs":"83e4c09c39f853cf085b83b87e48b3db571da619132960d3ec954ebdfb0a74f2","src/valid/expression.rs":"6f97f07374fa46515c23d56ec8b72afb3e0e04b27e0a9ed8f9ab3b56c9db34fd","src/valid/function.rs":"e9340b0cfce8625888535c784c433fdcd8b794c7a610b67a0884c669d10d507a","src/valid/handles.rs":"98babae4dfbbc6cf832352b2d2e159697dcd69165e64288f4fa96eb69ad5a60e","src/valid/interface.rs":"5683a477212cb0d88a063843d23e8092e5b6df817f12f6ada938ad72a9a908a3","src/valid/mod.rs":"8318c1ecb71361e49f0a98342957dfc25d3b08ba3b07a492ce7b63c5765edf48","src/valid/type.rs":"b93d203ed9d51c1e2cbb76b382f00c8edf0ec5b2da5be23d27ce70ac919371b6"},"package":null} \ No newline at end of file diff --git a/third_party/rust/naga/Cargo.toml b/third_party/rust/naga/Cargo.toml index 364340b50124..8e9c9abc359f 100644 --- a/third_party/rust/naga/Cargo.toml +++ b/third_party/rust/naga/Cargo.toml @@ -11,7 +11,7 @@ [package] edition = "2021" -rust-version = "1.82.0" +rust-version = "1.76" name = "naga" version = "24.0.0" authors = ["gfx-rs developers"] @@ -104,7 +104,7 @@ version = "0.8" default-features = false [dependencies.bitflags] -version = "2.9" +version = "2.7" [dependencies.codespan-reporting] version = "0.11.0" @@ -211,8 +211,3 @@ version = "2" [build-dependencies.cfg_aliases] version = "0.2.1" - -[lints.clippy] -alloc_instead_of_core = "warn" -std_instead_of_alloc = "warn" -std_instead_of_core = "warn" diff --git a/third_party/rust/naga/README.md b/third_party/rust/naga/README.md index 254ec4f8265e..b5e98bb7273c 100644 --- a/third_party/rust/naga/README.md +++ b/third_party/rust/naga/README.md @@ -4,7 +4,7 @@ [![Crates.io](https://img.shields.io/crates/v/naga.svg?label=naga)](https://crates.io/crates/naga) [![Docs.rs](https://docs.rs/naga/badge.svg)](https://docs.rs/naga) [![Build Status](https://github.com/gfx-rs/naga/workflows/pipeline/badge.svg)](https://github.com/gfx-rs/naga/actions) -![MSRV](https://img.shields.io/badge/rustc-1.82-blue.svg) +![MSRV](https://img.shields.io/badge/rustc-1.76+-blue.svg) [![codecov.io](https://codecov.io/gh/gfx-rs/naga/branch/master/graph/badge.svg?token=9VOKYO8BM2)](https://codecov.io/gh/gfx-rs/naga) The shader translation library for the needs of [wgpu](https://github.com/gfx-rs/wgpu). diff --git a/third_party/rust/naga/src/arena/handle.rs b/third_party/rust/naga/src/arena/handle.rs index 5c67383c1d3e..d486d6e054c4 100644 --- a/third_party/rust/naga/src/arena/handle.rs +++ b/third_party/rust/naga/src/arena/handle.rs @@ -5,7 +5,7 @@ //! [`Arena`]: super::Arena //! [`UniqueArena`]: super::UniqueArena -use core::{cmp::Ordering, fmt, hash, marker::PhantomData}; +use std::{cmp::Ordering, fmt, hash, marker::PhantomData}; /// An unique index in the arena array that a handle points to. /// The "non-max" part ensures that an `Option>` has @@ -22,7 +22,7 @@ pub struct BadHandle { impl BadHandle { pub fn new(handle: Handle) -> Self { Self { - kind: core::any::type_name::(), + kind: std::any::type_name::(), index: handle.index(), } } diff --git a/third_party/rust/naga/src/arena/handle_set.rs b/third_party/rust/naga/src/arena/handle_set.rs index 239dc429346f..f2ce058d12fc 100644 --- a/third_party/rust/naga/src/arena/handle_set.rs +++ b/third_party/rust/naga/src/arena/handle_set.rs @@ -12,7 +12,7 @@ pub struct HandleSet { members: bit_set::BitSet, /// This type is indexed by values of type `T`. - as_keys: core::marker::PhantomData, + as_keys: std::marker::PhantomData, } impl HandleSet { @@ -21,7 +21,7 @@ impl HandleSet { Self { len: 0, members: bit_set::BitSet::new(), - as_keys: core::marker::PhantomData, + as_keys: std::marker::PhantomData, } } @@ -35,7 +35,7 @@ impl HandleSet { Self { len, members: bit_set::BitSet::with_capacity(len), - as_keys: core::marker::PhantomData, + as_keys: std::marker::PhantomData, } } @@ -103,7 +103,7 @@ impl ArenaType for Arena { } } -impl ArenaType for UniqueArena { +impl ArenaType for UniqueArena { fn len(&self) -> usize { self.len() } diff --git a/third_party/rust/naga/src/arena/handlevec.rs b/third_party/rust/naga/src/arena/handlevec.rs index ba3b3c0aa891..2ddb65c9a460 100644 --- a/third_party/rust/naga/src/arena/handlevec.rs +++ b/third_party/rust/naga/src/arena/handlevec.rs @@ -1,10 +1,9 @@ //! The [`HandleVec`] type and associated definitions. use super::handle::Handle; -use alloc::{vec, vec::Vec}; -use core::marker::PhantomData; -use core::ops; +use std::marker::PhantomData; +use std::ops; /// A [`Vec`] indexed by [`Handle`]s. /// @@ -18,7 +17,7 @@ use core::ops; /// current length; otherwise, the insertion will panic. /// /// [`insert`]: HandleVec::insert -/// [`HashMap::insert`]: hashbrown::HashMap::insert +/// [`HashMap::insert`]: std::collections::HashMap::insert #[derive(Debug)] pub(crate) struct HandleVec { inner: Vec, @@ -60,7 +59,7 @@ impl HandleVec { /// the end, like [`Vec::push`]. So the index of `handle` must equal /// [`self.len()`]. /// - /// [`HashMap`]: hashbrown::HashMap + /// [`HashMap`]: std::collections::HashMap /// [`self.len()`]: HandleVec::len pub(crate) fn insert(&mut self, handle: Handle, value: U) { assert_eq!(handle.index(), self.inner.len()); diff --git a/third_party/rust/naga/src/arena/mod.rs b/third_party/rust/naga/src/arena/mod.rs index fa78332cf7b4..014c5167c695 100644 --- a/third_party/rust/naga/src/arena/mod.rs +++ b/third_party/rust/naga/src/arena/mod.rs @@ -31,13 +31,12 @@ pub(crate) use handlevec::HandleVec; pub use range::{BadRangeError, Range}; pub use unique_arena::UniqueArena; -use alloc::vec::Vec; -use core::{fmt, ops}; - use crate::Span; use handle::Index; +use std::{fmt, ops}; + /// An arena holding some kind of component (e.g., type, constant, /// instruction, etc.) that can be referenced. /// @@ -104,7 +103,7 @@ impl Arena { /// Drains the arena, returning an iterator over the items stored. pub fn drain(&mut self) -> impl DoubleEndedIterator, T, Span)> { - let arena = core::mem::take(self); + let arena = std::mem::take(self); arena .data .into_iter() @@ -259,7 +258,7 @@ where D: serde::Deserializer<'de>, { let data = Vec::deserialize(deserializer)?; - let span_info = core::iter::repeat(Span::default()) + let span_info = std::iter::repeat(Span::default()) .take(data.len()) .collect(); diff --git a/third_party/rust/naga/src/arena/range.rs b/third_party/rust/naga/src/arena/range.rs index b2bf143bfebd..b448f83c8c6f 100644 --- a/third_party/rust/naga/src/arena/range.rs +++ b/third_party/rust/naga/src/arena/range.rs @@ -5,13 +5,13 @@ //! //! [`Arena`]: super::Arena -use core::{fmt, marker::PhantomData, ops}; - use super::{ handle::{Handle, Index}, Arena, }; +use std::{fmt, marker::PhantomData, ops}; + /// A strongly typed range of handles. #[cfg_attr(feature = "serialize", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] @@ -51,7 +51,7 @@ pub struct BadRangeError { impl BadRangeError { pub fn new(range: Range) -> Self { Self { - kind: core::any::type_name::(), + kind: std::any::type_name::(), range: range.erase_type(), } } diff --git a/third_party/rust/naga/src/arena/unique_arena.rs b/third_party/rust/naga/src/arena/unique_arena.rs index cdf2426801f4..9f5e26df1110 100644 --- a/third_party/rust/naga/src/arena/unique_arena.rs +++ b/third_party/rust/naga/src/arena/unique_arena.rs @@ -1,10 +1,10 @@ //! The [`UniqueArena`] type and supporting definitions. -use alloc::vec::Vec; -use core::{fmt, hash, ops}; +use crate::{FastIndexSet, Span}; use super::handle::{BadHandle, Handle, Index}; -use crate::{FastIndexSet, Span}; + +use std::{fmt, hash, ops}; /// An arena whose elements are guaranteed to be unique. /// @@ -84,7 +84,7 @@ impl UniqueArena { #[cfg(feature = "compact")] pub struct UniqueArenaDrain<'a, T> { inner_elts: indexmap::set::Drain<'a, T>, - inner_spans: alloc::vec::Drain<'a, Span>, + inner_spans: std::vec::Drain<'a, Span>, index: Index, } @@ -224,9 +224,7 @@ where D: serde::Deserializer<'de>, { let set = FastIndexSet::deserialize(deserializer)?; - let span_info = core::iter::repeat(Span::default()) - .take(set.len()) - .collect(); + let span_info = std::iter::repeat(Span::default()).take(set.len()).collect(); Ok(Self { set, span_info }) } diff --git a/third_party/rust/naga/src/back/continue_forward.rs b/third_party/rust/naga/src/back/continue_forward.rs index 41e35b81fa73..b880c175733b 100644 --- a/third_party/rust/naga/src/back/continue_forward.rs +++ b/third_party/rust/naga/src/back/continue_forward.rs @@ -59,9 +59,8 @@ //! [`Switch`]: crate::Statement::Switch //! [`SwitchCase`]: crate::SwitchCase -use alloc::{rc::Rc, string::String, vec::Vec}; - use crate::proc::Namer; +use std::rc::Rc; /// A summary of the code surrounding a statement. enum Nesting { diff --git a/third_party/rust/naga/src/back/dot/mod.rs b/third_party/rust/naga/src/back/dot/mod.rs index dd8246f90d1a..67b1b9dc92e6 100644 --- a/third_party/rust/naga/src/back/dot/mod.rs +++ b/third_party/rust/naga/src/back/dot/mod.rs @@ -7,19 +7,16 @@ of IR inspection and debugging. [dot]: https://graphviz.org/doc/info/lang.html */ -use alloc::{ - borrow::Cow, - format, - string::{String, ToString}, - vec::Vec, -}; -use core::fmt::{Error as FmtError, Write as _}; - use crate::{ arena::Handle, valid::{FunctionInfo, ModuleInfo}, }; +use std::{ + borrow::Cow, + fmt::{Error as FmtError, Write as _}, +}; + /// Configuration options for the dot backend #[derive(Clone, Default)] pub struct Options { @@ -415,26 +412,26 @@ const COLORS: &[&str] = &[ struct Prefixed(Handle); -impl core::fmt::Display for Prefixed { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for Prefixed { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "e") } } -impl core::fmt::Display for Prefixed { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for Prefixed { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "l") } } -impl core::fmt::Display for Prefixed { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for Prefixed { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "g") } } -impl core::fmt::Display for Prefixed { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for Prefixed { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "f") } } @@ -727,11 +724,6 @@ fn write_function_expressions( } E::SubgroupBallotResult => ("SubgroupBallotResult".into(), 4), E::SubgroupOperationResult { .. } => ("SubgroupOperationResult".into(), 4), - E::RayQueryVertexPositions { query, committed } => { - edges.insert("", query); - let ty = if committed { "Committed" } else { "Candidate" }; - (format!("get{}HitVertexPositions", ty).into(), 4) - } }; // give uniform expressions an outline @@ -801,7 +793,7 @@ pub fn write( mod_info: Option<&ModuleInfo>, options: Options, ) -> Result { - use core::fmt::Write as _; + use std::fmt::Write as _; let mut output = String::new(); output += "digraph Module {\n"; diff --git a/third_party/rust/naga/src/back/glsl/features.rs b/third_party/rust/naga/src/back/glsl/features.rs index eded4b688fcb..bef54bd4f800 100644 --- a/third_party/rust/naga/src/back/glsl/features.rs +++ b/third_party/rust/naga/src/back/glsl/features.rs @@ -1,11 +1,10 @@ -use core::fmt::Write; - use super::{BackendResult, Error, Version, Writer}; use crate::{ back::glsl::{Options, WriterFlags}, AddressSpace, Binding, Expression, Handle, ImageClass, ImageDimension, Interpolation, SampleLevel, Sampling, Scalar, ScalarKind, ShaderStage, StorageFormat, Type, TypeInner, }; +use std::fmt::Write; bitflags::bitflags! { /// Structure used to encode additions to GLSL that aren't supported by all versions. @@ -463,7 +462,7 @@ impl Writer<'_, W> { .functions .iter() .map(|(h, f)| (&f.expressions, &info[h])) - .chain(core::iter::once(( + .chain(std::iter::once(( &entry_point.function.expressions, info.get_entry_point(entry_point_idx as usize), ))) @@ -560,7 +559,7 @@ impl Writer<'_, W> { .functions .iter() .map(|(_, f)| &f.body) - .chain(core::iter::once(&entry_point.function.body)) + .chain(std::iter::once(&entry_point.function.body)) { for (stmt, _) in blocks.span_iter() { match *stmt { diff --git a/third_party/rust/naga/src/back/glsl/mod.rs b/third_party/rust/naga/src/back/glsl/mod.rs index 4c672c11b72a..3458ca156113 100644 --- a/third_party/rust/naga/src/back/glsl/mod.rs +++ b/third_party/rust/naga/src/back/glsl/mod.rs @@ -45,29 +45,19 @@ to output a [`Module`](crate::Module) into glsl pub use features::Features; -use alloc::{ - borrow::ToOwned, - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::{ - cmp::Ordering, - fmt::{self, Error as FmtError, Write}, - mem, -}; - -use hashbrown::hash_map; -use thiserror::Error; - use crate::{ back::{self, Baked}, - common, proc::{self, ExpressionKindTracker, NameKey}, valid, Handle, ShaderStage, TypeInner, }; use features::FeaturesManager; +use hashbrown::hash_map; +use std::{ + cmp::Ordering, + fmt::{self, Error as FmtError, Write}, + mem, +}; +use thiserror::Error; /// Contains the features related code and the features querying method mod features; @@ -112,7 +102,7 @@ where } /// Mapping between resources and bindings. -pub type BindingMap = alloc::collections::BTreeMap; +pub type BindingMap = std::collections::BTreeMap; impl crate::AtomicFunction { const fn to_glsl(self) -> &'static str { @@ -330,7 +320,7 @@ pub struct PipelineOptions { /// If no entry point that matches is found while creating a [`Writer`], a error will be thrown. pub entry_point: String, /// How many views to render to, if doing multiview rendering. - pub multiview: Option, + pub multiview: Option, } #[derive(Debug)] @@ -592,7 +582,7 @@ pub struct Writer<'a, W> { /// transformed to `do {} while(false);` loops. continue_ctx: back::continue_forward::ContinueCtx, /// How many views to render to, if doing multiview rendering. - multiview: Option, + multiview: Option, /// Mapping of varying variables to their location. Needed for reflections. varying: crate::FastHashMap, } @@ -1083,8 +1073,8 @@ impl<'a, W: Write> Writer<'a, W> { | TypeInner::Struct { .. } | TypeInner::Image { .. } | TypeInner::Sampler { .. } - | TypeInner::AccelerationStructure { .. } - | TypeInner::RayQuery { .. } + | TypeInner::AccelerationStructure + | TypeInner::RayQuery | TypeInner::BindingArray { .. } => { return Err(Error::Custom(format!("Unable to write type {inner:?}"))) } @@ -2213,7 +2203,8 @@ impl<'a, W: Write> Writer<'a, W> { self.write_stmt(sta, ctx, l2.next())?; } - if !case.fall_through && case.body.last().is_none_or(|s| !s.is_terminator()) + if !case.fall_through + && case.body.last().map_or(true, |s| !s.is_terminator()) { writeln!(self.out, "{}break;", l2.next())?; } @@ -3447,7 +3438,7 @@ impl<'a, W: Write> Writer<'a, W> { TypeInner::Vector { size, .. } => write!( self.out, ", vec{}(0.0), vec{0}(1.0)", - common::vector_size_str(size) + back::vector_size_str(size) )?, _ => write!(self.out, ", 0.0, 1.0")?, } @@ -3594,7 +3585,7 @@ impl<'a, W: Write> Writer<'a, W> { Mf::CountTrailingZeros => { match *ctx.resolve_type(arg, &self.module.types) { TypeInner::Vector { size, scalar, .. } => { - let s = common::vector_size_str(size); + let s = back::vector_size_str(size); if let crate::ScalarKind::Uint = scalar.kind { write!(self.out, "min(uvec{s}(findLSB(")?; self.write_expr(arg, ctx)?; @@ -3624,7 +3615,7 @@ impl<'a, W: Write> Writer<'a, W> { if self.options.version.supports_integer_functions() { match *ctx.resolve_type(arg, &self.module.types) { TypeInner::Vector { size, scalar } => { - let s = common::vector_size_str(size); + let s = back::vector_size_str(size); if let crate::ScalarKind::Uint = scalar.kind { write!(self.out, "uvec{s}(ivec{s}(31) - findMSB(")?; @@ -3655,7 +3646,7 @@ impl<'a, W: Write> Writer<'a, W> { } else { match *ctx.resolve_type(arg, &self.module.types) { TypeInner::Vector { size, scalar } => { - let s = common::vector_size_str(size); + let s = back::vector_size_str(size); if let crate::ScalarKind::Uint = scalar.kind { write!(self.out, "uvec{s}(")?; @@ -4018,8 +4009,7 @@ impl<'a, W: Write> Writer<'a, W> { write!(self.out, ".length())")? } // not supported yet - Expression::RayQueryGetIntersection { .. } - | Expression::RayQueryVertexPositions { .. } => unreachable!(), + Expression::RayQueryGetIntersection { .. } => unreachable!(), } Ok(()) @@ -4639,9 +4629,6 @@ impl<'a, W: Write> Writer<'a, W> { if flags.contains(crate::Barrier::SUB_GROUP) { writeln!(self.out, "{level}subgroupMemoryBarrier();")?; } - if flags.contains(crate::Barrier::TEXTURE) { - writeln!(self.out, "{level}memoryBarrierImage();")?; - } writeln!(self.out, "{level}barrier();")?; Ok(()) } diff --git a/third_party/rust/naga/src/back/hlsl/conv.rs b/third_party/rust/naga/src/back/hlsl/conv.rs index 6553745ac2d6..a4c6c1941d14 100644 --- a/third_party/rust/naga/src/back/hlsl/conv.rs +++ b/third_party/rust/naga/src/back/hlsl/conv.rs @@ -1,9 +1,8 @@ -use crate::common; +use std::borrow::Cow; -use alloc::{borrow::Cow, format, string::String}; +use crate::proc::Alignment; use super::Error; -use crate::proc::Alignment; impl crate::ScalarKind { pub(super) fn to_hlsl_cast(self) -> &'static str { @@ -90,7 +89,7 @@ impl crate::TypeInner { crate::TypeInner::Vector { size, scalar } => Cow::Owned(format!( "{}{}", scalar.to_hlsl_str()?, - common::vector_size_str(size) + crate::back::vector_size_str(size) )), crate::TypeInner::Matrix { columns, @@ -99,8 +98,8 @@ impl crate::TypeInner { } => Cow::Owned(format!( "{}{}x{}", scalar.to_hlsl_str()?, - common::vector_size_str(columns), - common::vector_size_str(rows), + crate::back::vector_size_str(columns), + crate::back::vector_size_str(rows), )), crate::TypeInner::Array { base, diff --git a/third_party/rust/naga/src/back/hlsl/help.rs b/third_party/rust/naga/src/back/hlsl/help.rs index f0bfcfc5740c..6a69f84b2d9c 100644 --- a/third_party/rust/naga/src/back/hlsl/help.rs +++ b/third_party/rust/naga/src/back/hlsl/help.rs @@ -26,18 +26,16 @@ int dim_1d = NagaDimensions1D(image_1d); ``` */ -use alloc::format; -use core::fmt::Write; - use super::{ super::FunctionCtx, writer::{ ABS_FUNCTION, DIV_FUNCTION, EXTRACT_BITS_FUNCTION, INSERT_BITS_FUNCTION, MOD_FUNCTION, NEG_FUNCTION, }, - BackendResult, WrappedType, + BackendResult, }; use crate::{arena::Handle, proc::NameKey, ScalarKind}; +use std::fmt::Write; #[derive(Clone, Copy, Debug, Hash, Eq, Ord, PartialEq, PartialOrd)] pub(super) struct WrappedArrayLength { @@ -939,7 +937,7 @@ impl super::Writer<'_, W> { match module.types[ty].inner { crate::TypeInner::Struct { .. } | crate::TypeInner::Array { .. } => { let constructor = WrappedConstructor { ty }; - if self.wrapped.insert(WrappedType::Constructor(constructor)) { + if self.wrapped.constructors.insert(constructor) { self.write_wrapped_constructor_function(module, constructor)?; } } @@ -955,7 +953,7 @@ impl super::Writer<'_, W> { } => { if format.single_component() { let scalar: crate::Scalar = format.into(); - if self.wrapped.insert(WrappedType::ImageLoadScalar(scalar)) { + if self.wrapped.image_load_scalars.insert(scalar) { self.write_loaded_scalar_to_storage_loaded_value(scalar)?; } } @@ -991,7 +989,7 @@ impl super::Writer<'_, W> { for (handle, _) in expressions.iter() { if let crate::Expression::ZeroValue(ty) = expressions[handle] { let zero_value = WrappedZeroValue { ty }; - if self.wrapped.insert(WrappedType::ZeroValue(zero_value)) { + if self.wrapped.zero_values.insert(zero_value) { self.write_wrapped_zero_value_function(module, zero_value)?; } } @@ -1038,7 +1036,7 @@ impl super::Writer<'_, W> { components, }; - if !self.wrapped.insert(WrappedType::Math(wrapped)) { + if !self.wrapped.math.insert(wrapped) { continue; } @@ -1080,7 +1078,7 @@ impl super::Writer<'_, W> { components, }; - if !self.wrapped.insert(WrappedType::Math(wrapped)) { + if !self.wrapped.math.insert(wrapped) { continue; } @@ -1149,7 +1147,7 @@ impl super::Writer<'_, W> { components, }; - if !self.wrapped.insert(WrappedType::Math(wrapped)) { + if !self.wrapped.math.insert(wrapped) { continue; } @@ -1200,7 +1198,7 @@ impl super::Writer<'_, W> { // find another solution for different bit-widths. match (op, scalar) { (crate::UnaryOperator::Negate, crate::Scalar::I32) => { - if !self.wrapped.insert(WrappedType::UnaryOp(wrapped)) { + if !self.wrapped.unary_op.insert(wrapped) { continue; } @@ -1261,7 +1259,7 @@ impl super::Writer<'_, W> { left_ty: left_wrapped_ty, right_ty: right_wrapped_ty, }; - if !self.wrapped.insert(WrappedType::BinaryOp(wrapped)) { + if !self.wrapped.binary_op.insert(wrapped) { continue; } @@ -1317,7 +1315,7 @@ impl super::Writer<'_, W> { left_ty: left_wrapped_ty, right_ty: right_wrapped_ty, }; - if !self.wrapped.insert(WrappedType::BinaryOp(wrapped)) { + if !self.wrapped.binary_op.insert(wrapped) { continue; } @@ -1393,7 +1391,7 @@ impl super::Writer<'_, W> { writable: storage_access.contains(crate::StorageAccess::STORE), }; - if self.wrapped.insert(WrappedType::ArrayLength(wal)) { + if self.wrapped.array_lengths.insert(wal) { self.write_wrapped_array_length_function(wal)?; } } @@ -1412,7 +1410,7 @@ impl super::Writer<'_, W> { _ => unreachable!("we only query images"), }; - if self.wrapped.insert(WrappedType::ImageQuery(wiq)) { + if self.wrapped.image_queries.insert(wiq) { self.write_wrapped_image_query_function(module, wiq, handle, func_ctx)?; } } @@ -1441,7 +1439,7 @@ impl super::Writer<'_, W> { } let constructor = WrappedConstructor { ty }; - if writer.wrapped.insert(WrappedType::Constructor(constructor)) { + if writer.wrapped.constructors.insert(constructor) { writer .write_wrapped_constructor_function(module, constructor)?; } @@ -1450,7 +1448,7 @@ impl super::Writer<'_, W> { write_wrapped_constructor(writer, base, module)?; let constructor = WrappedConstructor { ty }; - if writer.wrapped.insert(WrappedType::Constructor(constructor)) { + if writer.wrapped.constructors.insert(constructor) { writer .write_wrapped_constructor_function(module, constructor)?; } @@ -1486,7 +1484,7 @@ impl super::Writer<'_, W> { let ty = base_ty_handle.unwrap(); let access = WrappedStructMatrixAccess { ty, index }; - if self.wrapped.insert(WrappedType::StructMatrixAccess(access)) { + if self.wrapped.struct_matrix_access.insert(access) { self.write_wrapped_struct_matrix_get_function(module, access)?; self.write_wrapped_struct_matrix_set_function(module, access)?; self.write_wrapped_struct_matrix_set_vec_function( @@ -1715,7 +1713,7 @@ impl super::Writer<'_, W> { }) = super::writer::get_inner_matrix_data(module, global.ty) { let entry = WrappedMatCx2 { columns }; - if self.wrapped.insert(WrappedType::MatCx2(entry)) { + if self.wrapped.mat_cx2s.insert(entry) { self.write_mat_cx2_typedef_and_functions(entry)?; } } @@ -1733,7 +1731,7 @@ impl super::Writer<'_, W> { }) = super::writer::get_inner_matrix_data(module, member.ty) { let entry = WrappedMatCx2 { columns }; - if self.wrapped.insert(WrappedType::MatCx2(entry)) { + if self.wrapped.mat_cx2s.insert(entry) { self.write_mat_cx2_typedef_and_functions(entry)?; } } diff --git a/third_party/rust/naga/src/back/hlsl/mod.rs b/third_party/rust/naga/src/back/hlsl/mod.rs index c3d292e16b1a..ceebad56a3e6 100644 --- a/third_party/rust/naga/src/back/hlsl/mod.rs +++ b/third_party/rust/naga/src/back/hlsl/mod.rs @@ -114,9 +114,7 @@ mod ray; mod storage; mod writer; -use alloc::{string::String, vec::Vec}; -use core::fmt::Error as FmtError; - +use std::fmt::Error as FmtError; use thiserror::Error; use crate::{back, proc}; @@ -174,7 +172,7 @@ where } // Using `BTreeMap` instead of `HashMap` so that we can hash itself. -pub type BindingMap = alloc::collections::BTreeMap; +pub type BindingMap = std::collections::BTreeMap; /// A HLSL shader model version. #[allow(non_snake_case, non_camel_case_types)] @@ -298,7 +296,7 @@ where // We use a BTreeMap here so that we can hash it. pub type SamplerIndexBufferBindingMap = - alloc::collections::BTreeMap; + std::collections::BTreeMap; #[cfg_attr(feature = "serialize", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] @@ -324,7 +322,7 @@ where Ok(map) } -pub type DynamicStorageBufferOffsetsTargets = alloc::collections::BTreeMap; +pub type DynamicStorageBufferOffsetsTargets = std::collections::BTreeMap; /// Shorthand result used internally by the backend type BackendResult = Result<(), Error>; @@ -389,9 +387,9 @@ impl Default for Options { fake_missing_bindings: true, special_constants_binding: None, sampler_heap_target: SamplerHeapBindTargets::default(), - sampler_buffer_binding_map: alloc::collections::BTreeMap::default(), + sampler_buffer_binding_map: std::collections::BTreeMap::default(), push_constants_target: None, - dynamic_storage_buffer_offsets_targets: alloc::collections::BTreeMap::new(), + dynamic_storage_buffer_offsets_targets: std::collections::BTreeMap::new(), zero_initialize_workgroup_memory: true, restrict_indexing: true, force_loop_bounding: true, @@ -444,23 +442,18 @@ pub enum Error { Override, } -#[derive(PartialEq, Eq, Hash)] -enum WrappedType { - ZeroValue(help::WrappedZeroValue), - ArrayLength(help::WrappedArrayLength), - ImageQuery(help::WrappedImageQuery), - ImageLoadScalar(crate::Scalar), - Constructor(help::WrappedConstructor), - StructMatrixAccess(help::WrappedStructMatrixAccess), - MatCx2(help::WrappedMatCx2), - Math(help::WrappedMath), - UnaryOp(help::WrappedUnaryOp), - BinaryOp(help::WrappedBinaryOp), -} - #[derive(Default)] struct Wrapped { - types: crate::FastHashSet, + zero_values: crate::FastHashSet, + array_lengths: crate::FastHashSet, + image_queries: crate::FastHashSet, + image_load_scalars: crate::FastHashSet, + constructors: crate::FastHashSet, + struct_matrix_access: crate::FastHashSet, + mat_cx2s: crate::FastHashSet, + math: crate::FastHashSet, + unary_op: crate::FastHashSet, + binary_op: crate::FastHashSet, /// If true, the sampler heaps have been written out. sampler_heaps: bool, // Mapping from SamplerIndexBufferKey to the name the namer returned. @@ -468,12 +461,15 @@ struct Wrapped { } impl Wrapped { - fn insert(&mut self, r#type: WrappedType) -> bool { - self.types.insert(r#type) - } - fn clear(&mut self) { - self.types.clear(); + self.array_lengths.clear(); + self.image_queries.clear(); + self.constructors.clear(); + self.struct_matrix_access.clear(); + self.mat_cx2s.clear(); + self.math.clear(); + self.unary_op.clear(); + self.binary_op.clear(); } } diff --git a/third_party/rust/naga/src/back/hlsl/ray.rs b/third_party/rust/naga/src/back/hlsl/ray.rs index 24eae4b573fd..6f797c7eb46a 100644 --- a/third_party/rust/naga/src/back/hlsl/ray.rs +++ b/third_party/rust/naga/src/back/hlsl/ray.rs @@ -1,7 +1,6 @@ -use core::fmt::Write; - use crate::back::hlsl::BackendResult; use crate::{RayQueryIntersection, TypeInner}; +use std::fmt::Write; impl super::Writer<'_, W> { // constructs hlsl RayDesc from wgsl RayDesc @@ -28,12 +27,7 @@ impl super::Writer<'_, W> { ) -> BackendResult { self.write_type(module, module.special_types.ray_intersection.unwrap())?; write!(self.out, " GetCommittedIntersection(")?; - self.write_value_type( - module, - &TypeInner::RayQuery { - vertex_return: false, - }, - )?; + self.write_value_type(module, &TypeInner::RayQuery)?; writeln!(self.out, " rq) {{")?; write!(self.out, " ")?; self.write_type(module, module.special_types.ray_intersection.unwrap())?; @@ -99,12 +93,7 @@ impl super::Writer<'_, W> { ) -> BackendResult { self.write_type(module, module.special_types.ray_intersection.unwrap())?; write!(self.out, " GetCandidateIntersection(")?; - self.write_value_type( - module, - &TypeInner::RayQuery { - vertex_return: false, - }, - )?; + self.write_value_type(module, &TypeInner::RayQuery)?; writeln!(self.out, " rq) {{")?; write!(self.out, " ")?; self.write_type(module, module.special_types.ray_intersection.unwrap())?; diff --git a/third_party/rust/naga/src/back/hlsl/storage.rs b/third_party/rust/naga/src/back/hlsl/storage.rs index 9f92d866398b..4576a3ace61b 100644 --- a/third_party/rust/naga/src/back/hlsl/storage.rs +++ b/third_party/rust/naga/src/back/hlsl/storage.rs @@ -55,15 +55,14 @@ correct type if necessary. [`Load` and `Store`]: https://github.com/microsoft/DirectXShaderCompiler/wiki/ByteAddressBuffer-Load-Store-Additions */ -use alloc::format; -use core::{fmt, mem}; - use super::{super::FunctionCtx, BackendResult, Error}; use crate::{ proc::{Alignment, NameKey, TypeResolution}, Handle, }; +use std::{fmt, mem}; + const STORE_TEMP_NAME: &str = "_value"; /// One step in accessing a [`Storage`] global's component or element. diff --git a/third_party/rust/naga/src/back/hlsl/writer.rs b/third_party/rust/naga/src/back/hlsl/writer.rs index 02b8e9aaf3ed..96e237013066 100644 --- a/third_party/rust/naga/src/back/hlsl/writer.rs +++ b/third_party/rust/naga/src/back/hlsl/writer.rs @@ -1,10 +1,3 @@ -use alloc::{ - format, - string::{String, ToString}, - vec::Vec, -}; -use core::{fmt, mem}; - use super::{ help, help::{ @@ -16,10 +9,10 @@ use super::{ }; use crate::{ back::{self, Baked}, - common, proc::{self, index, ExpressionKindTracker, NameKey}, valid, Handle, Module, RayQueryFunction, Scalar, ScalarKind, ShaderStage, TypeInner, }; +use std::{fmt, mem}; const LOCATION_SEMANTIC: &str = "LOC"; const SPECIAL_CBUF_TYPE: &str = "NagaConstants"; @@ -1322,7 +1315,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { self.out, "{}{}", scalar.to_hlsl_str()?, - common::vector_size_str(size) + back::vector_size_str(size) )?; } TypeInner::Matrix { @@ -1338,8 +1331,8 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { self.out, "{}{}x{}", scalar.to_hlsl_str()?, - common::vector_size_str(columns), - common::vector_size_str(rows), + back::vector_size_str(columns), + back::vector_size_str(rows), )?; } TypeInner::Image { @@ -1363,10 +1356,10 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { TypeInner::Array { base, size, .. } | TypeInner::BindingArray { base, size } => { self.write_array_size(module, base, size)?; } - TypeInner::AccelerationStructure { .. } => { + TypeInner::AccelerationStructure => { write!(self.out, "RaytracingAccelerationStructure")?; } - TypeInner::RayQuery { .. } => { + TypeInner::RayQuery => { // these are constant flags, there are dynamic flags also but constant flags are not supported by naga write!(self.out, "RayQuery")?; } @@ -1541,7 +1534,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { match module.types[local.ty].inner { // from https://microsoft.github.io/DirectX-Specs/d3d/Raytracing.html#tracerayinline-example-1 it seems that ray queries shouldn't be zeroed - TypeInner::RayQuery { .. } => {} + TypeInner::RayQuery => {} _ => { write!(self.out, " = ")?; // Write the local initializer if needed @@ -1722,14 +1715,14 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { } let last_case = &cases[end_case_idx]; - if last_case.body.last().is_none_or(|s| !s.is_terminator()) { + if last_case.body.last().map_or(true, |s| !s.is_terminator()) { writeln!(self.out, "{indent_level_2}break;")?; } } else { for sta in case.body.iter() { self.write_stmt(module, sta, func_ctx, indent_level_2)?; } - if !case.fall_through && case.body.last().is_none_or(|s| !s.is_terminator()) { + if !case.fall_through && case.body.last().map_or(true, |s| !s.is_terminator()) { writeln!(self.out, "{indent_level_2}break;")?; } } @@ -3341,7 +3334,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { self.out, "{}{}(", scalar.to_hlsl_str()?, - common::vector_size_str(size) + back::vector_size_str(size) )?; } TypeInner::Scalar(_) => { @@ -3352,8 +3345,8 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { self.out, "{}{}x{}(", scalar.to_hlsl_str()?, - common::vector_size_str(columns), - common::vector_size_str(rows) + back::vector_size_str(columns), + back::vector_size_str(rows) )?; } _ => { @@ -3954,8 +3947,6 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { write!(self.out, ")")?; } } - // Not supported yet - Expression::RayQueryVertexPositions { .. } => unreachable!(), // Nothing to do here, since call expression already cached Expression::CallResult(_) | Expression::AtomicResult { .. } @@ -4139,9 +4130,6 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { if barrier.contains(crate::Barrier::SUB_GROUP) { // Does not exist in DirectX } - if barrier.contains(crate::Barrier::TEXTURE) { - writeln!(self.out, "{level}DeviceMemoryBarrierWithGroupSync();")?; - } Ok(()) } } diff --git a/third_party/rust/naga/src/back/mod.rs b/third_party/rust/naga/src/back/mod.rs index 0f293ba925db..7e6ca85d49f4 100644 --- a/third_party/rust/naga/src/back/mod.rs +++ b/third_party/rust/naga/src/back/mod.rs @@ -3,8 +3,6 @@ Backend functions that export shader [`Module`](super::Module)s into binary and */ #![allow(dead_code)] // can be dead if none of the enabled backends need it -use alloc::string::String; - use crate::proc::ExpressionKindTracker; #[cfg(dot_out)] @@ -37,15 +35,15 @@ pub type NeedBakeExpressions = crate::FastHashSet); -impl core::fmt::Display for Baked { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for Baked { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "_e") } } @@ -69,8 +67,8 @@ impl Level { } } -impl core::fmt::Display for Level { - fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> { +impl std::fmt::Display for Level { + fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { (0..self.0).try_for_each(|_| formatter.write_str(INDENT)) } } @@ -250,13 +248,22 @@ pub const fn binary_operation_str(op: crate::BinaryOperator) -> &'static str { } } +/// Helper function that returns the string corresponding to the [`VectorSize`](crate::VectorSize) +const fn vector_size_str(size: crate::VectorSize) -> &'static str { + match size { + crate::VectorSize::Bi => "2", + crate::VectorSize::Tri => "3", + crate::VectorSize::Quad => "4", + } +} + impl crate::TypeInner { /// Returns true if this is a handle to a type rather than the type directly. pub const fn is_handle(&self) -> bool { match *self { crate::TypeInner::Image { .. } | crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } => true, + | crate::TypeInner::AccelerationStructure => true, _ => false, } } diff --git a/third_party/rust/naga/src/back/msl/mod.rs b/third_party/rust/naga/src/back/msl/mod.rs index 86dcd58eb7b4..b9e24454e94b 100644 --- a/third_party/rust/naga/src/back/msl/mod.rs +++ b/third_party/rust/naga/src/back/msl/mod.rs @@ -31,14 +31,8 @@ holding the result. */ -use alloc::{ - format, - string::{String, ToString}, - vec::Vec, -}; -use core::fmt::{Error as FmtError, Write}; - use crate::{arena::Handle, proc::index, valid::ModuleInfo}; +use std::fmt::{Error as FmtError, Write}; mod keywords; pub mod sampler; @@ -91,7 +85,7 @@ where } // Using `BTreeMap` instead of `HashMap` so that we can hash itself. -pub type BindingMap = alloc::collections::BTreeMap; +pub type BindingMap = std::collections::BTreeMap; #[derive(Clone, Debug, Default, Hash, Eq, PartialEq)] #[cfg_attr(feature = "serialize", derive(serde::Serialize))] @@ -112,7 +106,7 @@ pub struct EntryPointResources { pub sizes_buffer: Option, } -pub type EntryPointResourceMap = alloc::collections::BTreeMap; +pub type EntryPointResourceMap = std::collections::BTreeMap; enum ResolvedBinding { BuiltIn(crate::BuiltIn), @@ -729,5 +723,6 @@ pub fn write_string( #[test] fn test_error_size() { + use std::mem::size_of; assert_eq!(size_of::(), 32); } diff --git a/third_party/rust/naga/src/back/msl/sampler.rs b/third_party/rust/naga/src/back/msl/sampler.rs index e075f8cc21a9..0bf987076d2a 100644 --- a/third_party/rust/naga/src/back/msl/sampler.rs +++ b/third_party/rust/naga/src/back/msl/sampler.rs @@ -1,9 +1,8 @@ -use core::{num::NonZeroU32, ops::Range}; - #[cfg(feature = "deserialize")] use serde::Deserialize; #[cfg(feature = "serialize")] use serde::Serialize; +use std::{num::NonZeroU32, ops::Range}; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serialize", derive(Serialize))] @@ -159,8 +158,8 @@ impl Eq for InlineSampler {} #[allow(renamed_and_removed_lints)] #[allow(clippy::derive_hash_xor_eq)] -impl core::hash::Hash for InlineSampler { - fn hash(&self, hasher: &mut H) { +impl std::hash::Hash for InlineSampler { + fn hash(&self, hasher: &mut H) { self.coord.hash(hasher); self.address.hash(hasher); self.border_color.hash(hasher); diff --git a/third_party/rust/naga/src/back/msl/writer.rs b/third_party/rust/naga/src/back/msl/writer.rs index bd90b96b6b6b..bc77a7f6d0c9 100644 --- a/third_party/rust/naga/src/back/msl/writer.rs +++ b/third_party/rust/naga/src/back/msl/writer.rs @@ -1,25 +1,16 @@ -use alloc::{ - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::{ - fmt::{Display, Error as FmtError, Formatter, Write}, - iter, -}; - use super::{sampler as sm, Error, LocationMode, Options, PipelineOptions, TranslationInfo}; use crate::{ arena::{Handle, HandleSet}, back::{self, Baked}, - common, proc::{self, index, ExpressionKindTracker, NameKey, TypeResolution}, valid, FastHashMap, FastHashSet, }; - #[cfg(test)] -use core::ptr; +use std::ptr; +use std::{ + fmt::{Display, Error as FmtError, Formatter, Write}, + iter, +}; /// Shorthand result used internally by the backend type BackendResult = Result<(), Error>; @@ -81,7 +72,7 @@ fn put_numeric_type( "{}::{}{}", NAMESPACE, scalar.to_msl_name(), - common::vector_size_str(rows) + back::vector_size_str(rows) ) } (scalar, &[rows, columns]) => { @@ -90,8 +81,8 @@ fn put_numeric_type( "{}::{}{}x{}", NAMESPACE, scalar.to_msl_name(), - common::vector_size_str(columns), - common::vector_size_str(rows) + back::vector_size_str(columns), + back::vector_size_str(rows) ) } (_, _) => Ok(()), // not meaningful @@ -111,13 +102,13 @@ const CLAMPED_LOD_LOAD_PREFIX: &str = "clamped_lod_e"; /// Wrapper for identifier names for clamped level-of-detail values /// -/// Values of this type implement [`core::fmt::Display`], formatting as +/// Values of this type implement [`std::fmt::Display`], formatting as /// the name of the variable used to hold the cached clamped /// level-of-detail value for an `ImageLoad` expression. struct ClampedLod(Handle); impl Display for ClampedLod { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, CLAMPED_LOD_LOAD_PREFIX) } } @@ -132,14 +123,14 @@ impl Display for ClampedLod { /// /// If `global` is a [`Handle`] for a [`GlobalVariable`] that contains a /// runtime-sized array, then the value `ArraySize(global)` implements -/// [`core::fmt::Display`], formatting as the name of the struct member carrying +/// [`std::fmt::Display`], formatting as the name of the struct member carrying /// the number of elements in that runtime-sized array. /// /// [`GlobalVariable`]: crate::GlobalVariable struct ArraySizeMember(Handle); impl Display for ArraySizeMember { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { self.0.write_prefixed(f, "size") } } @@ -290,16 +281,10 @@ impl Display for TypeContext<'_> { crate::TypeInner::Sampler { comparison: _ } => { write!(out, "{NAMESPACE}::sampler") } - crate::TypeInner::AccelerationStructure { vertex_return } => { - if vertex_return { - unimplemented!("metal does not support vertex ray hit return") - } + crate::TypeInner::AccelerationStructure => { write!(out, "{RT_NAMESPACE}::instance_acceleration_structure") } - crate::TypeInner::RayQuery { vertex_return } => { - if vertex_return { - unimplemented!("metal does not support vertex ray hit return") - } + crate::TypeInner::RayQuery => { write!(out, "{RAY_QUERY_TYPE}") } crate::TypeInner::BindingArray { base, .. } => { @@ -576,8 +561,8 @@ impl crate::Type { // handle types may be different, depending on the global var access, so we always inline them Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } + | Ti::AccelerationStructure + | Ti::RayQuery | Ti::BindingArray { .. } => false, } } @@ -1409,7 +1394,7 @@ impl Writer { .to_msl_name(); match context.resolve_type(arg) { &crate::TypeInner::Vector { size, .. } => { - let size = common::vector_size_str(size); + let size = back::vector_size_str(size); write!(self.out, "{scalar}{size}(-1), {scalar}{size}(1)")?; } _ => { @@ -2134,7 +2119,7 @@ impl Writer { // or metal will complain that select is ambiguous match *inner { crate::TypeInner::Vector { size, scalar } => { - let size = common::vector_size_str(size); + let size = back::vector_size_str(size); let name = scalar.to_msl_name(); write!(self.out, "{name}{size}")?; } @@ -2262,7 +2247,7 @@ impl Writer { crate::TypeInner::Vector { size, .. } => write!( self.out, "{NAMESPACE}::float{size}({NAMESPACE}::half{size}(", - size = common::vector_size_str(size), + size = back::vector_size_str(size), )?, _ => unreachable!( "Correct TypeInner for QuantizeToF16 should be already validated" @@ -2365,9 +2350,6 @@ impl Writer { write!(self.out, ")")?; } } - crate::Expression::RayQueryVertexPositions { .. } => { - unimplemented!() - } crate::Expression::RayQueryGetIntersection { query, committed: _, @@ -3241,7 +3223,8 @@ impl Writer { } self.put_block(lcase.next(), &case.body, context)?; - if !case.fall_through && case.body.last().is_none_or(|s| !s.is_terminator()) + if !case.fall_through + && case.body.last().map_or(true, |s| !s.is_terminator()) { writeln!(self.out, "{}break;", lcase.next())?; } @@ -3825,12 +3808,12 @@ impl Writer { let mut uses_ray_query = false; for (_, ty) in module.types.iter() { match ty.inner { - crate::TypeInner::AccelerationStructure { .. } => { + crate::TypeInner::AccelerationStructure => { if options.lang_version < (2, 4) { return Err(Error::UnsupportedRayTracing); } } - crate::TypeInner::RayQuery { .. } => { + crate::TypeInner::RayQuery => { if options.lang_version < (2, 4) { return Err(Error::UnsupportedRayTracing); } @@ -6531,12 +6514,6 @@ template "{level}{NAMESPACE}::simdgroup_barrier({NAMESPACE}::mem_flags::mem_threadgroup);", )?; } - if flags.contains(crate::Barrier::TEXTURE) { - writeln!( - self.out, - "{level}{NAMESPACE}::threadgroup_barrier({NAMESPACE}::mem_flags::mem_texture);", - )?; - } Ok(()) } } diff --git a/third_party/rust/naga/src/back/pipeline_constants.rs b/third_party/rust/naga/src/back/pipeline_constants.rs index 4a54da5b1519..930813db43cb 100644 --- a/third_party/rust/naga/src/back/pipeline_constants.rs +++ b/third_party/rust/naga/src/back/pipeline_constants.rs @@ -1,12 +1,3 @@ -use alloc::{ - borrow::Cow, - string::{String, ToString}, -}; -use core::mem; - -use hashbrown::HashSet; -use thiserror::Error; - use super::PipelineConstants; use crate::{ arena::HandleVec, @@ -15,6 +6,9 @@ use crate::{ Arena, Block, Constant, Expression, Function, Handle, Literal, Module, Override, Range, Scalar, Span, Statement, TypeInner, WithSpan, }; +use hashbrown::HashSet; +use std::{borrow::Cow, mem}; +use thiserror::Error; #[derive(Error, Debug, Clone)] #[cfg_attr(test, derive(PartialEq))] @@ -249,7 +243,7 @@ fn process_pending( ), )) } else { - Ok(core::num::NonZeroU32::new(n).unwrap()) + Ok(std::num::NonZeroU32::new(n).unwrap()) } }) .map_err(|_| { @@ -638,12 +632,6 @@ fn adjust_expr(new_pos: &HandleVec>, expr: &mut E | Expression::WorkGroupUniformLoadResult { ty: _ } | Expression::SubgroupBallotResult | Expression::SubgroupOperationResult { .. } => {} - Expression::RayQueryVertexPositions { - ref mut query, - committed: _, - } => { - adjust(query); - } } } diff --git a/third_party/rust/naga/src/back/spv/block.rs b/third_party/rust/naga/src/back/spv/block.rs index 006ab310e32a..4f07dea3e265 100644 --- a/third_party/rust/naga/src/back/spv/block.rs +++ b/third_party/rust/naga/src/back/spv/block.rs @@ -2,16 +2,13 @@ Implementations for `BlockContext` methods. */ -use alloc::vec::Vec; - -use spirv::Word; - use super::{ index::BoundsCheckResult, selection::Selection, Block, BlockContext, Dimension, Error, Instruction, LocalType, LookupType, NumericType, ResultMember, WrappedFunction, Writer, WriterFlags, }; use crate::{arena::Handle, proc::index::GuardedIndex, Statement}; +use spirv::Word; fn get_dimension(type_inner: &crate::TypeInner) -> Dimension { match *type_inner { @@ -1582,7 +1579,7 @@ impl BlockContext<'_> { const VEC_LENGTH: u8 = 4; let parts: [_; VEC_LENGTH as usize] = - core::array::from_fn(|_| self.gen_id()); + std::array::from_fn(|_| self.gen_id()); for (i, part_id) in parts.into_iter().enumerate() { let index = self .writer @@ -1930,13 +1927,6 @@ impl BlockContext<'_> { )); id } - crate::Expression::RayQueryVertexPositions { query, committed } => { - self.writer.require_any( - "RayQueryVertexPositions", - &[spirv::Capability::RayQueryPositionFetchKHR], - )?; - self.write_ray_query_return_vertex_position(query, block, committed) - } }; self.cached[expr_handle] = id; @@ -2240,60 +2230,26 @@ impl BlockContext<'_> { } fn spill_to_internal_variable(&mut self, base: Handle, block: &mut Block) { - use indexmap::map::Entry; - - // Make sure we have an internal variable to spill `base` to. - let spill_variable_id = match self.function.spilled_composites.entry(base) { - Entry::Occupied(preexisting) => preexisting.get().id, - Entry::Vacant(vacant) => { - // Generate a new internal variable of the appropriate - // type for `base`. - let pointer_type_id = self.writer.get_resolution_pointer_id( - &self.fun_info[base].ty, - spirv::StorageClass::Function, - ); - let id = self.writer.id_gen.next(); - vacant.insert(super::LocalVariable { - id, - instruction: Instruction::variable( - pointer_type_id, - id, - spirv::StorageClass::Function, - None, - ), - }); - id - } + // Generate an internal variable of the appropriate type for `base`. + let variable_id = self.writer.id_gen.next(); + let pointer_type_id = self + .writer + .get_resolution_pointer_id(&self.fun_info[base].ty, spirv::StorageClass::Function); + let variable = super::LocalVariable { + id: variable_id, + instruction: Instruction::variable( + pointer_type_id, + variable_id, + spirv::StorageClass::Function, + None, + ), }; - // Perform the store even if we already had a spill variable for `base`. - // Consider this code: - // - // var x = ...; - // var y = ...; - // var z = ...; - // for (i = 0; i<2; i++) { - // let a = array(i, i, i); - // if (i == 0) { - // x += a[y]; - // } else [ - // x += a[z]; - // } - // } - // - // The value of `a` needs to be spilled so we can subscript it with `y` and `z`. - // - // When we generate SPIR-V for `a[y]`, we will create the spill - // variable, and store `a`'s value in it. - // - // When we generate SPIR-V for `a[z]`, we will notice that the spill - // variable for `a` has already been declared, but it is still essential - // that we store `a` into it, so that `a[z]` sees this iteration's value - // of `a`. let base_id = self.cached[base]; block .body - .push(Instruction::store(spill_variable_id, base_id, None)); + .push(Instruction::store(variable.id, base_id, None)); + self.function.spilled_composites.insert(base, variable); } /// Generate an access to a spilled temporary, if necessary. diff --git a/third_party/rust/naga/src/back/spv/helpers.rs b/third_party/rust/naga/src/back/spv/helpers.rs index 7938791bae09..63144abc028a 100644 --- a/third_party/rust/naga/src/back/spv/helpers.rs +++ b/third_party/rust/naga/src/back/spv/helpers.rs @@ -1,8 +1,5 @@ -use alloc::{vec, vec::Vec}; - -use spirv::Word; - use crate::{Handle, UniqueArena}; +use spirv::Word; pub(super) fn bytes_to_words(bytes: &[u8]) -> Vec { bytes diff --git a/third_party/rust/naga/src/back/spv/image.rs b/third_party/rust/naga/src/back/spv/image.rs index 816dd727a613..fe4001060e68 100644 --- a/third_party/rust/naga/src/back/spv/image.rs +++ b/third_party/rust/naga/src/back/spv/image.rs @@ -2,13 +2,12 @@ Generating SPIR-V for image operations. */ -use spirv::Word; - use super::{ selection::{MergeTuple, Selection}, Block, BlockContext, Error, IdGenerator, Instruction, LocalType, LookupType, NumericType, }; use crate::arena::Handle; +use spirv::Word; /// Information about a vector of coordinates. /// diff --git a/third_party/rust/naga/src/back/spv/index.rs b/third_party/rust/naga/src/back/spv/index.rs index 053dd31e9fbf..15e5df3f1012 100644 --- a/third_party/rust/naga/src/back/spv/index.rs +++ b/third_party/rust/naga/src/back/spv/index.rs @@ -351,7 +351,7 @@ impl BlockContext<'_> { // If both are known, we can compute the index to be used // right now. if let (GuardedIndex::Known(index), MaybeKnown::Known(max_index)) = (index, max_index) { - let restricted = core::cmp::min(index, max_index); + let restricted = std::cmp::min(index, max_index); return Ok(BoundsCheckResult::KnownInBounds(restricted)); } diff --git a/third_party/rust/naga/src/back/spv/instructions.rs b/third_party/rust/naga/src/back/spv/instructions.rs index db3934cb44da..57bfb4e9f31f 100644 --- a/third_party/rust/naga/src/back/spv/instructions.rs +++ b/third_party/rust/naga/src/back/spv/instructions.rs @@ -1,8 +1,5 @@ -use alloc::{vec, vec::Vec}; - -use spirv::{Op, Word}; - use super::{block::DebugInfoInner, helpers}; +use spirv::{Op, Word}; pub(super) enum Signedness { Unsigned = 0, @@ -795,20 +792,6 @@ impl super::Instruction { instruction } - pub(super) fn ray_query_return_vertex_position( - result_type_id: Word, - id: Word, - query: Word, - intersection: Word, - ) -> Self { - let mut instruction = Self::new(Op::RayQueryGetIntersectionTriangleVertexPositionsKHR); - instruction.set_type(result_type_id); - instruction.set_result(id); - instruction.add_operand(query); - instruction.add_operand(intersection); - instruction - } - pub(super) fn ray_query_get_intersection( op: Op, result_type_id: Word, diff --git a/third_party/rust/naga/src/back/spv/layout.rs b/third_party/rust/naga/src/back/spv/layout.rs index 177996741d9a..d8b0ef0247cb 100644 --- a/third_party/rust/naga/src/back/spv/layout.rs +++ b/third_party/rust/naga/src/back/spv/layout.rs @@ -1,12 +1,6 @@ -use alloc::{vec, vec::Vec}; -use core::iter; - -use spirv::{Op, Word, MAGIC_NUMBER}; - use super::{Instruction, LogicalLayout, PhysicalLayout}; - -#[cfg(test)] -use alloc::format; +use spirv::{Op, Word, MAGIC_NUMBER}; +use std::iter; // https://github.com/KhronosGroup/SPIRV-Headers/pull/195 const GENERATOR: Word = 28; diff --git a/third_party/rust/naga/src/back/spv/mod.rs b/third_party/rust/naga/src/back/spv/mod.rs index bd12b2fbce8a..bb2757766c75 100644 --- a/third_party/rust/naga/src/back/spv/mod.rs +++ b/third_party/rust/naga/src/back/spv/mod.rs @@ -18,15 +18,13 @@ mod writer; pub use spirv::{Capability, SourceLanguage}; -use alloc::{string::String, vec::Vec}; -use core::ops; - -use spirv::Word; -use thiserror::Error; - use crate::arena::{Handle, HandleVec}; use crate::proc::{BoundsCheckPolicies, TypeResolution}; +use spirv::Word; +use std::ops; +use thiserror::Error; + #[derive(Clone)] struct PhysicalLayout { magic_number: Word, @@ -149,17 +147,12 @@ struct Function { /// List of local variables used as a counters to ensure that all loops are bounded. force_loop_bounding_vars: Vec, - /// A map from a Naga expression to the temporary SPIR-V variable we have - /// spilled its value to, if any. - /// - /// Naga IR lets us apply [`Access`] expressions to expressions whose value - /// is an array or matrix---not a pointer to such---but SPIR-V doesn't have - /// instructions that can do the same. So when we encounter such code, we - /// spill the expression's value to a generated temporary variable. That, we - /// can obtain a pointer to, and then use an `OpAccessChain` instruction to - /// do whatever series of [`Access`] and [`AccessIndex`] operations we need - /// (with bounds checks). Finally, we generate an `OpLoad` to get the final - /// value. + /// A map taking an expression that yields a composite value (array, matrix) + /// to the temporary variables we have spilled it to, if any. Spilling + /// allows us to render an arbitrary chain of [`Access`] and [`AccessIndex`] + /// expressions as an `OpAccessChain` and an `OpLoad` (plus bounds checks). + /// This supports dynamic indexing of by-value arrays and matrices, which + /// SPIR-V does not. /// /// [`Access`]: crate::Expression::Access /// [`AccessIndex`]: crate::Expression::AccessIndex @@ -488,8 +481,8 @@ impl LocalType { class, } => LocalType::Image(LocalImageType::from_inner(dim, arrayed, class)), crate::TypeInner::Sampler { comparison: _ } => LocalType::Sampler, - crate::TypeInner::AccelerationStructure { .. } => LocalType::AccelerationStructure, - crate::TypeInner::RayQuery { .. } => LocalType::RayQuery, + crate::TypeInner::AccelerationStructure => LocalType::AccelerationStructure, + crate::TypeInner::RayQuery => LocalType::RayQuery, crate::TypeInner::Array { .. } | crate::TypeInner::Struct { .. } | crate::TypeInner::BindingArray { .. } => return None, @@ -859,7 +852,7 @@ pub struct BindingInfo { } // Using `BTreeMap` instead of `HashMap` so that we can hash itself. -pub type BindingMap = alloc::collections::BTreeMap; +pub type BindingMap = std::collections::BTreeMap; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ZeroInitializeWorkgroupMemoryMode { diff --git a/third_party/rust/naga/src/back/spv/ray.rs b/third_party/rust/naga/src/back/spv/ray.rs index 41f50bf61bc9..4a1768173a00 100644 --- a/third_party/rust/naga/src/back/spv/ray.rs +++ b/third_party/rust/naga/src/back/spv/ray.rs @@ -2,8 +2,6 @@ Generating SPIR-V for ray query operations. */ -use alloc::vec; - use super::{ Block, BlockContext, Function, FunctionArgument, Instruction, LocalType, LookupFunctionType, LookupType, NumericType, Writer, @@ -116,8 +114,17 @@ impl Writer { class: spirv::StorageClass::Function, })); - let argument_type_id = self.get_ray_query_pointer_id(ir_module); - + let rq_ty = ir_module + .types + .get(&Type { + name: None, + inner: TypeInner::RayQuery, + }) + .expect("ray_query type should have been populated by the variable passed into this!"); + let argument_type_id = self.get_type_id(LookupType::Local(LocalType::Pointer { + base: rq_ty, + class: spirv::StorageClass::Function, + })); let func_ty = self.get_function_type(LookupFunctionType { parameter_type_ids: vec![argument_type_id], return_type_id: intersection_type_id, @@ -617,39 +624,4 @@ impl BlockContext<'_> { crate::RayQueryFunction::Terminate => {} } } - - pub(super) fn write_ray_query_return_vertex_position( - &mut self, - query: Handle, - block: &mut Block, - is_committed: bool, - ) -> spirv::Word { - let query_id = self.cached[query]; - let id = self.gen_id(); - let result = self - .ir_module - .special_types - .ray_vertex_return - .expect("type should have been populated"); - let intersection_id = - self.writer - .get_constant_scalar(crate::Literal::U32(if is_committed { - spirv::RayQueryIntersection::RayQueryCommittedIntersectionKHR - } else { - spirv::RayQueryIntersection::RayQueryCandidateIntersectionKHR - } as _)); - block - .body - .push(Instruction::ray_query_return_vertex_position( - *self - .writer - .lookup_type - .get(&LookupType::Handle(result)) - .expect("type should have been populated"), - id, - query_id, - intersection_id, - )); - id - } } diff --git a/third_party/rust/naga/src/back/spv/recyclable.rs b/third_party/rust/naga/src/back/spv/recyclable.rs index 4a84ce3bdedb..8ccc7406e2c3 100644 --- a/third_party/rust/naga/src/back/spv/recyclable.rs +++ b/third_party/rust/naga/src/back/spv/recyclable.rs @@ -2,8 +2,6 @@ Reusing collections' previous allocations. */ -use alloc::vec::Vec; - /// A value that can be reset to its initial state, retaining its current allocations. /// /// Naga attempts to lower the cost of SPIR-V generation by allowing clients to @@ -61,7 +59,7 @@ impl Recyclable for indexmap::IndexSet { } } -impl Recyclable for alloc::collections::BTreeMap { +impl Recyclable for std::collections::BTreeMap { fn recycle(mut self) -> Self { self.clear(); self diff --git a/third_party/rust/naga/src/back/spv/selection.rs b/third_party/rust/naga/src/back/spv/selection.rs index 38cf470db592..788b1f10ab81 100644 --- a/third_party/rust/naga/src/back/spv/selection.rs +++ b/third_party/rust/naga/src/back/spv/selection.rs @@ -57,11 +57,8 @@ pointer for the duration of its lifetime. To obtain the block for generating code in the selection's body, call the `Selection::block` method. */ -use alloc::{vec, vec::Vec}; - -use spirv::Word; - use super::{Block, BlockContext, Instruction}; +use spirv::Word; /// A private struct recording what we know about the selection construct so far. pub(super) struct Selection<'b, M: MergeTuple> { @@ -128,7 +125,7 @@ impl<'b, M: MergeTuple> Selection<'b, M> { let merge_label = self.make_merge_label(ctx); let next_label = ctx.gen_id(); ctx.function.consume( - core::mem::replace(self.block, Block::new(next_label)), + std::mem::replace(self.block, Block::new(next_label)), Instruction::branch_conditional(cond, next_label, merge_label), ); } @@ -163,7 +160,7 @@ impl<'b, M: MergeTuple> Selection<'b, M> { // Emit the final branch and transition to the merge block. values.push((final_values, block.label_id)); ctx.function.consume( - core::mem::replace(block, Block::new(merge_label)), + std::mem::replace(block, Block::new(merge_label)), Instruction::branch(merge_label), ); diff --git a/third_party/rust/naga/src/back/spv/writer.rs b/third_party/rust/naga/src/back/spv/writer.rs index 93756737db43..f1ba07a386e9 100644 --- a/third_party/rust/naga/src/back/spv/writer.rs +++ b/third_party/rust/naga/src/back/spv/writer.rs @@ -1,12 +1,3 @@ -use alloc::{ - string::{String, ToString}, - vec, - vec::Vec, -}; - -use hashbrown::hash_map::Entry; -use spirv::Word; - use super::{ block::DebugInfoInner, helpers::{contains_builtin, global_needs_wrapper, map_storage_class}, @@ -21,6 +12,8 @@ use crate::{ proc::{Alignment, TypeResolution}, valid::{FunctionInfo, ModuleInfo}, }; +use hashbrown::hash_map::Entry; +use spirv::Word; struct FunctionInterface<'a> { varying_ids: &'a mut Vec, @@ -104,12 +97,12 @@ impl Writer { /// `Recyclable::recycle` requires ownership of the value, not just /// `&mut`; see the trait documentation. But we need to use this method /// from functions like `Writer::write`, which only have `&mut Writer`. - /// Workarounds include unsafe code (`core::ptr::read`, then `write`, ugh) + /// Workarounds include unsafe code (`std::ptr::read`, then `write`, ugh) /// or something like a `Default` impl that returns an oddly-initialized /// `Writer`, which is worse. fn reset(&mut self) { use super::recyclable::Recyclable; - use core::mem::take; + use std::mem::take; let mut id_gen = IdGenerator::default(); let gl450_ext_inst_id = id_gen.next(); @@ -251,30 +244,6 @@ impl Writer { })) } - pub(super) fn get_ray_query_pointer_id(&mut self, module: &crate::Module) -> Word { - let rq_ty = module - .types - .get(&crate::Type { - name: None, - inner: crate::TypeInner::RayQuery { - vertex_return: false, - }, - }) - .or_else(|| { - module.types.get(&crate::Type { - name: None, - inner: crate::TypeInner::RayQuery { - vertex_return: true, - }, - }) - }) - .expect("ray_query type should have been populated by the variable passed into this!"); - self.get_type_id(LookupType::Local(LocalType::Pointer { - base: rq_ty, - class: spirv::StorageClass::Function, - })) - } - /// Return a SPIR-V type for a pointer to `resolution`. /// /// The given `resolution` must be one that we can represent @@ -898,10 +867,10 @@ impl Writer { fun_info: info, function: &mut function, // Re-use the cached expression table from prior functions. - cached: core::mem::take(&mut self.saved_cached), + cached: std::mem::take(&mut self.saved_cached), // Steal the Writer's temp list for a bit. - temp_list: core::mem::take(&mut self.temp_list), + temp_list: std::mem::take(&mut self.temp_list), force_loop_bounding: self.force_loop_bounding, writer: self, expression_constness: super::ExpressionConstnessTracker::from_arena( @@ -937,7 +906,7 @@ impl Writer { id, spirv::StorageClass::Function, init_word.or_else(|| match ir_module.types[variable.ty].inner { - crate::TypeInner::RayQuery { .. } => None, + crate::TypeInner::RayQuery => None, _ => { let type_id = context.get_type_id(LookupType::Handle(variable.ty)); Some(context.writer.write_constant_null(type_id)) @@ -1162,10 +1131,10 @@ impl Writer { _ => {} } } - crate::TypeInner::AccelerationStructure { .. } => { + crate::TypeInner::AccelerationStructure => { self.require_any("Acceleration Structure", &[spirv::Capability::RayQueryKHR])?; } - crate::TypeInner::RayQuery { .. } => { + crate::TypeInner::RayQuery => { self.require_any("Ray Query", &[spirv::Capability::RayQueryKHR])?; } crate::TypeInner::Atomic(crate::Scalar { width: 8, kind: _ }) => { @@ -1348,8 +1317,8 @@ impl Writer { | crate::TypeInner::ValuePointer { .. } | crate::TypeInner::Image { .. } | crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } - | crate::TypeInner::RayQuery { .. } => unreachable!(), + | crate::TypeInner::AccelerationStructure + | crate::TypeInner::RayQuery => unreachable!(), }; instruction.to_words(&mut self.logical_layout.declarations); @@ -1602,10 +1571,6 @@ impl Writer { spirv::MemorySemantics::WORKGROUP_MEMORY, flags.contains(crate::Barrier::WORK_GROUP), ); - semantics.set( - spirv::MemorySemantics::IMAGE_MEMORY, - flags.contains(crate::Barrier::TEXTURE), - ); let exec_scope_id = if flags.contains(crate::Barrier::SUB_GROUP) { self.get_index_constant(spirv::Scope::Subgroup as u32) } else { @@ -2223,13 +2188,9 @@ impl Writer { .any(|arg| has_view_index_check(ir_module, arg.binding.as_ref(), arg.ty)); let mut has_ray_query = ir_module.special_types.ray_desc.is_some() | ir_module.special_types.ray_intersection.is_some(); - let has_vertex_return = ir_module.special_types.ray_vertex_return.is_some(); for (_, &crate::Type { ref inner, .. }) in ir_module.types.iter() { - // spirv does not know whether these have vertex return - that is done by us - if let &crate::TypeInner::AccelerationStructure { .. } - | &crate::TypeInner::RayQuery { .. } = inner - { + if let &crate::TypeInner::AccelerationStructure | &crate::TypeInner::RayQuery = inner { has_ray_query = true } } @@ -2247,10 +2208,6 @@ impl Writer { Instruction::extension("SPV_KHR_ray_query") .to_words(&mut self.logical_layout.extensions) } - if has_vertex_return { - Instruction::extension("SPV_KHR_ray_tracing_position_fetch") - .to_words(&mut self.logical_layout.extensions); - } Instruction::type_void(self.void_type).to_words(&mut self.logical_layout.declarations); Instruction::ext_inst_import(self.gl450_ext_inst_id, "GLSL.std.450") .to_words(&mut self.logical_layout.ext_inst_imports); diff --git a/third_party/rust/naga/src/back/wgsl/mod.rs b/third_party/rust/naga/src/back/wgsl/mod.rs index 9430460dad9d..ecf59698a8c7 100644 --- a/third_party/rust/naga/src/back/wgsl/mod.rs +++ b/third_party/rust/naga/src/back/wgsl/mod.rs @@ -7,59 +7,22 @@ Backend for [WGSL][wgsl] (WebGPU Shading Language). mod polyfill; mod writer; -use alloc::format; -use alloc::string::String; - use thiserror::Error; pub use writer::{Writer, WriterFlags}; -use crate::common::wgsl; - #[derive(Error, Debug)] pub enum Error { #[error(transparent)] - FmtError(#[from] core::fmt::Error), + FmtError(#[from] std::fmt::Error), #[error("{0}")] Custom(String), #[error("{0}")] Unimplemented(String), // TODO: Error used only during development + #[error("Unsupported math function: {0:?}")] + UnsupportedMathFunction(crate::MathFunction), #[error("Unsupported relational function: {0:?}")] UnsupportedRelationalFunction(crate::RelationalFunction), - #[error("Unsupported {kind}: {value}")] - Unsupported { - /// What kind of unsupported thing this is: interpolation, builtin, etc. - kind: &'static str, - - /// The debug form of the Naga IR value that this backend can't express. - value: String, - }, -} - -impl Error { - /// Produce an [`Unsupported`] error for `value`. - /// - /// [`Unsupported`]: Error::Unsupported - fn unsupported(kind: &'static str, value: T) -> Error { - Error::Unsupported { - kind, - value: format!("{value:?}"), - } - } -} - -trait ToWgslIfImplemented { - fn to_wgsl_if_implemented(self) -> Result<&'static str, Error>; -} - -impl ToWgslIfImplemented for T -where - T: wgsl::TryToWgsl + core::fmt::Debug + Copy, -{ - fn to_wgsl_if_implemented(self) -> Result<&'static str, Error> { - self.try_to_wgsl() - .ok_or_else(|| Error::unsupported(T::DESCRIPTION, self)) - } } pub fn write_string( diff --git a/third_party/rust/naga/src/back/wgsl/writer.rs b/third_party/rust/naga/src/back/wgsl/writer.rs index 7e049b0ba450..a7cd8f95c9bc 100644 --- a/third_party/rust/naga/src/back/wgsl/writer.rs +++ b/third_party/rust/naga/src/back/wgsl/writer.rs @@ -1,23 +1,11 @@ -use alloc::{ - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::fmt::Write; - use super::Error; -use super::ToWgslIfImplemented as _; use crate::back::wgsl::polyfill::InversePolyfill; use crate::{ back::{self, Baked}, - common::{ - self, - wgsl::{address_space_str, ToWgsl, TryToWgsl}, - }, proc::{self, ExpressionKindTracker, NameKey}, valid, Handle, Module, ShaderStage, TypeInner, }; +use std::fmt::Write; /// Shorthand result used internally by the backend type BackendResult = Result<(), Error>; @@ -80,6 +68,7 @@ pub struct Writer { names: crate::FastHashMap, namer: proc::Namer, named_expressions: crate::NamedExpressions, + ep_results: Vec<(ShaderStage, Handle)>, required_polyfills: crate::FastIndexSet, } @@ -91,6 +80,7 @@ impl Writer { names: crate::FastHashMap::default(), namer: proc::Namer::default(), named_expressions: crate::NamedExpressions::default(), + ep_results: vec![], required_polyfills: crate::FastIndexSet::default(), } } @@ -107,6 +97,7 @@ impl Writer { &mut self.names, ); self.named_expressions.clear(); + self.ep_results.clear(); self.required_polyfills.clear(); } @@ -127,6 +118,13 @@ impl Writer { self.reset(module); + // Save all ep result types + for ep in &module.entry_points { + if let Some(ref result) = ep.function.result { + self.ep_results.push((ep.stage, result.ty)); + } + } + // Write all structs for (handle, ty) in module.types.iter() { if let TypeInner::Struct { ref members, .. } = ty.inner { @@ -219,6 +217,29 @@ impl Writer { Ok(()) } + /// Helper method used to write struct name + /// + /// # Notes + /// Adds no trailing or leading whitespace + fn write_struct_name(&mut self, module: &Module, handle: Handle) -> BackendResult { + if module.types[handle].name.is_none() { + if let Some(&(stage, _)) = self.ep_results.iter().find(|&&(_, ty)| ty == handle) { + let name = match stage { + ShaderStage::Compute => "ComputeOutput", + ShaderStage::Fragment => "FragmentOutput", + ShaderStage::Vertex => "VertexOutput", + }; + + write!(self.out, "{name}")?; + return Ok(()); + } + } + + write!(self.out, "{}", self.names[&NameKey::Type(handle)])?; + + Ok(()) + } + /// Helper method used to write /// [functions](https://gpuweb.github.io/gpuweb/wgsl/#functions) /// @@ -321,7 +342,7 @@ impl Writer { Attribute::Location(id) => write!(self.out, "@location({id}) ")?, Attribute::SecondBlendSource => write!(self.out, "@second_blend_source ")?, Attribute::BuiltIn(builtin_attrib) => { - let builtin = builtin_attrib.to_wgsl_if_implemented()?; + let builtin = builtin_str(builtin_attrib)?; write!(self.out, "@builtin({builtin}) ")?; } Attribute::Stage(shader_stage) => { @@ -344,18 +365,24 @@ impl Writer { Attribute::Invariant => write!(self.out, "@invariant ")?, Attribute::Interpolate(interpolation, sampling) => { if sampling.is_some() && sampling != Some(crate::Sampling::Center) { - let interpolation = interpolation - .unwrap_or(crate::Interpolation::Perspective) - .to_wgsl(); - let sampling = sampling.unwrap_or(crate::Sampling::Center).to_wgsl(); - write!(self.out, "@interpolate({interpolation}, {sampling}) ")?; + write!( + self.out, + "@interpolate({}, {}) ", + interpolation_str( + interpolation.unwrap_or(crate::Interpolation::Perspective) + ), + sampling_str(sampling.unwrap_or(crate::Sampling::Center)) + )?; } else if interpolation.is_some() && interpolation != Some(crate::Interpolation::Perspective) { - let interpolation = interpolation - .unwrap_or(crate::Interpolation::Perspective) - .to_wgsl(); - write!(self.out, "@interpolate({interpolation}) ")?; + write!( + self.out, + "@interpolate({}) ", + interpolation_str( + interpolation.unwrap_or(crate::Interpolation::Perspective) + ) + )?; } } }; @@ -373,7 +400,8 @@ impl Writer { handle: Handle, members: &[crate::StructMember], ) -> BackendResult { - write!(self.out, "struct {}", self.names[&NameKey::Type(handle)])?; + write!(self.out, "struct ")?; + self.write_struct_name(module, handle)?; write!(self.out, " {{")?; writeln!(self.out)?; for (index, member) in members.iter().enumerate() { @@ -404,9 +432,7 @@ impl Writer { fn write_type(&mut self, module: &Module, ty: Handle) -> BackendResult { let inner = &module.types[ty].inner; match *inner { - TypeInner::Struct { .. } => { - write!(self.out, "{}", self.names[&NameKey::Type(ty)])?; - } + TypeInner::Struct { .. } => self.write_struct_name(module, ty)?, ref other => self.write_value_type(module, other)?, } @@ -422,8 +448,8 @@ impl Writer { TypeInner::Vector { size, scalar } => write!( self.out, "vec{}<{}>", - common::vector_size_str(size), - scalar.to_wgsl_if_implemented()?, + back::vector_size_str(size), + scalar_kind_str(scalar), )?, TypeInner::Sampler { comparison: false } => { write!(self.out, "sampler")?; @@ -439,13 +465,13 @@ impl Writer { // More about texture types: https://gpuweb.github.io/gpuweb/wgsl/#sampled-texture-type use crate::ImageClass as Ic; - let dim_str = dim.to_wgsl(); + let dim_str = image_dimension_str(dim); let arrayed_str = if arrayed { "_array" } else { "" }; let (class_str, multisampled_str, format_str, storage_str) = match class { Ic::Sampled { kind, multi } => ( "", if multi { "multisampled_" } else { "" }, - crate::Scalar { kind, width: 4 }.to_wgsl_if_implemented()?, + scalar_kind_str(crate::Scalar { kind, width: 4 }), "", ), Ic::Depth { multi } => { @@ -454,7 +480,7 @@ impl Writer { Ic::Storage { format, access } => ( "storage_", "", - format.to_wgsl(), + storage_format_str(format), if access.contains(crate::StorageAccess::ATOMIC) { ",atomic" } else if access @@ -478,10 +504,10 @@ impl Writer { } } TypeInner::Scalar(scalar) => { - write!(self.out, "{}", scalar.to_wgsl_if_implemented()?)?; + write!(self.out, "{}", scalar_kind_str(scalar))?; } TypeInner::Atomic(scalar) => { - write!(self.out, "atomic<{}>", scalar.to_wgsl_if_implemented()?)?; + write!(self.out, "atomic<{}>", scalar_kind_str(scalar))?; } TypeInner::Array { base, @@ -531,9 +557,9 @@ impl Writer { write!( self.out, "mat{}x{}<{}>", - common::vector_size_str(columns), - common::vector_size_str(rows), - scalar.to_wgsl_if_implemented()? + back::vector_size_str(columns), + back::vector_size_str(rows), + scalar_kind_str(scalar) )?; } TypeInner::Pointer { base, space } => { @@ -559,12 +585,7 @@ impl Writer { } => { let (address, maybe_access) = address_space_str(space); if let Some(space) = address { - write!( - self.out, - "ptr<{}, {}", - space, - scalar.to_wgsl_if_implemented()? - )?; + write!(self.out, "ptr<{}, {}", space, scalar_kind_str(scalar))?; if let Some(access) = maybe_access { write!(self.out, ", {access}")?; } @@ -586,8 +607,8 @@ impl Writer { self.out, "ptr<{}, vec{}<{}>", space, - common::vector_size_str(size), - scalar.to_wgsl_if_implemented()? + back::vector_size_str(size), + scalar_kind_str(scalar) )?; if let Some(access) = maybe_access { write!(self.out, ", {access}")?; @@ -600,10 +621,7 @@ impl Writer { } write!(self.out, ">")?; } - TypeInner::AccelerationStructure { vertex_return } => { - let caps = if vertex_return { "" } else { "" }; - write!(self.out, "acceleration_structure{}", caps)? - } + TypeInner::AccelerationStructure => write!(self.out, "acceleration_structure")?, _ => { return Err(Error::Unimplemented(format!("write_value_type {inner:?}"))); } @@ -955,10 +973,6 @@ impl Writer { if barrier.contains(crate::Barrier::SUB_GROUP) { writeln!(self.out, "{level}subgroupBarrier();")?; } - - if barrier.contains(crate::Barrier::TEXTURE) { - writeln!(self.out, "{level}textureBarrier();")?; - } } Statement::RayQuery { .. } => unreachable!(), Statement::SubgroupBallot { result, predicate } => { @@ -1303,7 +1317,7 @@ impl Writer { write!(self.out, ")")? } Expression::Splat { size, value } => { - let size = common::vector_size_str(size); + let size = back::vector_size_str(size); write!(self.out, "vec{size}(")?; write_expression(self, value)?; write!(self.out, ")")?; @@ -1595,12 +1609,12 @@ impl Writer { kind, width: convert.unwrap_or(scalar.width), }; - let scalar_kind_str = scalar.to_wgsl_if_implemented()?; + let scalar_kind_str = scalar_kind_str(scalar); write!( self.out, "mat{}x{}<{}>", - common::vector_size_str(columns), - common::vector_size_str(rows), + back::vector_size_str(columns), + back::vector_size_str(rows), scalar_kind_str )?; } @@ -1612,8 +1626,8 @@ impl Writer { kind, width: convert.unwrap_or(width), }; - let vector_size_str = common::vector_size_str(size); - let scalar_kind_str = scalar.to_wgsl_if_implemented()?; + let vector_size_str = back::vector_size_str(size); + let scalar_kind_str = scalar_kind_str(scalar); if convert.is_some() { write!(self.out, "vec{vector_size_str}<{scalar_kind_str}>")?; } else { @@ -1625,7 +1639,7 @@ impl Writer { kind, width: convert.unwrap_or(width), }; - let scalar_kind_str = scalar.to_wgsl_if_implemented()?; + let scalar_kind_str = scalar_kind_str(scalar); if convert.is_some() { write!(self.out, "{scalar_kind_str}")? } else { @@ -1683,19 +1697,98 @@ impl Writer { InversePolyfill(InversePolyfill), } - let function = match fun.try_to_wgsl() { - Some(name) => Function::Regular(name), - None => match fun { - Mf::Inverse => { - let ty = func_ctx.resolve_type(arg, &module.types); - let Some(overload) = InversePolyfill::find_overload(ty) else { - return Err(Error::unsupported("math function", fun)); - }; + let function = match fun { + Mf::Abs => Function::Regular("abs"), + Mf::Min => Function::Regular("min"), + Mf::Max => Function::Regular("max"), + Mf::Clamp => Function::Regular("clamp"), + Mf::Saturate => Function::Regular("saturate"), + // trigonometry + Mf::Cos => Function::Regular("cos"), + Mf::Cosh => Function::Regular("cosh"), + Mf::Sin => Function::Regular("sin"), + Mf::Sinh => Function::Regular("sinh"), + Mf::Tan => Function::Regular("tan"), + Mf::Tanh => Function::Regular("tanh"), + Mf::Acos => Function::Regular("acos"), + Mf::Asin => Function::Regular("asin"), + Mf::Atan => Function::Regular("atan"), + Mf::Atan2 => Function::Regular("atan2"), + Mf::Asinh => Function::Regular("asinh"), + Mf::Acosh => Function::Regular("acosh"), + Mf::Atanh => Function::Regular("atanh"), + Mf::Radians => Function::Regular("radians"), + Mf::Degrees => Function::Regular("degrees"), + // decomposition + Mf::Ceil => Function::Regular("ceil"), + Mf::Floor => Function::Regular("floor"), + Mf::Round => Function::Regular("round"), + Mf::Fract => Function::Regular("fract"), + Mf::Trunc => Function::Regular("trunc"), + Mf::Modf => Function::Regular("modf"), + Mf::Frexp => Function::Regular("frexp"), + Mf::Ldexp => Function::Regular("ldexp"), + // exponent + Mf::Exp => Function::Regular("exp"), + Mf::Exp2 => Function::Regular("exp2"), + Mf::Log => Function::Regular("log"), + Mf::Log2 => Function::Regular("log2"), + Mf::Pow => Function::Regular("pow"), + // geometry + Mf::Dot => Function::Regular("dot"), + Mf::Cross => Function::Regular("cross"), + Mf::Distance => Function::Regular("distance"), + Mf::Length => Function::Regular("length"), + Mf::Normalize => Function::Regular("normalize"), + Mf::FaceForward => Function::Regular("faceForward"), + Mf::Reflect => Function::Regular("reflect"), + Mf::Refract => Function::Regular("refract"), + // computational + Mf::Sign => Function::Regular("sign"), + Mf::Fma => Function::Regular("fma"), + Mf::Mix => Function::Regular("mix"), + Mf::Step => Function::Regular("step"), + Mf::SmoothStep => Function::Regular("smoothstep"), + Mf::Sqrt => Function::Regular("sqrt"), + Mf::InverseSqrt => Function::Regular("inverseSqrt"), + Mf::Transpose => Function::Regular("transpose"), + Mf::Determinant => Function::Regular("determinant"), + Mf::QuantizeToF16 => Function::Regular("quantizeToF16"), + // bits + Mf::CountTrailingZeros => Function::Regular("countTrailingZeros"), + Mf::CountLeadingZeros => Function::Regular("countLeadingZeros"), + Mf::CountOneBits => Function::Regular("countOneBits"), + Mf::ReverseBits => Function::Regular("reverseBits"), + Mf::ExtractBits => Function::Regular("extractBits"), + Mf::InsertBits => Function::Regular("insertBits"), + Mf::FirstTrailingBit => Function::Regular("firstTrailingBit"), + Mf::FirstLeadingBit => Function::Regular("firstLeadingBit"), + // data packing + Mf::Pack4x8snorm => Function::Regular("pack4x8snorm"), + Mf::Pack4x8unorm => Function::Regular("pack4x8unorm"), + Mf::Pack2x16snorm => Function::Regular("pack2x16snorm"), + Mf::Pack2x16unorm => Function::Regular("pack2x16unorm"), + Mf::Pack2x16float => Function::Regular("pack2x16float"), + Mf::Pack4xI8 => Function::Regular("pack4xI8"), + Mf::Pack4xU8 => Function::Regular("pack4xU8"), + // data unpacking + Mf::Unpack4x8snorm => Function::Regular("unpack4x8snorm"), + Mf::Unpack4x8unorm => Function::Regular("unpack4x8unorm"), + Mf::Unpack2x16snorm => Function::Regular("unpack2x16snorm"), + Mf::Unpack2x16unorm => Function::Regular("unpack2x16unorm"), + Mf::Unpack2x16float => Function::Regular("unpack2x16float"), + Mf::Unpack4xI8 => Function::Regular("unpack4xI8"), + Mf::Unpack4xU8 => Function::Regular("unpack4xU8"), + Mf::Inverse => { + let typ = func_ctx.resolve_type(arg, &module.types); - Function::InversePolyfill(overload) - } - _ => return Err(Error::unsupported("math function", fun)), - }, + let Some(overload) = InversePolyfill::find_overload(typ) else { + return Err(Error::UnsupportedMathFunction(fun)); + }; + + Function::InversePolyfill(overload) + } + Mf::Outer => return Err(Error::UnsupportedMathFunction(fun)), }; match function { @@ -1786,8 +1879,7 @@ impl Writer { write!(self.out, ")")? } // Not supported yet - Expression::RayQueryGetIntersection { .. } - | Expression::RayQueryVertexPositions { .. } => unreachable!(), + Expression::RayQueryGetIntersection { .. } => unreachable!(), // Nothing to do here, since call expression already cached Expression::CallResult(_) | Expression::AtomicResult { .. } @@ -1877,6 +1969,186 @@ impl Writer { } } +fn builtin_str(built_in: crate::BuiltIn) -> Result<&'static str, Error> { + use crate::BuiltIn as Bi; + + Ok(match built_in { + Bi::VertexIndex => "vertex_index", + Bi::InstanceIndex => "instance_index", + Bi::Position { .. } => "position", + Bi::FrontFacing => "front_facing", + Bi::FragDepth => "frag_depth", + Bi::LocalInvocationId => "local_invocation_id", + Bi::LocalInvocationIndex => "local_invocation_index", + Bi::GlobalInvocationId => "global_invocation_id", + Bi::WorkGroupId => "workgroup_id", + Bi::NumWorkGroups => "num_workgroups", + Bi::SampleIndex => "sample_index", + Bi::SampleMask => "sample_mask", + Bi::PrimitiveIndex => "primitive_index", + Bi::ViewIndex => "view_index", + Bi::NumSubgroups => "num_subgroups", + Bi::SubgroupId => "subgroup_id", + Bi::SubgroupSize => "subgroup_size", + Bi::SubgroupInvocationId => "subgroup_invocation_id", + Bi::BaseInstance + | Bi::BaseVertex + | Bi::ClipDistance + | Bi::CullDistance + | Bi::PointSize + | Bi::PointCoord + | Bi::WorkGroupSize + | Bi::DrawID => return Err(Error::Custom(format!("Unsupported builtin {built_in:?}"))), + }) +} + +const fn image_dimension_str(dim: crate::ImageDimension) -> &'static str { + use crate::ImageDimension as IDim; + + match dim { + IDim::D1 => "1d", + IDim::D2 => "2d", + IDim::D3 => "3d", + IDim::Cube => "cube", + } +} + +const fn scalar_kind_str(scalar: crate::Scalar) -> &'static str { + use crate::Scalar; + use crate::ScalarKind as Sk; + + match scalar { + Scalar { + kind: Sk::Float, + width: 8, + } => "f64", + Scalar { + kind: Sk::Float, + width: 4, + } => "f32", + Scalar { + kind: Sk::Sint, + width: 4, + } => "i32", + Scalar { + kind: Sk::Uint, + width: 4, + } => "u32", + Scalar { + kind: Sk::Sint, + width: 8, + } => "i64", + Scalar { + kind: Sk::Uint, + width: 8, + } => "u64", + Scalar { + kind: Sk::Bool, + width: 1, + } => "bool", + _ => unreachable!(), + } +} + +const fn storage_format_str(format: crate::StorageFormat) -> &'static str { + use crate::StorageFormat as Sf; + + match format { + Sf::R8Unorm => "r8unorm", + Sf::R8Snorm => "r8snorm", + Sf::R8Uint => "r8uint", + Sf::R8Sint => "r8sint", + Sf::R16Uint => "r16uint", + Sf::R16Sint => "r16sint", + Sf::R16Float => "r16float", + Sf::Rg8Unorm => "rg8unorm", + Sf::Rg8Snorm => "rg8snorm", + Sf::Rg8Uint => "rg8uint", + Sf::Rg8Sint => "rg8sint", + Sf::R32Uint => "r32uint", + Sf::R32Sint => "r32sint", + Sf::R32Float => "r32float", + Sf::Rg16Uint => "rg16uint", + Sf::Rg16Sint => "rg16sint", + Sf::Rg16Float => "rg16float", + Sf::Rgba8Unorm => "rgba8unorm", + Sf::Rgba8Snorm => "rgba8snorm", + Sf::Rgba8Uint => "rgba8uint", + Sf::Rgba8Sint => "rgba8sint", + Sf::Bgra8Unorm => "bgra8unorm", + Sf::Rgb10a2Uint => "rgb10a2uint", + Sf::Rgb10a2Unorm => "rgb10a2unorm", + Sf::Rg11b10Ufloat => "rg11b10float", + Sf::R64Uint => "r64uint", + Sf::Rg32Uint => "rg32uint", + Sf::Rg32Sint => "rg32sint", + Sf::Rg32Float => "rg32float", + Sf::Rgba16Uint => "rgba16uint", + Sf::Rgba16Sint => "rgba16sint", + Sf::Rgba16Float => "rgba16float", + Sf::Rgba32Uint => "rgba32uint", + Sf::Rgba32Sint => "rgba32sint", + Sf::Rgba32Float => "rgba32float", + Sf::R16Unorm => "r16unorm", + Sf::R16Snorm => "r16snorm", + Sf::Rg16Unorm => "rg16unorm", + Sf::Rg16Snorm => "rg16snorm", + Sf::Rgba16Unorm => "rgba16unorm", + Sf::Rgba16Snorm => "rgba16snorm", + } +} + +/// Helper function that returns the string corresponding to the WGSL interpolation qualifier +const fn interpolation_str(interpolation: crate::Interpolation) -> &'static str { + use crate::Interpolation as I; + + match interpolation { + I::Perspective => "perspective", + I::Linear => "linear", + I::Flat => "flat", + } +} + +/// Return the WGSL auxiliary qualifier for the given sampling value. +const fn sampling_str(sampling: crate::Sampling) -> &'static str { + use crate::Sampling as S; + + match sampling { + S::Center => "", + S::Centroid => "centroid", + S::Sample => "sample", + S::First => "first", + S::Either => "either", + } +} + +const fn address_space_str( + space: crate::AddressSpace, +) -> (Option<&'static str>, Option<&'static str>) { + use crate::AddressSpace as As; + + ( + Some(match space { + As::Private => "private", + As::Uniform => "uniform", + As::Storage { access } => { + if access.contains(crate::StorageAccess::ATOMIC) { + return (Some("storage"), Some("atomic")); + } else if access.contains(crate::StorageAccess::STORE) { + return (Some("storage"), Some("read_write")); + } else { + "storage" + } + } + As::PushConstant => "push_constant", + As::WorkGroup => "workgroup", + As::Handle => return (None, None), + As::Function => "function", + }), + None, + ) +} + fn map_binding_to_attribute(binding: &crate::Binding) -> Vec { match *binding { crate::Binding::BuiltIn(built_in) => { diff --git a/third_party/rust/naga/src/block.rs b/third_party/rust/naga/src/block.rs index fde2961c89ff..2e86a928f11f 100644 --- a/third_party/rust/naga/src/block.rs +++ b/third_party/rust/naga/src/block.rs @@ -1,7 +1,5 @@ -use alloc::vec::Vec; -use core::ops::{Deref, DerefMut, RangeBounds}; - use crate::{Span, Statement}; +use std::ops::{Deref, DerefMut, RangeBounds}; /// A code block is a vector of statements, with maybe a vector of spans. #[derive(Debug, Clone, Default)] @@ -23,7 +21,7 @@ impl Block { } pub fn from_vec(body: Vec) -> Self { - let span_info = core::iter::repeat(Span::default()) + let span_info = std::iter::repeat(Span::default()) .take(body.len()) .collect(); Self { body, span_info } @@ -107,9 +105,9 @@ impl DerefMut for Block { impl<'a> IntoIterator for &'a Block { type Item = &'a Statement; - type IntoIter = core::slice::Iter<'a, Statement>; + type IntoIter = std::slice::Iter<'a, Statement>; - fn into_iter(self) -> core::slice::Iter<'a, Statement> { + fn into_iter(self) -> std::slice::Iter<'a, Statement> { self.iter() } } diff --git a/third_party/rust/naga/src/common/mod.rs b/third_party/rust/naga/src/common/mod.rs index 8ed0396952cc..b603904ee0a8 100644 --- a/third_party/rust/naga/src/common/mod.rs +++ b/third_party/rust/naga/src/common/mod.rs @@ -1,12 +1,3 @@ //! Code common to the front and backends for specific languages. pub mod wgsl; - -/// Helper function that returns the string corresponding to the [`VectorSize`](crate::VectorSize) -pub const fn vector_size_str(size: crate::VectorSize) -> &'static str { - match size { - crate::VectorSize::Bi => "2", - crate::VectorSize::Tri => "3", - crate::VectorSize::Quad => "4", - } -} diff --git a/third_party/rust/naga/src/common/wgsl.rs b/third_party/rust/naga/src/common/wgsl.rs index 8a9c6b5b7a62..07459d7f345b 100644 --- a/third_party/rust/naga/src/common/wgsl.rs +++ b/third_party/rust/naga/src/common/wgsl.rs @@ -1,6 +1,6 @@ //! Code shared between the WGSL front and back ends. -use core::fmt::{self, Display, Formatter}; +use std::fmt::{self, Display, Formatter}; use crate::diagnostic_filter::{ FilterableTriggeringRule, Severity, StandardFilterableTriggeringRule, @@ -67,318 +67,3 @@ impl StandardFilterableTriggeringRule { } } } - -/// Types that can return the WGSL source representation of their -/// values as a `'static` string. -/// -/// This trait is specifically for types whose WGSL forms are simple -/// enough that they can always be returned as a static string. -/// -/// - If only some values have a WGSL representation, consider -/// implementing [`TryToWgsl`] instead. -/// -/// - If a type's WGSL form requires dynamic formatting, so that -/// returning a `&'static str` isn't feasible, consider implementing -/// [`std::fmt::Display`] on some wrapper type instead. -pub trait ToWgsl: Sized { - /// Return WGSL source code representation of `self`. - fn to_wgsl(self) -> &'static str; -} - -/// Types that may be able to return the WGSL source representation -/// for their values as a `'static' string. -/// -/// This trait is specifically for types whose values are either -/// simple enough that their WGSL form can be represented a static -/// string, or aren't representable in WGSL at all. -/// -/// - If all values in the type have `&'static str` representations in -/// WGSL, consider implementing [`ToWgsl`] instead. -/// -/// - If a type's WGSL form requires dynamic formatting, so that -/// returning a `&'static str` isn't feasible, consider implementing -/// [`std::fmt::Display`] on some wrapper type instead. -pub trait TryToWgsl: Sized { - /// Return the WGSL form of `self` as a `'static` string. - /// - /// If `self` doesn't have a representation in WGSL (standard or - /// as extended by Naga), then return `None`. - fn try_to_wgsl(self) -> Option<&'static str>; - - /// What kind of WGSL thing `Self` represents. - const DESCRIPTION: &'static str; -} - -impl TryToWgsl for crate::MathFunction { - const DESCRIPTION: &'static str = "math function"; - - fn try_to_wgsl(self) -> Option<&'static str> { - use crate::MathFunction as Mf; - - Some(match self { - Mf::Abs => "abs", - Mf::Min => "min", - Mf::Max => "max", - Mf::Clamp => "clamp", - Mf::Saturate => "saturate", - Mf::Cos => "cos", - Mf::Cosh => "cosh", - Mf::Sin => "sin", - Mf::Sinh => "sinh", - Mf::Tan => "tan", - Mf::Tanh => "tanh", - Mf::Acos => "acos", - Mf::Asin => "asin", - Mf::Atan => "atan", - Mf::Atan2 => "atan2", - Mf::Asinh => "asinh", - Mf::Acosh => "acosh", - Mf::Atanh => "atanh", - Mf::Radians => "radians", - Mf::Degrees => "degrees", - Mf::Ceil => "ceil", - Mf::Floor => "floor", - Mf::Round => "round", - Mf::Fract => "fract", - Mf::Trunc => "trunc", - Mf::Modf => "modf", - Mf::Frexp => "frexp", - Mf::Ldexp => "ldexp", - Mf::Exp => "exp", - Mf::Exp2 => "exp2", - Mf::Log => "log", - Mf::Log2 => "log2", - Mf::Pow => "pow", - Mf::Dot => "dot", - Mf::Cross => "cross", - Mf::Distance => "distance", - Mf::Length => "length", - Mf::Normalize => "normalize", - Mf::FaceForward => "faceForward", - Mf::Reflect => "reflect", - Mf::Refract => "refract", - Mf::Sign => "sign", - Mf::Fma => "fma", - Mf::Mix => "mix", - Mf::Step => "step", - Mf::SmoothStep => "smoothstep", - Mf::Sqrt => "sqrt", - Mf::InverseSqrt => "inverseSqrt", - Mf::Transpose => "transpose", - Mf::Determinant => "determinant", - Mf::QuantizeToF16 => "quantizeToF16", - Mf::CountTrailingZeros => "countTrailingZeros", - Mf::CountLeadingZeros => "countLeadingZeros", - Mf::CountOneBits => "countOneBits", - Mf::ReverseBits => "reverseBits", - Mf::ExtractBits => "extractBits", - Mf::InsertBits => "insertBits", - Mf::FirstTrailingBit => "firstTrailingBit", - Mf::FirstLeadingBit => "firstLeadingBit", - Mf::Pack4x8snorm => "pack4x8snorm", - Mf::Pack4x8unorm => "pack4x8unorm", - Mf::Pack2x16snorm => "pack2x16snorm", - Mf::Pack2x16unorm => "pack2x16unorm", - Mf::Pack2x16float => "pack2x16float", - Mf::Pack4xI8 => "pack4xI8", - Mf::Pack4xU8 => "pack4xU8", - Mf::Unpack4x8snorm => "unpack4x8snorm", - Mf::Unpack4x8unorm => "unpack4x8unorm", - Mf::Unpack2x16snorm => "unpack2x16snorm", - Mf::Unpack2x16unorm => "unpack2x16unorm", - Mf::Unpack2x16float => "unpack2x16float", - Mf::Unpack4xI8 => "unpack4xI8", - Mf::Unpack4xU8 => "unpack4xU8", - - // Non-standard math functions. - Mf::Inverse | Mf::Outer => return None, - }) - } -} - -impl TryToWgsl for crate::BuiltIn { - const DESCRIPTION: &'static str = "builtin value"; - - fn try_to_wgsl(self) -> Option<&'static str> { - use crate::BuiltIn as Bi; - Some(match self { - Bi::Position { .. } => "position", - Bi::ViewIndex => "view_index", - Bi::InstanceIndex => "instance_index", - Bi::VertexIndex => "vertex_index", - Bi::FragDepth => "frag_depth", - Bi::FrontFacing => "front_facing", - Bi::PrimitiveIndex => "primitive_index", - Bi::SampleIndex => "sample_index", - Bi::SampleMask => "sample_mask", - Bi::GlobalInvocationId => "global_invocation_id", - Bi::LocalInvocationId => "local_invocation_id", - Bi::LocalInvocationIndex => "local_invocation_index", - Bi::WorkGroupId => "workgroup_id", - Bi::NumWorkGroups => "num_workgroups", - Bi::NumSubgroups => "num_subgroups", - Bi::SubgroupId => "subgroup_id", - Bi::SubgroupSize => "subgroup_size", - Bi::SubgroupInvocationId => "subgroup_invocation_id", - - // Non-standard built-ins. - Bi::BaseInstance - | Bi::BaseVertex - | Bi::ClipDistance - | Bi::CullDistance - | Bi::PointSize - | Bi::DrawID - | Bi::PointCoord - | Bi::WorkGroupSize => return None, - }) - } -} - -impl ToWgsl for crate::Interpolation { - fn to_wgsl(self) -> &'static str { - match self { - crate::Interpolation::Perspective => "perspective", - crate::Interpolation::Linear => "linear", - crate::Interpolation::Flat => "flat", - } - } -} - -impl ToWgsl for crate::Sampling { - fn to_wgsl(self) -> &'static str { - match self { - crate::Sampling::Center => "center", - crate::Sampling::Centroid => "centroid", - crate::Sampling::Sample => "sample", - crate::Sampling::First => "first", - crate::Sampling::Either => "either", - } - } -} - -impl ToWgsl for crate::StorageFormat { - fn to_wgsl(self) -> &'static str { - use crate::StorageFormat as Sf; - - match self { - Sf::R8Unorm => "r8unorm", - Sf::R8Snorm => "r8snorm", - Sf::R8Uint => "r8uint", - Sf::R8Sint => "r8sint", - Sf::R16Uint => "r16uint", - Sf::R16Sint => "r16sint", - Sf::R16Float => "r16float", - Sf::Rg8Unorm => "rg8unorm", - Sf::Rg8Snorm => "rg8snorm", - Sf::Rg8Uint => "rg8uint", - Sf::Rg8Sint => "rg8sint", - Sf::R32Uint => "r32uint", - Sf::R32Sint => "r32sint", - Sf::R32Float => "r32float", - Sf::Rg16Uint => "rg16uint", - Sf::Rg16Sint => "rg16sint", - Sf::Rg16Float => "rg16float", - Sf::Rgba8Unorm => "rgba8unorm", - Sf::Rgba8Snorm => "rgba8snorm", - Sf::Rgba8Uint => "rgba8uint", - Sf::Rgba8Sint => "rgba8sint", - Sf::Bgra8Unorm => "bgra8unorm", - Sf::Rgb10a2Uint => "rgb10a2uint", - Sf::Rgb10a2Unorm => "rgb10a2unorm", - Sf::Rg11b10Ufloat => "rg11b10float", - Sf::R64Uint => "r64uint", - Sf::Rg32Uint => "rg32uint", - Sf::Rg32Sint => "rg32sint", - Sf::Rg32Float => "rg32float", - Sf::Rgba16Uint => "rgba16uint", - Sf::Rgba16Sint => "rgba16sint", - Sf::Rgba16Float => "rgba16float", - Sf::Rgba32Uint => "rgba32uint", - Sf::Rgba32Sint => "rgba32sint", - Sf::Rgba32Float => "rgba32float", - Sf::R16Unorm => "r16unorm", - Sf::R16Snorm => "r16snorm", - Sf::Rg16Unorm => "rg16unorm", - Sf::Rg16Snorm => "rg16snorm", - Sf::Rgba16Unorm => "rgba16unorm", - Sf::Rgba16Snorm => "rgba16snorm", - } - } -} - -impl TryToWgsl for crate::Scalar { - const DESCRIPTION: &'static str = "scalar type"; - - fn try_to_wgsl(self) -> Option<&'static str> { - use crate::Scalar; - - Some(match self { - Scalar::F64 => "f64", - Scalar::F32 => "f32", - Scalar::I32 => "i32", - Scalar::U32 => "u32", - Scalar::I64 => "i64", - Scalar::U64 => "u64", - Scalar::BOOL => "bool", - _ => return None, - }) - } -} - -impl ToWgsl for crate::ImageDimension { - fn to_wgsl(self) -> &'static str { - use crate::ImageDimension as IDim; - - match self { - IDim::D1 => "1d", - IDim::D2 => "2d", - IDim::D3 => "3d", - IDim::Cube => "cube", - } - } -} - -/// Return the WGSL address space and access mode strings for `space`. -/// -/// Why don't we implement [`ToWgsl`] for [`AddressSpace`]? -/// -/// In WGSL, the full form of a pointer type is `ptr`, where: -/// - `AS` is the address space, -/// - `T` is the store type, and -/// - `AM` is the access mode. -/// -/// Since the type `T` intervenes between the address space and the -/// access mode, there isn't really any individual WGSL grammar -/// production that corresponds to an [`AddressSpace`], so [`ToWgsl`] -/// is too simple-minded for this case. -/// -/// Furthermore, we want to write `var` for most address -/// spaces, but we want to just write `var foo: T` for handle types. -/// -/// [`AddressSpace`]: crate::AddressSpace -pub const fn address_space_str( - space: crate::AddressSpace, -) -> (Option<&'static str>, Option<&'static str>) { - use crate::AddressSpace as As; - - ( - Some(match space { - As::Private => "private", - As::Uniform => "uniform", - As::Storage { access } => { - if access.contains(crate::StorageAccess::ATOMIC) { - return (Some("storage"), Some("atomic")); - } else if access.contains(crate::StorageAccess::STORE) { - return (Some("storage"), Some("read_write")); - } else { - "storage" - } - } - As::PushConstant => "push_constant", - As::WorkGroup => "workgroup", - As::Handle => return (None, None), - As::Function => "function", - }), - None, - ) -} diff --git a/third_party/rust/naga/src/compact/expressions.rs b/third_party/rust/naga/src/compact/expressions.rs index d1b800a93f77..7ddb46619e42 100644 --- a/third_party/rust/naga/src/compact/expressions.rs +++ b/third_party/rust/naga/src/compact/expressions.rs @@ -185,12 +185,6 @@ impl ExpressionTracer<'_> { Iq::NumLevels | Iq::NumLayers | Iq::NumSamples => {} } } - Ex::RayQueryVertexPositions { - query, - committed: _, - } => { - self.expressions_used.insert(query); - } Ex::Unary { op: _, expr } => { self.expressions_used.insert(expr); } @@ -408,10 +402,6 @@ impl ModuleMap { ref mut query, committed: _, } => adjust(query), - Ex::RayQueryVertexPositions { - ref mut query, - committed: _, - } => adjust(query), } } diff --git a/third_party/rust/naga/src/compact/functions.rs b/third_party/rust/naga/src/compact/functions.rs index 57f6f104f21b..b37edd727139 100644 --- a/third_party/rust/naga/src/compact/functions.rs +++ b/third_party/rust/naga/src/compact/functions.rs @@ -101,7 +101,7 @@ impl FunctionMap { self.expressions.adjust(&mut handle); reuse.insert(handle, name); } - core::mem::swap(&mut function.named_expressions, reuse); + std::mem::swap(&mut function.named_expressions, reuse); assert!(reuse.is_empty()); // Adjust statements. diff --git a/third_party/rust/naga/src/compact/handle_set_map.rs b/third_party/rust/naga/src/compact/handle_set_map.rs index 5e80b954f1b9..29ae89e909d8 100644 --- a/third_party/rust/naga/src/compact/handle_set_map.rs +++ b/third_party/rust/naga/src/compact/handle_set_map.rs @@ -1,5 +1,3 @@ -use alloc::vec::Vec; - use crate::arena::{Arena, Handle, HandleSet, Range}; type Index = crate::non_max_u32::NonMaxU32; @@ -14,7 +12,7 @@ pub struct HandleMap { new_index: Vec>, /// This type is indexed by values of type `T`. - as_keys: core::marker::PhantomData, + as_keys: std::marker::PhantomData, } impl HandleMap { @@ -36,7 +34,7 @@ impl HandleMap { } }) .collect(), - as_keys: core::marker::PhantomData, + as_keys: std::marker::PhantomData, } } @@ -52,7 +50,7 @@ impl HandleMap { pub fn try_adjust(&self, old: Handle) -> Option> { log::trace!( "adjusting {} handle [{}] -> [{:?}]", - core::any::type_name::(), + std::any::type_name::(), old.index(), self.new_index[old.index()] ); diff --git a/third_party/rust/naga/src/compact/mod.rs b/third_party/rust/naga/src/compact/mod.rs index ee3d5d3f6055..f889a8e1b9d2 100644 --- a/third_party/rust/naga/src/compact/mod.rs +++ b/third_party/rust/naga/src/compact/mod.rs @@ -4,15 +4,10 @@ mod handle_set_map; mod statements; mod types; -use alloc::vec::Vec; - use crate::arena::HandleSet; use crate::{arena, compact::functions::FunctionTracer}; use handle_set_map::HandleMap; -#[cfg(test)] -use alloc::{format, string::ToString}; - /// Remove unused types, expressions, and constants from `module`. /// /// Assume that the following are used by definition: @@ -317,7 +312,6 @@ impl<'module> ModuleTracer<'module> { let crate::SpecialTypes { ref ray_desc, ref ray_intersection, - ref ray_vertex_return, ref predeclared_types, } = *special_types; @@ -327,9 +321,6 @@ impl<'module> ModuleTracer<'module> { if let Some(ray_intersection) = *ray_intersection { self.types_used.insert(ray_intersection); } - if let Some(ray_vertex_return) = *ray_vertex_return { - self.types_used.insert(ray_vertex_return); - } for (_, &handle) in predeclared_types { self.types_used.insert(handle); } @@ -353,7 +344,7 @@ impl<'module> ModuleTracer<'module> { let mut max_dep = Vec::with_capacity(self.module.types.len()); let mut previous = None; for (_handle, ty) in self.module.types.iter() { - previous = core::cmp::max( + previous = std::cmp::max( previous, match ty.inner { crate::TypeInner::Array { size, .. } @@ -466,7 +457,6 @@ impl ModuleMap { let crate::SpecialTypes { ref mut ray_desc, ref mut ray_intersection, - ref mut ray_vertex_return, ref mut predeclared_types, } = *special; @@ -477,10 +467,6 @@ impl ModuleMap { self.types.adjust(ray_intersection); } - if let Some(ref mut ray_vertex_return) = *ray_vertex_return { - self.types.adjust(ray_vertex_return); - } - for handle in predeclared_types.values_mut() { self.types.adjust(handle); } diff --git a/third_party/rust/naga/src/compact/statements.rs b/third_party/rust/naga/src/compact/statements.rs index 32a8130fd32d..08b1ea9757ad 100644 --- a/third_party/rust/naga/src/compact/statements.rs +++ b/third_party/rust/naga/src/compact/statements.rs @@ -1,5 +1,3 @@ -use alloc::{vec, vec::Vec}; - use super::functions::FunctionTracer; use super::FunctionMap; use crate::arena::Handle; diff --git a/third_party/rust/naga/src/compact/types.rs b/third_party/rust/naga/src/compact/types.rs index 293256826804..cde1352d396d 100644 --- a/third_party/rust/naga/src/compact/types.rs +++ b/third_party/rust/naga/src/compact/types.rs @@ -20,8 +20,8 @@ impl TypeTracer<'_> { | Ti::ValuePointer { .. } | Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } => {} + | Ti::AccelerationStructure + | Ti::RayQuery => {} // Types that do contain handles. Ti::Array { @@ -75,8 +75,8 @@ impl ModuleMap { | Ti::ValuePointer { .. } | Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } => {} + | Ti::AccelerationStructure + | Ti::RayQuery => {} // Types that do contain handles. Ti::Pointer { diff --git a/third_party/rust/naga/src/diagnostic_filter.rs b/third_party/rust/naga/src/diagnostic_filter.rs index 37fb9261213a..2fa5464cdfb9 100644 --- a/third_party/rust/naga/src/diagnostic_filter.rs +++ b/third_party/rust/naga/src/diagnostic_filter.rs @@ -1,11 +1,8 @@ //! [`DiagnosticFilter`]s and supporting functionality. -use alloc::boxed::Box; - -use crate::{Arena, Handle}; - #[cfg(feature = "wgsl-in")] use crate::Span; +use crate::{Arena, Handle}; #[cfg(feature = "arbitrary")] use arbitrary::Arbitrary; #[cfg(feature = "wgsl-in")] diff --git a/third_party/rust/naga/src/error.rs b/third_party/rust/naga/src/error.rs index dbc99651ff9a..21c1a13d3c4a 100644 --- a/third_party/rust/naga/src/error.rs +++ b/third_party/rust/naga/src/error.rs @@ -1,5 +1,4 @@ -use alloc::{boxed::Box, string::String, vec::Vec}; -use core::{error::Error, fmt}; +use std::{error::Error, fmt}; #[derive(Clone, Debug)] pub struct ShaderError { diff --git a/third_party/rust/naga/src/front/atomic_upgrade.rs b/third_party/rust/naga/src/front/atomic_upgrade.rs index 549fcf69abd5..529883ae4108 100644 --- a/third_party/rust/naga/src/front/atomic_upgrade.rs +++ b/third_party/rust/naga/src/front/atomic_upgrade.rs @@ -30,9 +30,7 @@ //! [`Struct`]: TypeInner::Struct //! [`Load`]: crate::Expression::Load //! [`Store`]: crate::Statement::Store - -use alloc::{format, sync::Arc}; -use core::sync::atomic::AtomicUsize; +use std::sync::{atomic::AtomicUsize, Arc}; use crate::{GlobalVariable, Handle, Module, Type, TypeInner}; @@ -53,9 +51,9 @@ pub enum Error { #[derive(Clone, Default)] struct Padding(Arc); -impl core::fmt::Display for Padding { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - for _ in 0..self.0.load(core::sync::atomic::Ordering::Relaxed) { +impl std::fmt::Display for Padding { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + for _ in 0..self.0.load(std::sync::atomic::Ordering::Relaxed) { f.write_str(" ")?; } Ok(()) @@ -64,25 +62,25 @@ impl core::fmt::Display for Padding { impl Drop for Padding { fn drop(&mut self) { - let _ = self.0.fetch_sub(1, core::sync::atomic::Ordering::Relaxed); + let _ = self.0.fetch_sub(1, std::sync::atomic::Ordering::Relaxed); } } impl Padding { - fn trace(&self, msg: impl core::fmt::Display, t: impl core::fmt::Debug) { + fn trace(&self, msg: impl std::fmt::Display, t: impl std::fmt::Debug) { format!("{msg} {t:#?}") .split('\n') .for_each(|ln| log::trace!("{self}{ln}")); } - fn debug(&self, msg: impl core::fmt::Display, t: impl core::fmt::Debug) { + fn debug(&self, msg: impl std::fmt::Display, t: impl std::fmt::Debug) { format!("{msg} {t:#?}") .split('\n') .for_each(|ln| log::debug!("{self}{ln}")); } fn inc_padding(&self) -> Padding { - let _ = self.0.fetch_add(1, core::sync::atomic::Ordering::Relaxed); + let _ = self.0.fetch_add(1, std::sync::atomic::Ordering::Relaxed); self.clone() } } diff --git a/third_party/rust/naga/src/front/glsl/ast.rs b/third_party/rust/naga/src/front/glsl/ast.rs index cd1102c473ee..78f5e2cb099a 100644 --- a/third_party/rust/naga/src/front/glsl/ast.rs +++ b/third_party/rust/naga/src/front/glsl/ast.rs @@ -1,5 +1,4 @@ -use alloc::{borrow::Cow, string::String, vec::Vec}; -use core::fmt; +use std::{borrow::Cow, fmt}; use super::{builtins::MacroCall, Span}; use crate::{ diff --git a/third_party/rust/naga/src/front/glsl/builtins.rs b/third_party/rust/naga/src/front/glsl/builtins.rs index 502da8a20c19..94594f6cbaea 100644 --- a/third_party/rust/naga/src/front/glsl/builtins.rs +++ b/third_party/rust/naga/src/front/glsl/builtins.rs @@ -1,5 +1,3 @@ -use alloc::{vec, vec::Vec}; - use super::{ ast::{ BuiltinVariations, FunctionDeclaration, FunctionKind, Overload, ParameterInfo, diff --git a/third_party/rust/naga/src/front/glsl/context.rs b/third_party/rust/naga/src/front/glsl/context.rs index 5296c4f28c0f..04e89e839704 100644 --- a/third_party/rust/naga/src/front/glsl/context.rs +++ b/third_party/rust/naga/src/front/glsl/context.rs @@ -1,6 +1,3 @@ -use alloc::{format, string::String, vec::Vec}; -use core::ops::Index; - use super::{ ast::{ GlobalLookup, GlobalLookupKind, HirExpr, HirExprKind, ParameterInfo, ParameterQualifier, @@ -15,6 +12,7 @@ use crate::{ Expression, FastHashMap, FunctionArgument, Handle, Literal, LocalVariable, RelationalFunction, Scalar, Span, Statement, Type, TypeInner, VectorSize, }; +use std::ops::Index; /// The position at which an expression is, used while lowering #[derive(Clone, Copy, PartialEq, Eq, Debug)] @@ -138,10 +136,10 @@ impl<'a> Context<'a> { F: FnOnce(&mut Self) -> Result, { self.emit_restart(); - let old_body = core::mem::replace(&mut self.body, Block::new()); + let old_body = std::mem::replace(&mut self.body, Block::new()); let res = cb(self); self.emit_restart(); - let new_body = core::mem::replace(&mut self.body, old_body); + let new_body = std::mem::replace(&mut self.body, old_body); res.map(|r| (new_body, r)) } @@ -150,10 +148,10 @@ impl<'a> Context<'a> { F: FnOnce(&mut Self) -> Result<()>, { self.emit_restart(); - let old_body = core::mem::replace(&mut self.body, body); + let old_body = std::mem::replace(&mut self.body, body); let res = cb(self); self.emit_restart(); - let body = core::mem::replace(&mut self.body, old_body); + let body = std::mem::replace(&mut self.body, old_body); res.map(|_| body) } @@ -1105,14 +1103,14 @@ impl<'a> Context<'a> { .and_then(|scalar| Some((type_power(scalar)?, scalar))), ) { match accept_power.cmp(&reject_power) { - core::cmp::Ordering::Less => { + std::cmp::Ordering::Less => { accept_body = self.with_body(accept_body, |ctx| { ctx.conversion(&mut accept, accept_meta, reject_scalar)?; Ok(()) })?; } - core::cmp::Ordering::Equal => {} - core::cmp::Ordering::Greater => { + std::cmp::Ordering::Equal => {} + std::cmp::Ordering::Greater => { reject_body = self.with_body(reject_body, |ctx| { ctx.conversion(&mut reject, reject_meta, accept_scalar)?; Ok(()) @@ -1258,7 +1256,7 @@ impl<'a> Context<'a> { right = self.add_expression( Expression::Compose { ty, - components: core::iter::repeat(right).take(cols as usize).collect(), + components: std::iter::repeat(right).take(cols as usize).collect(), }, meta, )?; @@ -1430,11 +1428,11 @@ impl<'a> Context<'a> { right_components.and_then(|scalar| Some((type_power(scalar)?, scalar))), ) { match left_power.cmp(&right_power) { - core::cmp::Ordering::Less => { + std::cmp::Ordering::Less => { self.conversion(left, left_meta, right_scalar)?; } - core::cmp::Ordering::Equal => {} - core::cmp::Ordering::Greater => { + std::cmp::Ordering::Equal => {} + std::cmp::Ordering::Greater => { self.conversion(right, right_meta, left_scalar)?; } } diff --git a/third_party/rust/naga/src/front/glsl/error.rs b/third_party/rust/naga/src/front/glsl/error.rs index c0927e98a4c4..92962db00d73 100644 --- a/third_party/rust/naga/src/front/glsl/error.rs +++ b/third_party/rust/naga/src/front/glsl/error.rs @@ -1,21 +1,14 @@ -use alloc::{ - borrow::Cow, - string::{String, ToString}, - vec, - vec::Vec, -}; - +use super::token::TokenValue; +use crate::SourceLocation; +use crate::{proc::ConstantEvaluatorError, Span}; use codespan_reporting::diagnostic::{Diagnostic, Label}; use codespan_reporting::files::SimpleFile; use codespan_reporting::term; use pp_rs::token::PreprocessorError; +use std::borrow::Cow; use termcolor::{NoColor, WriteColor}; use thiserror::Error; -use super::token::TokenValue; -use crate::SourceLocation; -use crate::{proc::ConstantEvaluatorError, Span}; - fn join_with_comma(list: &[ExpectedToken]) -> String { let mut string = "".to_string(); for (i, val) in list.iter().enumerate() { @@ -52,8 +45,8 @@ impl From for ExpectedToken { ExpectedToken::Token(token) } } -impl core::fmt::Display for ExpectedToken { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for ExpectedToken { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match *self { ExpectedToken::Token(ref token) => write!(f, "{token:?}"), ExpectedToken::TypeName => write!(f, "a type"), @@ -187,14 +180,14 @@ impl ParseErrors { } } -impl core::fmt::Display for ParseErrors { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { +impl std::fmt::Display for ParseErrors { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.errors.iter().try_for_each(|e| write!(f, "{e:?}")) } } -impl core::error::Error for ParseErrors { - fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { +impl std::error::Error for ParseErrors { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { None } } diff --git a/third_party/rust/naga/src/front/glsl/functions.rs b/third_party/rust/naga/src/front/glsl/functions.rs index b1d43af4b6b7..0d05c5433c76 100644 --- a/third_party/rust/naga/src/front/glsl/functions.rs +++ b/third_party/rust/naga/src/front/glsl/functions.rs @@ -1,11 +1,3 @@ -use alloc::{ - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::iter; - use super::{ ast::*, builtins::{inject_builtin, sampled_to_depth}, @@ -19,6 +11,7 @@ use crate::{ Expression, Function, FunctionArgument, FunctionResult, Handle, Literal, LocalVariable, Scalar, ScalarKind, Span, Statement, StructMember, Type, TypeInner, }; +use std::iter; /// Struct detailing a store operation that must happen after a function call struct ProxyWrite { @@ -289,7 +282,7 @@ impl Frontend { for i in 0..columns as u32 { if i < ori_cols as u32 { - use core::cmp::Ordering; + use std::cmp::Ordering; let vector = ctx.add_expression( Expression::AccessIndex { @@ -1237,7 +1230,7 @@ impl Frontend { + 3, ); - let global_init_body = core::mem::replace(&mut ctx.body, body); + let global_init_body = std::mem::replace(&mut ctx.body, body); for arg in self.entry_args.iter() { if arg.storage != StorageQualifier::Input { diff --git a/third_party/rust/naga/src/front/glsl/lex.rs b/third_party/rust/naga/src/front/glsl/lex.rs index 9337491b5dae..b4ebef1b309f 100644 --- a/third_party/rust/naga/src/front/glsl/lex.rs +++ b/third_party/rust/naga/src/front/glsl/lex.rs @@ -1,16 +1,13 @@ -use alloc::string::String; - -use pp_rs::{ - pp::Preprocessor, - token::{PreprocessorError, Punct, TokenValue as PPTokenValue}, -}; - use super::{ ast::Precision, token::{Directive, DirectiveKind, Token, TokenValue}, types::parse_type, }; use crate::{FastHashMap, Span, StorageAccess}; +use pp_rs::{ + pp::Preprocessor, + token::{PreprocessorError, Punct, TokenValue as PPTokenValue}, +}; #[derive(Debug)] #[cfg_attr(test, derive(PartialEq))] @@ -203,8 +200,6 @@ impl Iterator for Lexer<'_> { #[cfg(test)] mod tests { - use alloc::vec; - use pp_rs::token::{Integer, Location, Token as PPToken, TokenValue as PPTokenValue}; use super::{ diff --git a/third_party/rust/naga/src/front/glsl/mod.rs b/third_party/rust/naga/src/front/glsl/mod.rs index 876add46a1c9..ea202b244548 100644 --- a/third_party/rust/naga/src/front/glsl/mod.rs +++ b/third_party/rust/naga/src/front/glsl/mod.rs @@ -16,8 +16,6 @@ pub use ast::{Precision, Profile}; pub use error::{Error, ErrorKind, ExpectedToken, ParseErrors}; pub use token::TokenValue; -use alloc::{string::String, vec::Vec}; - use crate::{proc::Layouter, FastHashMap, FastHashSet, Handle, Module, ShaderStage, Span, Type}; use ast::{EntryArg, FunctionDeclaration, GlobalLookup}; use parser::ParsingContext; @@ -36,7 +34,7 @@ mod token; mod types; mod variables; -type Result = core::result::Result; +type Result = std::result::Result; /// Per-shader options passed to [`parse`](Frontend::parse). /// @@ -198,7 +196,7 @@ impl Frontend { &mut self, options: &Options, source: &str, - ) -> core::result::Result { + ) -> std::result::Result { self.reset(options.stage); let lexer = lex::Lexer::new(source, &options.defines); @@ -209,12 +207,12 @@ impl Frontend { if self.errors.is_empty() { Ok(module) } else { - Err(core::mem::take(&mut self.errors).into()) + Err(std::mem::take(&mut self.errors).into()) } } Err(e) => { self.errors.push(e); - Err(core::mem::take(&mut self.errors).into()) + Err(std::mem::take(&mut self.errors).into()) } } } diff --git a/third_party/rust/naga/src/front/glsl/offset.rs b/third_party/rust/naga/src/front/glsl/offset.rs index b17dbbecd0a3..6e8d5ada107a 100644 --- a/third_party/rust/naga/src/front/glsl/offset.rs +++ b/third_party/rust/naga/src/front/glsl/offset.rs @@ -11,8 +11,6 @@ The OpenGl spec (the layout rules are defined by the OpenGl spec in section equivalent to bytes. */ -use alloc::vec::Vec; - use super::{ ast::StructLayout, error::{Error, ErrorKind}, diff --git a/third_party/rust/naga/src/front/glsl/parser.rs b/third_party/rust/naga/src/front/glsl/parser.rs index 2eb3ec4b0097..d9ddeab932d0 100644 --- a/third_party/rust/naga/src/front/glsl/parser.rs +++ b/third_party/rust/naga/src/front/glsl/parser.rs @@ -1,8 +1,3 @@ -use alloc::{string::String, vec}; -use core::iter::Peekable; - -use pp_rs::token::{PreprocessorError, Token as PPToken, TokenValue as PPTokenValue}; - use super::{ ast::{FunctionKind, Profile, TypeQualifiers}, context::{Context, ExprPos}, @@ -15,6 +10,8 @@ use super::{ Frontend, Result, }; use crate::{arena::Handle, proc::U32EvalError, Expression, Module, Span, Type}; +use pp_rs::token::{PreprocessorError, Token as PPToken, TokenValue as PPTokenValue}; +use std::iter::Peekable; mod declarations; mod expressions; diff --git a/third_party/rust/naga/src/front/glsl/parser/declarations.rs b/third_party/rust/naga/src/front/glsl/parser/declarations.rs index f06482675163..1c5c151b5b09 100644 --- a/third_party/rust/naga/src/front/glsl/parser/declarations.rs +++ b/third_party/rust/naga/src/front/glsl/parser/declarations.rs @@ -1,6 +1,3 @@ -use alloc::{string::String, vec, vec::Vec}; - -use super::{DeclarationContext, ParsingContext, Result}; use crate::{ front::glsl::{ ast::{ @@ -20,6 +17,8 @@ use crate::{ Type, TypeInner, }; +use super::{DeclarationContext, ParsingContext, Result}; + /// Helper method used to retrieve the child type of `ty` at /// index `i`. /// diff --git a/third_party/rust/naga/src/front/glsl/parser/expressions.rs b/third_party/rust/naga/src/front/glsl/parser/expressions.rs index 524863df5ee2..d08625d717ed 100644 --- a/third_party/rust/naga/src/front/glsl/parser/expressions.rs +++ b/third_party/rust/naga/src/front/glsl/parser/expressions.rs @@ -1,5 +1,4 @@ -use alloc::{vec, vec::Vec}; -use core::num::NonZeroU32; +use std::num::NonZeroU32; use crate::{ front::glsl::{ diff --git a/third_party/rust/naga/src/front/glsl/parser/functions.rs b/third_party/rust/naga/src/front/glsl/parser/functions.rs index 441e99130a0b..e9028c419b96 100644 --- a/third_party/rust/naga/src/front/glsl/parser/functions.rs +++ b/third_party/rust/naga/src/front/glsl/parser/functions.rs @@ -1,5 +1,3 @@ -use alloc::{vec, vec::Vec}; - use crate::front::glsl::context::ExprPos; use crate::front::glsl::Span; use crate::Literal; diff --git a/third_party/rust/naga/src/front/glsl/parser/types.rs b/third_party/rust/naga/src/front/glsl/parser/types.rs index 0d801443544a..501d53805c04 100644 --- a/third_party/rust/naga/src/front/glsl/parser/types.rs +++ b/third_party/rust/naga/src/front/glsl/parser/types.rs @@ -1,5 +1,4 @@ -use alloc::{vec, vec::Vec}; -use core::num::NonZeroU32; +use std::num::NonZeroU32; use crate::{ front::glsl::{ diff --git a/third_party/rust/naga/src/front/glsl/parser_tests.rs b/third_party/rust/naga/src/front/glsl/parser_tests.rs index 6fdd1e39715d..135765ca58d0 100644 --- a/third_party/rust/naga/src/front/glsl/parser_tests.rs +++ b/third_party/rust/naga/src/front/glsl/parser_tests.rs @@ -1,7 +1,3 @@ -use alloc::{borrow::ToOwned, vec}; - -use pp_rs::token::PreprocessorError; - use super::{ ast::Profile, error::ExpectedToken, @@ -10,9 +6,7 @@ use super::{ Frontend, Options, Span, }; use crate::ShaderStage; - -#[cfg(test)] -use std::println; +use pp_rs::token::PreprocessorError; #[test] fn version() { diff --git a/third_party/rust/naga/src/front/glsl/token.rs b/third_party/rust/naga/src/front/glsl/token.rs index 78c23c56c29a..303723a27b5d 100644 --- a/third_party/rust/naga/src/front/glsl/token.rs +++ b/third_party/rust/naga/src/front/glsl/token.rs @@ -1,7 +1,5 @@ pub use pp_rs::token::{Float, Integer, Location, Token as PPToken}; -use alloc::{string::String, vec::Vec}; - use super::ast::Precision; use crate::{Interpolation, Sampling, Span, Type}; diff --git a/third_party/rust/naga/src/front/glsl/types.rs b/third_party/rust/naga/src/front/glsl/types.rs index 72b10a62a9f5..ad5e188fd956 100644 --- a/third_party/rust/naga/src/front/glsl/types.rs +++ b/third_party/rust/naga/src/front/glsl/types.rs @@ -1,5 +1,3 @@ -use alloc::format; - use super::{context::Context, Error, ErrorKind, Result, Span}; use crate::{ proc::ResolveContext, Expression, Handle, ImageClass, ImageDimension, Scalar, ScalarKind, Type, diff --git a/third_party/rust/naga/src/front/glsl/variables.rs b/third_party/rust/naga/src/front/glsl/variables.rs index 3fd31baef1ef..23a4141e97c9 100644 --- a/third_party/rust/naga/src/front/glsl/variables.rs +++ b/third_party/rust/naga/src/front/glsl/variables.rs @@ -1,5 +1,3 @@ -use alloc::{format, string::String, vec::Vec}; - use super::{ ast::*, context::{Context, ExprPos}, diff --git a/third_party/rust/naga/src/front/mod.rs b/third_party/rust/naga/src/front/mod.rs index 9480e69aa269..11c8aa047e1d 100644 --- a/third_party/rust/naga/src/front/mod.rs +++ b/third_party/rust/naga/src/front/mod.rs @@ -14,14 +14,12 @@ pub mod spv; #[cfg(feature = "wgsl-in")] pub mod wgsl; -use alloc::{vec, vec::Vec}; -use core::ops; - use crate::{ arena::{Arena, Handle, HandleVec, UniqueArena}, proc::{ResolveContext, ResolveError, TypeResolution}, FastHashMap, }; +use std::ops; /// A table of types for an `Arena`. /// @@ -264,7 +262,7 @@ impl SymbolTable { impl SymbolTable where - Name: core::hash::Hash + Eq, + Name: std::hash::Hash + Eq, { /// Perform a lookup for a variable named `name`. /// @@ -274,8 +272,8 @@ where /// scope. pub fn lookup(&self, name: &Q) -> Option<&Var> where - Name: core::borrow::Borrow, - Q: core::hash::Hash + Eq + ?Sized, + Name: std::borrow::Borrow, + Q: std::hash::Hash + Eq + ?Sized, { // Iterate backwards through the scopes and try to find the variable for scope in self.scopes[..self.cursor].iter().rev() { @@ -320,7 +318,7 @@ impl Default for SymbolTable { } } -use core::fmt; +use std::fmt; impl fmt::Debug for SymbolTable { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/third_party/rust/naga/src/front/spv/convert.rs b/third_party/rust/naga/src/front/spv/convert.rs index 3e68c7bee213..6baf74225cb7 100644 --- a/third_party/rust/naga/src/front/spv/convert.rs +++ b/third_party/rust/naga/src/front/spv/convert.rs @@ -1,6 +1,5 @@ -use core::convert::TryInto; - use super::error::Error; +use std::convert::TryInto; pub(super) const fn map_binary_operator(word: spirv::Op) -> Result { use crate::BinaryOperator; diff --git a/third_party/rust/naga/src/front/spv/error.rs b/third_party/rust/naga/src/front/spv/error.rs index 42b1bca086c4..898113d44692 100644 --- a/third_party/rust/naga/src/front/spv/error.rs +++ b/third_party/rust/naga/src/front/spv/error.rs @@ -1,17 +1,10 @@ -use alloc::{ - format, - string::{String, ToString}, - vec::Vec, -}; - +use super::ModuleState; +use crate::{arena::Handle, front::atomic_upgrade}; use codespan_reporting::diagnostic::Diagnostic; use codespan_reporting::files::SimpleFile; use codespan_reporting::term; use termcolor::{NoColor, WriteColor}; -use super::ModuleState; -use crate::{arena::Handle, front::atomic_upgrade}; - #[derive(Clone, Debug, thiserror::Error)] pub enum Error { #[error("invalid header")] diff --git a/third_party/rust/naga/src/front/spv/function.rs b/third_party/rust/naga/src/front/spv/function.rs index fe56ba833b2f..b780cbe775e3 100644 --- a/third_party/rust/naga/src/front/spv/function.rs +++ b/third_party/rust/naga/src/front/spv/function.rs @@ -1,12 +1,11 @@ -use alloc::{format, vec, vec::Vec}; - -use super::{Error, Instruction, LookupExpression, LookupHelper as _}; -use crate::proc::Emitter; use crate::{ arena::{Arena, Handle}, front::spv::{BlockContext, BodyIndex}, }; +use super::{Error, Instruction, LookupExpression, LookupHelper as _}; +use crate::proc::Emitter; + pub type BlockId = u32; impl> super::Frontend { @@ -644,7 +643,7 @@ impl BlockContext<'_> { let body = lower_impl(blocks, bodies, body_idx); // Handle simple cases that would make a fallthrough statement unreachable code - let fall_through = body.last().is_none_or(|s| !s.is_terminator()); + let fall_through = body.last().map_or(true, |s| !s.is_terminator()); crate::SwitchCase { value: crate::SwitchValue::I32(value), diff --git a/third_party/rust/naga/src/front/spv/image.rs b/third_party/rust/naga/src/front/spv/image.rs index 8650c89adfc1..ace97d4dd5e9 100644 --- a/third_party/rust/naga/src/front/spv/image.rs +++ b/third_party/rust/naga/src/front/spv/image.rs @@ -1,5 +1,3 @@ -use alloc::vec::Vec; - use crate::{ arena::{Handle, UniqueArena}, Scalar, diff --git a/third_party/rust/naga/src/front/spv/mod.rs b/third_party/rust/naga/src/front/spv/mod.rs index 0b512eab40ea..d34edf367e1e 100644 --- a/third_party/rust/naga/src/front/spv/mod.rs +++ b/third_party/rust/naga/src/front/spv/mod.rs @@ -33,22 +33,20 @@ mod function; mod image; mod null; +use convert::*; pub use error::Error; +use function::*; -use alloc::{borrow::ToOwned, format, string::String, vec, vec::Vec}; -use core::{convert::TryInto, mem, num::NonZeroU32}; -use std::path::PathBuf; - -use petgraph::graphmap::GraphMap; - -use super::atomic_upgrade::Upgrades; use crate::{ arena::{Arena, Handle, UniqueArena}, proc::{Alignment, Layouter}, FastHashMap, FastHashSet, FastIndexMap, }; -use convert::*; -use function::*; + +use petgraph::graphmap::GraphMap; +use std::{convert::TryInto, mem, num::NonZeroU32, path::PathBuf}; + +use super::atomic_upgrade::Upgrades; pub const SUPPORTED_CAPABILITIES: &[spirv::Capability] = &[ spirv::Capability::Shader, @@ -704,7 +702,7 @@ impl> Frontend { break; } } - core::str::from_utf8(&self.temp_bytes) + std::str::from_utf8(&self.temp_bytes) .map(|s| (s.to_owned(), count)) .map_err(|_| Error::BadString) } @@ -3848,10 +3846,6 @@ impl> Frontend { .bits() != 0, ); - flags.set( - crate::Barrier::TEXTURE, - semantics & spirv::MemorySemantics::IMAGE_MEMORY.bits() != 0, - ); block.push(crate::Statement::Barrier(flags), span); } else { log::warn!("Unsupported barrier execution scope: {}", exec_scope); @@ -6068,8 +6062,6 @@ fn is_parent(mut child: usize, parent: usize, block_ctx: &BlockContext) -> bool #[cfg(test)] mod test { - use alloc::vec; - #[test] fn parse() { let bin = vec![ diff --git a/third_party/rust/naga/src/front/spv/null.rs b/third_party/rust/naga/src/front/spv/null.rs index 8cd33f142f25..c7d3776841a7 100644 --- a/third_party/rust/naga/src/front/spv/null.rs +++ b/third_party/rust/naga/src/front/spv/null.rs @@ -1,5 +1,3 @@ -use alloc::vec; - use super::Error; use crate::arena::{Arena, Handle}; diff --git a/third_party/rust/naga/src/front/type_gen.rs b/third_party/rust/naga/src/front/type_gen.rs index 687d245b1e4c..2e75076239ee 100644 --- a/third_party/rust/naga/src/front/type_gen.rs +++ b/third_party/rust/naga/src/front/type_gen.rs @@ -2,8 +2,6 @@ Type generators. */ -use alloc::{format, string::ToString, vec}; - use crate::{arena::Handle, span::Span}; impl crate::Module { @@ -104,36 +102,6 @@ impl crate::Module { handle } - /// Make sure the types for the vertex return are in the module's type - pub fn generate_vertex_return_type(&mut self) -> Handle { - if let Some(handle) = self.special_types.ray_vertex_return { - return handle; - } - let ty_vec3f = self.types.insert( - crate::Type { - name: None, - inner: crate::TypeInner::Vector { - size: crate::VectorSize::Tri, - scalar: crate::Scalar::F32, - }, - }, - Span::UNDEFINED, - ); - let array = self.types.insert( - crate::Type { - name: None, - inner: crate::TypeInner::Array { - base: ty_vec3f, - size: crate::ArraySize::Constant(core::num::NonZeroU32::new(3).unwrap()), - stride: 16, - }, - }, - Span::UNDEFINED, - ); - self.special_types.ray_vertex_return = Some(array); - array - } - /// Populate this module's [`SpecialTypes::ray_intersection`] type. /// /// [`SpecialTypes::ray_intersection`] is the type of a @@ -283,7 +251,7 @@ impl crate::Module { &mut self, special_type: crate::PredeclaredType, ) -> Handle { - use core::fmt::Write; + use std::fmt::Write; if let Some(value) = self.special_types.predeclared_types.get(&special_type) { return *value; diff --git a/third_party/rust/naga/src/front/wgsl/error.rs b/third_party/rust/naga/src/front/wgsl/error.rs index de45cd28126c..7bdbf12d2c79 100644 --- a/third_party/rust/naga/src/front/wgsl/error.rs +++ b/third_party/rust/naga/src/front/wgsl/error.rs @@ -1,19 +1,3 @@ -use alloc::{ - borrow::Cow, - boxed::Box, - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::ops::Range; - -use codespan_reporting::diagnostic::{Diagnostic, Label}; -use codespan_reporting::files::SimpleFile; -use codespan_reporting::term; -use termcolor::{ColorChoice, NoColor, StandardStream}; -use thiserror::Error; - use crate::diagnostic_filter::ConflictingDiagnosticRuleError; use crate::front::wgsl::parse::directive::enable_extension::{ EnableExtension, UnimplementedEnableExtension, @@ -25,6 +9,16 @@ use crate::front::wgsl::parse::lexer::Token; use crate::front::wgsl::Scalar; use crate::proc::{Alignment, ConstantEvaluatorError, ResolveError}; use crate::{SourceLocation, Span}; +use codespan_reporting::diagnostic::{Diagnostic, Label}; +use codespan_reporting::files::SimpleFile; +use codespan_reporting::term; +use std::borrow::Cow; +use std::ops::Range; +use termcolor::{ColorChoice, NoColor, StandardStream}; +use thiserror::Error; + +#[cfg(test)] +use std::mem::size_of; #[derive(Clone, Debug)] pub struct ParseError { @@ -108,14 +102,14 @@ impl ParseError { } } -impl core::fmt::Display for ParseError { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for ParseError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.message) } } -impl core::error::Error for ParseError { - fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { +impl std::error::Error for ParseError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { None } } @@ -718,7 +712,7 @@ impl<'a> Error<'a> { ParseError { message: "invalid left-hand side of assignment".into(), - labels: core::iter::once((span, "cannot assign to this expression".into())) + labels: std::iter::once((span, "cannot assign to this expression".into())) .chain(extra_label) .collect(), notes, @@ -1106,7 +1100,7 @@ impl<'a> Error<'a> { ) }) .expect("internal error: diag. attr. rejection on empty map"); - core::iter::once(first) + std::iter::once(first) .chain(spans.map(|span| (span, "".into()))) .collect() }, diff --git a/third_party/rust/naga/src/front/wgsl/index.rs b/third_party/rust/naga/src/front/wgsl/index.rs index 7dafb6ef64a0..bc0af670ff00 100644 --- a/third_party/rust/naga/src/front/wgsl/index.rs +++ b/third_party/rust/naga/src/front/wgsl/index.rs @@ -1,5 +1,3 @@ -use alloc::{vec, vec::Vec}; - use super::Error; use crate::front::wgsl::parse::ast; use crate::{FastHashMap, Handle, Span}; diff --git a/third_party/rust/naga/src/front/wgsl/lower/construction.rs b/third_party/rust/naga/src/front/wgsl/lower/construction.rs index b5fc3b66f0ec..21317545bb74 100644 --- a/third_party/rust/naga/src/front/wgsl/lower/construction.rs +++ b/third_party/rust/naga/src/front/wgsl/lower/construction.rs @@ -1,15 +1,10 @@ -use alloc::{ - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::num::NonZeroU32; +use std::num::NonZeroU32; + +use crate::front::wgsl::parse::ast; +use crate::{Handle, Span}; use crate::front::wgsl::error::Error; use crate::front::wgsl::lower::{ExpressionContext, Lowerer}; -use crate::front::wgsl::parse::ast; -use crate::{Handle, Span}; /// A cooked form of `ast::ConstructorType` that uses Naga types whenever /// possible. @@ -305,7 +300,7 @@ impl<'source> Lowerer<'source, '_> { Constructor::Type((_, &crate::TypeInner::Vector { size, scalar })), ) => { ctx.convert_slice_to_common_leaf_scalar( - core::slice::from_mut(&mut component), + std::slice::from_mut(&mut component), scalar, )?; expr = crate::Expression::Splat { diff --git a/third_party/rust/naga/src/front/wgsl/lower/conversion.rs b/third_party/rust/naga/src/front/wgsl/lower/conversion.rs index 58a7f391241e..f78bb3da27a3 100644 --- a/third_party/rust/naga/src/front/wgsl/lower/conversion.rs +++ b/third_party/rust/naga/src/front/wgsl/lower/conversion.rs @@ -1,7 +1,5 @@ //! WGSL's automatic conversions for abstract types. -use alloc::{boxed::Box, string::String, vec::Vec}; - use crate::front::wgsl::error::{ AutoConversionError, AutoConversionLeafScalarError, ConcretizationFailedError, }; @@ -442,8 +440,8 @@ impl crate::TypeInner { | Ti::Struct { .. } | Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } + | Ti::AccelerationStructure + | Ti::RayQuery | Ti::BindingArray { .. } => None, } } @@ -468,8 +466,8 @@ impl crate::TypeInner { Ti::Struct { .. } | Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } + | Ti::AccelerationStructure + | Ti::RayQuery | Ti::BindingArray { .. } => None, } } diff --git a/third_party/rust/naga/src/front/wgsl/lower/mod.rs b/third_party/rust/naga/src/front/wgsl/lower/mod.rs index 36be28111168..7d8fbb7c80f4 100644 --- a/third_party/rust/naga/src/front/wgsl/lower/mod.rs +++ b/third_party/rust/naga/src/front/wgsl/lower/mod.rs @@ -1,9 +1,4 @@ -use alloc::{ - borrow::ToOwned, - string::{String, ToString}, - vec::Vec, -}; -use core::num::NonZeroU32; +use std::num::NonZeroU32; use crate::front::wgsl::error::{Error, ExpectedToken, InvalidAssignmentType}; use crate::front::wgsl::index::Index; @@ -787,7 +782,7 @@ impl<'source, 'temp, 'out> ExpressionContext<'source, 'temp, 'out> { } struct ArgumentContext<'ctx, 'source> { - args: core::slice::Iter<'ctx, Handle>>, + args: std::slice::Iter<'ctx, Handle>>, min_args: u32, args_used: u32, total_args: u32, @@ -2040,18 +2035,10 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { } } - lowered_base.try_map(|base| match ctx.const_eval_expr_to_u32(index).ok() { - Some(index) => Ok::<_, Error>(crate::Expression::AccessIndex { base, index }), - None => { - // When an abstract array value e is indexed by an expression - // that is not a const-expression, then the array is concretized - // before the index is applied. - // https://www.w3.org/TR/WGSL/#array-access-expr - // Also applies to vectors and matrices. - let base = ctx.concretize(base)?; - Ok(crate::Expression::Access { base, index }) - } - })? + lowered_base.map(|base| match ctx.const_eval_expr_to_u32(index).ok() { + Some(index) => crate::Expression::AccessIndex { base, index }, + None => crate::Expression::Access { base, index }, + }) } ast::Expression::Member { base, ref field } => { let mut lowered_base = self.expression_for_reference(base, ctx)?; @@ -2170,37 +2157,13 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { // Apply automatic conversions. match op { + // Shift operators require the right operand to be `u32` or + // `vecN`. We can let the validator sort out vector length + // issues, but the right operand must be, or convert to, a u32 leaf + // scalar. crate::BinaryOperator::ShiftLeft | crate::BinaryOperator::ShiftRight => { - // Shift operators require the right operand to be `u32` or - // `vecN`. We can let the validator sort out vector length - // issues, but the right operand must be, or convert to, a u32 leaf - // scalar. right = ctx.try_automatic_conversion_for_leaf_scalar(right, crate::Scalar::U32, span)?; - - // Additionally, we must concretize the left operand if the right operand - // is not a const-expression. - // See https://www.w3.org/TR/WGSL/#overload-resolution-section. - // - // 2. Eliminate any candidate where one of its subexpressions resolves to - // an abstract type after feasible automatic conversions, but another of - // the candidate’s subexpressions is not a const-expression. - // - // We only have to explicitly do so for shifts as their operands may be - // of different types - for other binary ops this is achieved by finding - // the conversion consensus for both operands. - let expr_kind_tracker = match ctx.expr_type { - ExpressionContextType::Runtime(ref ctx) - | ExpressionContextType::Constant(Some(ref ctx)) => { - &ctx.local_expression_kind_tracker - } - ExpressionContextType::Constant(None) | ExpressionContextType::Override => { - &ctx.global_expression_kind_tracker - } - }; - if !expr_kind_tracker.is_const(right) { - left = ctx.concretize(left)?; - } } // All other operators follow the same pattern: reconcile the @@ -2571,14 +2534,6 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { .push(crate::Statement::Barrier(crate::Barrier::SUB_GROUP), span); return Ok(None); } - "textureBarrier" => { - ctx.prepare_args(arguments, 0, span).finish()?; - - let rctx = ctx.runtime_expression_ctx(span)?; - rctx.block - .push(crate::Statement::Barrier(crate::Barrier::TEXTURE), span); - return Ok(None); - } "workgroupUniformLoad" => { let mut args = ctx.prepare_args(arguments, 1, span); let expr = args.next()?; @@ -2748,30 +2703,6 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { .push(crate::Statement::RayQuery { query, fun }, span); return Ok(None); } - "getCommittedHitVertexPositions" => { - let mut args = ctx.prepare_args(arguments, 1, span); - let query = self.ray_query_pointer(args.next()?, ctx)?; - args.finish()?; - - let _ = ctx.module.generate_vertex_return_type(); - - crate::Expression::RayQueryVertexPositions { - query, - committed: true, - } - } - "getCandidateHitVertexPositions" => { - let mut args = ctx.prepare_args(arguments, 1, span); - let query = self.ray_query_pointer(args.next()?, ctx)?; - args.finish()?; - - let _ = ctx.module.generate_vertex_return_type(); - - crate::Expression::RayQueryVertexPositions { - query, - committed: false, - } - } "rayQueryProceed" => { let mut args = ctx.prepare_args(arguments, 1, span); let query = self.ray_query_pointer(args.next()?, ctx)?; @@ -3384,10 +3315,8 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { class, }, ast::Type::Sampler { comparison } => crate::TypeInner::Sampler { comparison }, - ast::Type::AccelerationStructure { vertex_return } => { - crate::TypeInner::AccelerationStructure { vertex_return } - } - ast::Type::RayQuery { vertex_return } => crate::TypeInner::RayQuery { vertex_return }, + ast::Type::AccelerationStructure => crate::TypeInner::AccelerationStructure, + ast::Type::RayQuery => crate::TypeInner::RayQuery, ast::Type::BindingArray { base, size } => { let base = self.resolve_ast_type(base, ctx)?; let size = self.array_size(size, ctx)?; @@ -3457,7 +3386,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { match *resolve_inner!(ctx, pointer) { crate::TypeInner::Pointer { base, .. } => match ctx.module.types[base].inner { - crate::TypeInner::RayQuery { .. } => Ok(pointer), + crate::TypeInner::RayQuery => Ok(pointer), ref other => { log::error!("Pointer type to {:?} passed to ray query op", other); Err(Error::InvalidRayQueryPointer(span)) diff --git a/third_party/rust/naga/src/front/wgsl/mod.rs b/third_party/rust/naga/src/front/wgsl/mod.rs index dc97298acd4a..dcd6398eb6b1 100644 --- a/third_party/rust/naga/src/front/wgsl/mod.rs +++ b/third_party/rust/naga/src/front/wgsl/mod.rs @@ -12,21 +12,18 @@ mod parse; mod tests; mod to_wgsl; +use crate::front::wgsl::error::Error; +use crate::front::wgsl::parse::Parser; +use thiserror::Error; + pub use crate::front::wgsl::error::ParseError; +use crate::front::wgsl::lower::Lowerer; +use crate::Scalar; + pub use crate::front::wgsl::parse::directive::language_extension::{ ImplementedLanguageExtension, LanguageExtension, UnimplementedLanguageExtension, }; -use thiserror::Error; - -use crate::front::wgsl::error::Error; -use crate::front::wgsl::lower::Lowerer; -use crate::front::wgsl::parse::Parser; -use crate::Scalar; - -#[cfg(test)] -use std::println; - pub struct Frontend { parser: Parser, } diff --git a/third_party/rust/naga/src/front/wgsl/parse/ast.rs b/third_party/rust/naga/src/front/wgsl/parse/ast.rs index 3318a3640c91..219dd856e7d4 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/ast.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/ast.rs @@ -1,11 +1,9 @@ -use alloc::vec::Vec; -use core::hash::Hash; - use crate::diagnostic_filter::DiagnosticFilterNode; use crate::front::wgsl::parse::directive::enable_extension::EnableExtensions; use crate::front::wgsl::parse::number::Number; use crate::front::wgsl::Scalar; use crate::{Arena, FastIndexSet, Handle, Span}; +use std::hash::Hash; #[derive(Debug, Default)] pub struct TranslationUnit<'a> { @@ -70,7 +68,7 @@ pub struct Dependency<'a> { } impl Hash for Dependency<'_> { - fn hash(&self, state: &mut H) { + fn hash(&self, state: &mut H) { self.ident.hash(state); } } @@ -243,12 +241,8 @@ pub enum Type<'a> { Sampler { comparison: bool, }, - AccelerationStructure { - vertex_return: bool, - }, - RayQuery { - vertex_return: bool, - }, + AccelerationStructure, + RayQuery, RayDesc, RayIntersection, BindingArray { diff --git a/third_party/rust/naga/src/front/wgsl/parse/directive.rs b/third_party/rust/naga/src/front/wgsl/parse/directive.rs index 3a661bc5856b..5302fff13862 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/directive.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/directive.rs @@ -49,13 +49,12 @@ impl crate::diagnostic_filter::Severity { #[cfg(test)] mod test { - use alloc::format; - use strum::IntoEnumIterator; - use super::DirectiveKind; use crate::front::wgsl::assert_parse_err; + use super::DirectiveKind; + #[test] fn directive_after_global_decl() { for unsupported_shader in DirectiveKind::iter() { diff --git a/third_party/rust/naga/src/front/wgsl/parse/directive/enable_extension.rs b/third_party/rust/naga/src/front/wgsl/parse/directive/enable_extension.rs index e87f44eb5da5..147ec0b5e042 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/directive/enable_extension.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/directive/enable_extension.rs @@ -1,7 +1,6 @@ //! `enable …;` extensions in WGSL. //! //! The focal point of this module is the [`EnableExtension`] API. - use crate::{front::wgsl::error::Error, Span}; /// Tracks the status of every enable-extension known to Naga. @@ -43,12 +42,6 @@ pub enum EnableExtension { Unimplemented(UnimplementedEnableExtension), } -impl From for EnableExtension { - fn from(value: ImplementedEnableExtension) -> Self { - Self::Implemented(value) - } -} - impl EnableExtension { const F16: &'static str = "f16"; const CLIP_DISTANCES: &'static str = "clip_distances"; @@ -98,13 +91,13 @@ pub enum UnimplementedEnableExtension { /// /// In the WGSL standard, this corresponds to [`enable clip_distances;`]. /// - /// [`enable clip_distances;`]: https://www.w3.org/TR/WGSL/#extension-clip_distances + /// [`enable clip_distances;`]: https://www.w3.org/TR/WGSL/#extension-f16 ClipDistances, /// Enables the `blend_src` attribute in WGSL. /// /// In the WGSL standard, this corresponds to [`enable dual_source_blending;`]. /// - /// [`enable dual_source_blending;`]: https://www.w3.org/TR/WGSL/#extension-dual_source_blending + /// [`enable dual_source_blending;`]: https://www.w3.org/TR/WGSL/#extension-f16 DualSourceBlending, } diff --git a/third_party/rust/naga/src/front/wgsl/parse/lexer.rs b/third_party/rust/naga/src/front/wgsl/parse/lexer.rs index 2c1f9608c417..955643e62c22 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/lexer.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/lexer.rs @@ -466,28 +466,6 @@ impl<'a> Lexer<'a> { Ok((format, access)) } - pub(in crate::front::wgsl) fn next_acceleration_structure_flags( - &mut self, - ) -> Result> { - Ok(if self.skip(Token::Paren('<')) { - if !self.skip(Token::Paren('>')) { - let (name, span) = self.next_ident_with_span()?; - let ret = if name == "vertex_return" { - true - } else { - return Err(Error::UnknownAttribute(span)); - }; - self.skip(Token::Separator(',')); - self.expect(Token::Paren('>'))?; - ret - } else { - false - } - } else { - false - }) - } - pub(in crate::front::wgsl) fn open_arguments(&mut self) -> Result<(), Error<'a>> { self.expect(Token::Paren('(')) } diff --git a/third_party/rust/naga/src/front/wgsl/parse/mod.rs b/third_party/rust/naga/src/front/wgsl/parse/mod.rs index 8057a03ab1c1..ad229b2170ce 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/mod.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/mod.rs @@ -1,5 +1,3 @@ -use alloc::{boxed::Box, vec::Vec}; - use crate::diagnostic_filter::{ self, DiagnosticFilter, DiagnosticFilterMap, DiagnosticFilterNode, FilterableTriggeringRule, ShouldConflictOnFullDuplicate, StandardFilterableTriggeringRule, @@ -1654,14 +1652,8 @@ impl Parser { class: crate::ImageClass::Storage { format, access }, } } - "acceleration_structure" => { - let vertex_return = lexer.next_acceleration_structure_flags()?; - ast::Type::AccelerationStructure { vertex_return } - } - "ray_query" => { - let vertex_return = lexer.next_acceleration_structure_flags()?; - ast::Type::RayQuery { vertex_return } - } + "acceleration_structure" => ast::Type::AccelerationStructure, + "ray_query" => ast::Type::RayQuery, "RayDesc" => ast::Type::RayDesc, "RayIntersection" => ast::Type::RayIntersection, _ => return Ok(None), diff --git a/third_party/rust/naga/src/front/wgsl/parse/number.rs b/third_party/rust/naga/src/front/wgsl/parse/number.rs index e447c12c99db..72795de6b425 100644 --- a/third_party/rust/naga/src/front/wgsl/parse/number.rs +++ b/third_party/rust/naga/src/front/wgsl/parse/number.rs @@ -1,5 +1,3 @@ -use alloc::format; - use crate::front::wgsl::error::NumberError; use crate::front::wgsl::parse::lexer::Token; diff --git a/third_party/rust/naga/src/front/wgsl/tests.rs b/third_party/rust/naga/src/front/wgsl/tests.rs index 1746df56fa4a..7d14105b92e0 100644 --- a/third_party/rust/naga/src/front/wgsl/tests.rs +++ b/third_party/rust/naga/src/front/wgsl/tests.rs @@ -1,5 +1,3 @@ -use alloc::format; - use super::parse_str; #[test] diff --git a/third_party/rust/naga/src/front/wgsl/to_wgsl.rs b/third_party/rust/naga/src/front/wgsl/to_wgsl.rs index f24e7296bd76..7d4c17f5f082 100644 --- a/third_party/rust/naga/src/front/wgsl/to_wgsl.rs +++ b/third_party/rust/naga/src/front/wgsl/to_wgsl.rs @@ -1,10 +1,5 @@ //! Producing the WGSL forms of types, for use in error messages. -use alloc::{ - format, - string::{String, ToString}, -}; - use crate::proc::GlobalCtx; use crate::Handle; @@ -122,14 +117,8 @@ impl crate::TypeInner { format!("texture{class_suffix}{dim_suffix}{array_suffix}{type_in_brackets}") } Ti::Sampler { .. } => "sampler".to_string(), - Ti::AccelerationStructure { vertex_return } => { - let caps = if vertex_return { "" } else { "" }; - format!("acceleration_structure{}", caps) - } - Ti::RayQuery { vertex_return } => { - let caps = if vertex_return { "" } else { "" }; - format!("ray_query{}", caps) - } + Ti::AccelerationStructure => "acceleration_structure".to_string(), + Ti::RayQuery => "ray_query".to_string(), Ti::BindingArray { base, size, .. } => { let member_type = &gctx.types[base]; let base = member_type.name.as_deref().unwrap_or("unknown"); @@ -209,13 +198,10 @@ impl crate::StorageFormat { } } -#[cfg(test)] mod tests { - use alloc::{string::ToString, vec}; - #[test] fn to_wgsl() { - use core::num::NonZeroU32; + use std::num::NonZeroU32; let mut types = crate::UniqueArena::new(); diff --git a/third_party/rust/naga/src/lib.rs b/third_party/rust/naga/src/lib.rs index 48156b977ebc..2e917d34e049 100644 --- a/third_party/rust/naga/src/lib.rs +++ b/third_party/rust/naga/src/lib.rs @@ -249,12 +249,6 @@ An override expression can be evaluated at pipeline creation time. clippy::todo ) )] -#![no_std] - -#[cfg(any(test, spv_out, feature = "spv-in", feature = "wgsl-in"))] -extern crate std; - -extern crate alloc; mod arena; pub mod back; @@ -271,14 +265,12 @@ pub mod proc; mod span; pub mod valid; -use alloc::{string::String, vec::Vec}; - pub use crate::arena::{Arena, Handle, Range, UniqueArena}; -pub use crate::span::{SourceLocation, Span, SpanContext, WithSpan}; -use diagnostic_filter::DiagnosticFilterNode; +pub use crate::span::{SourceLocation, Span, SpanContext, WithSpan}; #[cfg(feature = "arbitrary")] use arbitrary::Arbitrary; +use diagnostic_filter::DiagnosticFilterNode; #[cfg(feature = "deserialize")] use serde::Deserialize; #[cfg(feature = "serialize")] @@ -291,25 +283,25 @@ pub const BOOL_WIDTH: Bytes = 1; pub const ABSTRACT_WIDTH: Bytes = 8; /// Hash map that is faster but not resilient to DoS attacks. -/// (Similar to rustc_hash::FxHashMap but using hashbrown::HashMap instead of alloc::collections::HashMap.) +/// (Similar to rustc_hash::FxHashMap but using hashbrown::HashMap instead of std::collections::HashMap.) /// To construct a new instance: `FastHashMap::default()` pub type FastHashMap = - hashbrown::HashMap>; + hashbrown::HashMap>; /// Hash set that is faster but not resilient to DoS attacks. -/// (Similar to rustc_hash::FxHashSet but using hashbrown::HashSet instead of alloc::collections::HashMap.) +/// (Similar to rustc_hash::FxHashSet but using hashbrown::HashSet instead of std::collections::HashMap.) pub type FastHashSet = - hashbrown::HashSet>; + hashbrown::HashSet>; /// Insertion-order-preserving hash set (`IndexSet`), but with the same /// hasher as `FastHashSet` (faster but not resilient to DoS attacks). pub type FastIndexSet = - indexmap::IndexSet>; + indexmap::IndexSet>; /// Insertion-order-preserving hash map (`IndexMap`), but with the same /// hasher as `FastHashMap` (faster but not resilient to DoS attacks). pub type FastIndexMap = - indexmap::IndexMap>; + indexmap::IndexMap>; /// Map of expressions that have associated variable names pub(crate) type NamedExpressions = FastIndexMap, String>; @@ -519,7 +511,7 @@ pub enum PendingArraySize { #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] pub enum ArraySize { /// The array size is constant. - Constant(core::num::NonZeroU32), + Constant(std::num::NonZeroU32), /// The array size is an override-expression. Pending(PendingArraySize), /// The array size can change at runtime. @@ -847,10 +839,10 @@ pub enum TypeInner { Sampler { comparison: bool }, /// Opaque object representing an acceleration structure of geometry. - AccelerationStructure { vertex_return: bool }, + AccelerationStructure, /// Locally used handle for ray queries. - RayQuery { vertex_return: bool }, + RayQuery, /// Array of bindings. /// @@ -1379,8 +1371,6 @@ bitflags::bitflags! { const WORK_GROUP = 1 << 1; /// Barrier synchronizes execution across all invocations within a subgroup that execute this instruction. const SUB_GROUP = 1 << 2; - /// Barrier synchronizes texture memory accesses in a workgroup. - const TEXTURE = 1 << 3; } } @@ -1697,14 +1687,6 @@ pub enum Expression { /// a pointer to a structure containing a runtime array in its' last field. ArrayLength(Handle), - /// Get the Positions of the triangle hit by the [`RayQuery`] - /// - /// [`RayQuery`]: Statement::RayQuery - RayQueryVertexPositions { - query: Handle, - committed: bool, - }, - /// Result of a [`Proceed`] [`RayQuery`] statement. /// /// [`Proceed`]: RayQueryFunction::Proceed @@ -2349,11 +2331,6 @@ pub struct SpecialTypes { /// this if needed and return the handle. pub ray_intersection: Option>, - /// Type for `RayVertexReturn - /// - /// Call [`Module::generate_vertex_return_type`] - pub ray_vertex_return: Option>, - /// Types for predeclared wgsl types instantiated on demand. /// /// Call [`Module::generate_predeclared_type`] to populate this if diff --git a/third_party/rust/naga/src/non_max_u32.rs b/third_party/rust/naga/src/non_max_u32.rs index da866f738084..2ad402e497b5 100644 --- a/third_party/rust/naga/src/non_max_u32.rs +++ b/third_party/rust/naga/src/non_max_u32.rs @@ -13,10 +13,10 @@ //! within the implementation. //! //! [`Handle`]: crate::arena::Handle -//! [`NonZeroU32`]: core::num::NonZeroU32 +//! [`NonZeroU32`]: std::num::NonZeroU32 #![allow(dead_code)] -use core::num::NonZeroU32; +use std::num::NonZeroU32; /// An unsigned 32-bit value known not to be [`u32::MAX`]. /// @@ -48,7 +48,7 @@ use core::num::NonZeroU32; /// around, the value unrepresentable in `NonMaxU32`, [`u32::MAX`], becomes the /// value unrepresentable in [`NonZeroU32`], `0`.) /// -/// [`NonZeroU32`]: core::num::NonZeroU32 +/// [`NonZeroU32`]: std::num::NonZeroU32 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct NonMaxU32(NonZeroU32); @@ -97,14 +97,14 @@ impl NonMaxU32 { } } -impl core::fmt::Debug for NonMaxU32 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Debug for NonMaxU32 { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.get().fmt(f) } } -impl core::fmt::Display for NonMaxU32 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Display for NonMaxU32 { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.get().fmt(f) } } @@ -140,5 +140,6 @@ impl<'de> serde::Deserialize<'de> for NonMaxU32 { #[test] fn size() { + use core::mem::size_of; assert_eq!(size_of::>(), size_of::()); } diff --git a/third_party/rust/naga/src/proc/constant_evaluator.rs b/third_party/rust/naga/src/proc/constant_evaluator.rs index bb6893bc1f1e..684b52c565f2 100644 --- a/third_party/rust/naga/src/proc/constant_evaluator.rs +++ b/third_party/rust/naga/src/proc/constant_evaluator.rs @@ -1,10 +1,4 @@ -use alloc::{ - format, - string::{String, ToString}, - vec, - vec::Vec, -}; -use core::iter; +use std::iter; use arrayvec::ArrayVec; @@ -963,9 +957,7 @@ impl<'a> ConstantEvaluator<'a> { Expression::ImageSample { .. } | Expression::ImageLoad { .. } | Expression::ImageQuery { .. } => Err(ConstantEvaluatorError::ImageExpression), - Expression::RayQueryProceedResult - | Expression::RayQueryGetIntersection { .. } - | Expression::RayQueryVertexPositions { .. } => { + Expression::RayQueryProceedResult | Expression::RayQueryGetIntersection { .. } => { Err(ConstantEvaluatorError::RayQueryExpression) } Expression::SubgroupBallotResult => Err(ConstantEvaluatorError::SubgroupExpression), @@ -1752,7 +1744,7 @@ impl<'a> ConstantEvaluator<'a> { self.types.insert(Type { name: None, inner }, span) } }; - let mut layouter = core::mem::take(self.layouter); + let mut layouter = std::mem::take(self.layouter); layouter.update(self.to_ctx()).unwrap(); *self.layouter = layouter; @@ -2544,7 +2536,7 @@ impl TryFromAbstract for u64 { #[cfg(test)] mod tests { - use alloc::{vec, vec::Vec}; + use std::vec; use crate::{ Arena, Constant, Expression, Literal, ScalarKind, Type, TypeInner, UnaryOperator, diff --git a/third_party/rust/naga/src/proc/layouter.rs b/third_party/rust/naga/src/proc/layouter.rs index 0001d92f28b6..82b1be094a49 100644 --- a/third_party/rust/naga/src/proc/layouter.rs +++ b/third_party/rust/naga/src/proc/layouter.rs @@ -1,6 +1,5 @@ -use core::{fmt::Display, num::NonZeroU32, ops}; - use crate::arena::{Handle, HandleVec}; +use std::{fmt::Display, num::NonZeroU32, ops}; /// A newtype struct where its only valid values are powers of 2 #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] @@ -51,7 +50,7 @@ impl Alignment { } impl Display for Alignment { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.get().fmt(f) } } @@ -234,8 +233,8 @@ impl Layouter { } Ti::Image { .. } | Ti::Sampler { .. } - | Ti::AccelerationStructure { .. } - | Ti::RayQuery { .. } + | Ti::AccelerationStructure + | Ti::RayQuery | Ti::BindingArray { .. } => TypeLayout { size, alignment: Alignment::ONE, diff --git a/third_party/rust/naga/src/proc/mod.rs b/third_party/rust/naga/src/proc/mod.rs index 0ba561027f86..a6a19f70eda3 100644 --- a/third_party/rust/naga/src/proc/mod.rs +++ b/third_party/rust/naga/src/proc/mod.rs @@ -527,7 +527,7 @@ pub fn flatten_compose<'arenas>( return subcomponents; } } - core::slice::from_ref(component) + std::slice::from_ref(component) } /// Flatten `Splat` expressions if `is_vector` is true. @@ -544,7 +544,7 @@ pub fn flatten_compose<'arenas>( count = size as usize; } } - core::iter::repeat(expr).take(count) + std::iter::repeat(expr).take(count) } // Expressions like `vec4(vec3(vec2(6, 7), 8), 9)` require us to diff --git a/third_party/rust/naga/src/proc/namer.rs b/third_party/rust/naga/src/proc/namer.rs index 53bb39ecabb1..8afacb593df8 100644 --- a/third_party/rust/naga/src/proc/namer.rs +++ b/third_party/rust/naga/src/proc/namer.rs @@ -1,12 +1,6 @@ -use alloc::{ - borrow::Cow, - format, - string::{String, ToString}, - vec::Vec, -}; -use core::hash::{Hash, Hasher}; - use crate::{arena::Handle, FastHashMap, FastHashSet}; +use std::borrow::Cow; +use std::hash::{Hash, Hasher}; pub type EntryPointIndex = u16; const SEPARATOR: char = '_'; @@ -98,7 +92,7 @@ impl Namer { /// Guarantee uniqueness by applying a numeric suffix when necessary. If `label_raw` /// itself ends with digits, separate them from the suffix with an underscore. pub fn call(&mut self, label_raw: &str) -> String { - use core::fmt::Write as _; // for write!-ing to Strings + use std::fmt::Write as _; // for write!-ing to Strings let base = self.sanitize(label_raw); debug_assert!(!base.is_empty() && !base.ends_with(SEPARATOR)); @@ -149,7 +143,7 @@ impl Namer { /// context for the duration of the call to `body`. fn namespace(&mut self, capacity: usize, body: impl FnOnce(&mut Self)) { let fresh = FastHashMap::with_capacity_and_hasher(capacity, Default::default()); - let outer = core::mem::replace(&mut self.unique, fresh); + let outer = std::mem::replace(&mut self.unique, fresh); body(self); self.unique = outer; } @@ -181,38 +175,10 @@ impl Namer { .map(|string| (AsciiUniCase(*string))), ); - // Choose fallback names for anonymous entry point return types. - let mut entrypoint_type_fallbacks = FastHashMap::default(); - for ep in &module.entry_points { - if let Some(ref result) = ep.function.result { - if let crate::Type { - name: None, - inner: crate::TypeInner::Struct { .. }, - } = module.types[result.ty] - { - let label = match ep.stage { - crate::ShaderStage::Vertex => "VertexOutput", - crate::ShaderStage::Fragment => "FragmentOutput", - crate::ShaderStage::Compute => "ComputeOutput", - }; - entrypoint_type_fallbacks.insert(result.ty, label); - } - } - } - let mut temp = String::new(); for (ty_handle, ty) in module.types.iter() { - // If the type is anonymous, check `entrypoint_types` for - // something better than just `"type"`. - let raw_label = match ty.name { - Some(ref given_name) => given_name.as_str(), - None => entrypoint_type_fallbacks - .get(&ty_handle) - .cloned() - .unwrap_or("type"), - }; - let ty_name = self.call(raw_label); + let ty_name = self.call_or(&ty.name, "type"); output.insert(NameKey::Type(ty_handle), ty_name); if let crate::TypeInner::Struct { ref members, .. } = ty.inner { @@ -264,7 +230,7 @@ impl Namer { let label = match constant.name { Some(ref name) => name, None => { - use core::fmt::Write; + use std::fmt::Write; // Try to be more descriptive about the constant values temp.clear(); write!(temp, "const_{}", output[&NameKey::Type(constant.ty)]).unwrap(); diff --git a/third_party/rust/naga/src/proc/type_methods.rs b/third_party/rust/naga/src/proc/type_methods.rs index 3b9e9348a9bf..d73b6df10f8b 100644 --- a/third_party/rust/naga/src/proc/type_methods.rs +++ b/third_party/rust/naga/src/proc/type_methods.rs @@ -164,8 +164,8 @@ impl crate::TypeInner { Self::Struct { span, .. } => span, Self::Image { .. } | Self::Sampler { .. } - | Self::AccelerationStructure { .. } - | Self::RayQuery { .. } + | Self::AccelerationStructure + | Self::RayQuery | Self::BindingArray { .. } => 0, } } @@ -276,8 +276,8 @@ impl crate::TypeInner { | crate::TypeInner::Struct { .. } | crate::TypeInner::Image { .. } | crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } - | crate::TypeInner::RayQuery { .. } + | crate::TypeInner::AccelerationStructure + | crate::TypeInner::RayQuery | crate::TypeInner::BindingArray { .. } => None, } } @@ -298,8 +298,8 @@ impl crate::TypeInner { | crate::TypeInner::Struct { .. } | crate::TypeInner::Image { .. } | crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } - | crate::TypeInner::RayQuery { .. } + | crate::TypeInner::AccelerationStructure + | crate::TypeInner::RayQuery | crate::TypeInner::BindingArray { .. } => false, } } diff --git a/third_party/rust/naga/src/proc/typifier.rs b/third_party/rust/naga/src/proc/typifier.rs index 2f189eb8b7aa..135928990060 100644 --- a/third_party/rust/naga/src/proc/typifier.rs +++ b/third_party/rust/naga/src/proc/typifier.rs @@ -1,9 +1,7 @@ -use alloc::{format, string::String}; +use crate::arena::{Arena, Handle, UniqueArena}; use thiserror::Error; -use crate::arena::{Arena, Handle, UniqueArena}; - /// The result of computing an expression's type. /// /// This is the (Rust) type returned by [`ResolveContext::resolve`] to represent @@ -149,7 +147,6 @@ impl Clone for TypeResolution { scalar, space, }, - Ti::Array { base, size, stride } => Ti::Array { base, size, stride }, _ => unreachable!("Unexpected clone type: {:?}", v), }), } @@ -901,13 +898,6 @@ impl<'a> ResolveContext<'a> { .ok_or(ResolveError::MissingSpecialType)?; TypeResolution::Handle(result) } - crate::Expression::RayQueryVertexPositions { .. } => { - let result = self - .special_types - .ray_vertex_return - .ok_or(ResolveError::MissingSpecialType)?; - TypeResolution::Handle(result) - } crate::Expression::SubgroupBallotResult => TypeResolution::Value(Ti::Vector { scalar: crate::Scalar::U32, size: crate::VectorSize::Quad, @@ -918,5 +908,6 @@ impl<'a> ResolveContext<'a> { #[test] fn test_error_size() { + use std::mem::size_of; assert_eq!(size_of::(), 32); } diff --git a/third_party/rust/naga/src/span.rs b/third_party/rust/naga/src/span.rs index fbc2de633d5b..0256e19dc482 100644 --- a/third_party/rust/naga/src/span.rs +++ b/third_party/rust/naga/src/span.rs @@ -1,12 +1,5 @@ -use alloc::{ - borrow::ToOwned, - format, - string::{String, ToString}, - vec::Vec, -}; -use core::{error::Error, fmt, ops::Range}; - use crate::{Arena, Handle, UniqueArena}; +use std::{error::Error, fmt, ops::Range}; /// A source code span, used for error reporting. #[derive(Clone, Copy, Debug, PartialEq, Default)] @@ -101,7 +94,7 @@ impl From> for Span { } } -impl core::ops::Index for str { +impl std::ops::Index for str { type Output = str; #[inline] @@ -366,7 +359,7 @@ pub(crate) trait SpanProvider { x if !x.is_defined() => (Default::default(), "".to_string()), known => ( known, - format!("{} {:?}", core::any::type_name::(), handle), + format!("{} {:?}", std::any::type_name::(), handle), ), } } diff --git a/third_party/rust/naga/src/valid/analyzer.rs b/third_party/rust/naga/src/valid/analyzer.rs index 5a3d6ebc34b3..c666abfaf2de 100644 --- a/third_party/rust/naga/src/valid/analyzer.rs +++ b/third_party/rust/naga/src/valid/analyzer.rs @@ -5,9 +5,6 @@ //! - texture/sampler pairs //! - expression reference counts -use alloc::{boxed::Box, vec}; -use core::ops; - use super::{ExpressionError, FunctionError, ModuleInfo, ShaderStages, ValidationFlags}; use crate::diagnostic_filter::{DiagnosticFilterNode, StandardFilterableTriggeringRule}; use crate::span::{AddSpan as _, WithSpan}; @@ -15,6 +12,7 @@ use crate::{ arena::{Arena, Handle}, proc::{ResolveContext, TypeResolution}, }; +use std::ops; pub type NonUniformResult = Option>; @@ -263,7 +261,7 @@ pub struct FunctionInfo { /// How this function and its callees use this module's globals. /// /// This is indexed by `Handle` indices. However, - /// `FunctionInfo` implements `core::ops::Index>`, + /// `FunctionInfo` implements `std::ops::Index>`, /// so you can simply index this struct with a global handle to retrieve /// its usage information. global_uses: Box<[GlobalUse]>, @@ -271,7 +269,7 @@ pub struct FunctionInfo { /// Information about each expression in this function's body. /// /// This is indexed by `Handle` indices. However, `FunctionInfo` - /// implements `core::ops::Index>`, so you can simply + /// implements `std::ops::Index>`, so you can simply /// index this struct with an expression handle to retrieve its /// `ExpressionInfo`. expressions: Box<[ExpressionInfo]>, @@ -809,13 +807,6 @@ impl FunctionInfo { non_uniform_result: Some(handle), requirements: UniformityRequirements::empty(), }, - E::RayQueryVertexPositions { - query, - committed: _, - } => Uniformity { - non_uniform_result: self.add_ref(query), - requirements: UniformityRequirements::empty(), - }, }; let ty = resolve_context.resolve(expression, |h| Ok(&self[h].ty))?; diff --git a/third_party/rust/naga/src/valid/compose.rs b/third_party/rust/naga/src/valid/compose.rs index 13d9bf38ffed..c21e98c6f2a3 100644 --- a/third_party/rust/naga/src/valid/compose.rs +++ b/third_party/rust/naga/src/valid/compose.rs @@ -1,6 +1,7 @@ -use crate::arena::Handle; use crate::proc::TypeResolution; +use crate::arena::Handle; + #[derive(Clone, Debug, thiserror::Error)] #[cfg_attr(test, derive(PartialEq))] pub enum ComposeError { diff --git a/third_party/rust/naga/src/valid/expression.rs b/third_party/rust/naga/src/valid/expression.rs index 49b2fd27b2d4..4769b51a7d4e 100644 --- a/third_party/rust/naga/src/valid/expression.rs +++ b/third_party/rust/naga/src/valid/expression.rs @@ -1,5 +1,6 @@ use super::{compose::validate_compose, FunctionInfo, ModuleInfo, ShaderStages, TypeFlags}; use crate::arena::UniqueArena; + use crate::{ arena::Handle, proc::{IndexableLengthError, ResolveError}, @@ -176,7 +177,7 @@ struct ExpressionTypeResolver<'a> { info: &'a FunctionInfo, } -impl core::ops::Index> for ExpressionTypeResolver<'_> { +impl std::ops::Index> for ExpressionTypeResolver<'_> { type Output = crate::TypeInner; #[allow(clippy::panic)] @@ -1726,28 +1727,7 @@ impl super::Validator { base, space: crate::AddressSpace::Function, } => match resolver.types[base].inner { - Ti::RayQuery { .. } => ShaderStages::all(), - ref other => { - log::error!("Intersection result of a pointer to {:?}", other); - return Err(ExpressionError::InvalidRayQueryType(query)); - } - }, - ref other => { - log::error!("Intersection result of {:?}", other); - return Err(ExpressionError::InvalidRayQueryType(query)); - } - }, - E::RayQueryVertexPositions { - query, - committed: _, - } => match resolver[query] { - Ti::Pointer { - base, - space: crate::AddressSpace::Function, - } => match resolver.types[base].inner { - Ti::RayQuery { - vertex_return: true, - } => ShaderStages::all(), + Ti::RayQuery => ShaderStages::all(), ref other => { log::error!("Intersection result of a pointer to {:?}", other); return Err(ExpressionError::InvalidRayQueryType(query)); diff --git a/third_party/rust/naga/src/valid/function.rs b/third_party/rust/naga/src/valid/function.rs index b6ff92bbdcb4..eb74ca237b4a 100644 --- a/third_party/rust/naga/src/valid/function.rs +++ b/third_party/rust/naga/src/valid/function.rs @@ -1,12 +1,12 @@ -use alloc::{format, string::String}; +use crate::arena::{Arena, UniqueArena}; +use crate::arena::{Handle, HandleSet}; use super::validate_atomic_compare_exchange_struct; + use super::{ analyzer::{UniformityDisruptor, UniformityRequirements}, ExpressionError, FunctionInfo, ModuleInfo, }; -use crate::arena::{Arena, UniqueArena}; -use crate::arena::{Handle, HandleSet}; use crate::span::WithSpan; use crate::span::{AddSpan as _, MapErrWithSpan as _}; @@ -173,12 +173,6 @@ pub enum FunctionError { InvalidRayQueryExpression(Handle), #[error("Acceleration structure {0:?} is not a matching expression")] InvalidAccelerationStructure(Handle), - #[error( - "Acceleration structure {0:?} is missing flag vertex_return while Ray Query {1:?} does" - )] - MissingAccelerationStructureVertexReturn(Handle, Handle), - #[error("Ray Query {0:?} is missing flag vertex_return")] - MissingRayQueryVertexReturn(Handle), #[error("Ray descriptor {0:?} is not a matching expression")] InvalidRayDescriptor(Handle), #[error("Ray Query {0:?} does not have a matching type")] @@ -771,8 +765,7 @@ impl super::Validator { | Ex::Math { .. } | Ex::As { .. } | Ex::ArrayLength(_) - | Ex::RayQueryGetIntersection { .. } - | Ex::RayQueryVertexPositions { .. } => { + | Ex::RayQueryGetIntersection { .. } => { self.emit_expression(handle, context)? } Ex::CallResult(_) @@ -1147,10 +1140,10 @@ impl super::Validator { }; // The `coordinate` operand must be a vector of the appropriate size. - if context + if !context .resolve_type(coordinate, &self.valid_expression_set)? .image_storage_coordinates() - .is_none_or(|coord_dim| coord_dim != dim) + .is_some_and(|coord_dim| coord_dim == dim) { return Err(FunctionError::InvalidImageStore( ExpressionError::InvalidImageCoordinateType(dim, coordinate), @@ -1458,14 +1451,14 @@ impl super::Validator { .with_span_static(span, "invalid query expression")); } }; - let rq_vertex_return = match context.types[query_var.ty].inner { - Ti::RayQuery { vertex_return } => vertex_return, + match context.types[query_var.ty].inner { + Ti::RayQuery => {} ref other => { log::error!("Unexpected ray query type {other:?}"); return Err(FunctionError::InvalidRayQueryType(query_var.ty) .with_span_static(span, "invalid query type")); } - }; + } match *fun { crate::RayQueryFunction::Initialize { acceleration_structure, @@ -1474,11 +1467,7 @@ impl super::Validator { match *context .resolve_type(acceleration_structure, &self.valid_expression_set)? { - Ti::AccelerationStructure { vertex_return } => { - if (!vertex_return) && rq_vertex_return { - return Err(FunctionError::MissingAccelerationStructureVertexReturn(acceleration_structure, query).with_span_static(span, "invalid acceleration structure")); - } - } + Ti::AccelerationStructure => {} _ => { return Err(FunctionError::InvalidAccelerationStructure( acceleration_structure, diff --git a/third_party/rust/naga/src/valid/handles.rs b/third_party/rust/naga/src/valid/handles.rs index 93265e17a047..5affa9bff2f3 100644 --- a/third_party/rust/naga/src/valid/handles.rs +++ b/third_party/rust/naga/src/valid/handles.rs @@ -1,18 +1,17 @@ //! Implementation of `Validator::validate_module_handles`. -use core::{convert::TryInto, hash::Hash}; - -use super::ValidationError; -use crate::non_max_u32::NonMaxU32; use crate::{ arena::{BadHandle, BadRangeError}, diagnostic_filter::DiagnosticFilterNode, Handle, }; + +use crate::non_max_u32::NonMaxU32; use crate::{Arena, UniqueArena}; -#[cfg(test)] -use alloc::string::ToString; +use super::ValidationError; + +use std::{convert::TryInto, hash::Hash}; impl super::Validator { /// Validates that all handles within `module` are: @@ -246,9 +245,6 @@ impl super::Validator { if let Some(ty) = special_types.ray_intersection { validate_type(ty)?; } - if let Some(ty) = special_types.ray_vertex_return { - validate_type(ty)?; - } for (handle, _node) in diagnostic_filters.iter() { let DiagnosticFilterNode { inner: _, parent } = diagnostic_filters[handle]; @@ -313,8 +309,8 @@ impl super::Validator { | crate::TypeInner::Atomic { .. } | crate::TypeInner::Image { .. } | crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } - | crate::TypeInner::RayQuery { .. } => None, + | crate::TypeInner::AccelerationStructure + | crate::TypeInner::RayQuery => None, crate::TypeInner::Pointer { base, space: _ } => { handle.check_dep(base)?; None @@ -562,10 +558,6 @@ impl super::Validator { crate::Expression::RayQueryGetIntersection { query, committed: _, - } - | crate::Expression::RayQueryVertexPositions { - query, - committed: _, } => { handle.check_dep(query)?; } @@ -846,9 +838,9 @@ impl Handle { }; Err(FwdDepError { subject: erase_handle_type(self), - subject_kind: core::any::type_name::(), + subject_kind: std::any::type_name::(), depends_on: erase_handle_type(depends_on), - depends_on_kind: core::any::type_name::(), + depends_on_kind: std::any::type_name::(), }) } } diff --git a/third_party/rust/naga/src/valid/interface.rs b/third_party/rust/naga/src/valid/interface.rs index d182d9575a4e..a6fff61d826a 100644 --- a/third_party/rust/naga/src/valid/interface.rs +++ b/third_party/rust/naga/src/valid/interface.rs @@ -1,13 +1,11 @@ -use alloc::vec::Vec; - -use bit_set::BitSet; - use super::{ analyzer::{FunctionInfo, GlobalUse}, Capabilities, Disalignment, FunctionError, ModuleInfo, }; use crate::arena::{Handle, UniqueArena}; + use crate::span::{AddSpan as _, MapErrWithSpan as _, SpanProvider as _, WithSpan}; +use bit_set::BitSet; const MAX_WORKGROUP_SIZE: u32 = 0x4000; @@ -551,8 +549,8 @@ impl super::Validator { _ => {} }, crate::TypeInner::Sampler { .. } - | crate::TypeInner::AccelerationStructure { .. } - | crate::TypeInner::RayQuery { .. } => {} + | crate::TypeInner::AccelerationStructure + | crate::TypeInner::RayQuery => {} _ => { return Err(GlobalVariableError::InvalidType(var.space)); } diff --git a/third_party/rust/naga/src/valid/mod.rs b/third_party/rust/naga/src/valid/mod.rs index e7a50d928d44..8560404703a3 100644 --- a/third_party/rust/naga/src/valid/mod.rs +++ b/third_party/rust/naga/src/valid/mod.rs @@ -10,16 +10,13 @@ mod handles; mod interface; mod r#type; -use alloc::{boxed::Box, string::String, vec, vec::Vec}; -use core::ops; - -use bit_set::BitSet; - use crate::{ arena::{Handle, HandleSet}, proc::{ExpressionKindTracker, LayoutError, Layouter, TypeResolution}, FastHashSet, }; +use bit_set::BitSet; +use std::ops; //TODO: analyze the model at the same time as we validate it, // merge the corresponding matches over expressions and statements. @@ -161,8 +158,6 @@ bitflags::bitflags! { const TEXTURE_ATOMIC = 1 << 23; /// Support for atomic operations on 64-bit images. const TEXTURE_INT64_ATOMIC = 1 << 24; - /// Support for ray queries returning vertex position - const RAY_HIT_VERTEX_POSITION = 1 << 25; } } @@ -405,8 +400,8 @@ impl crate::TypeInner { Self::Array { .. } | Self::Image { .. } | Self::Sampler { .. } - | Self::AccelerationStructure { .. } - | Self::RayQuery { .. } + | Self::AccelerationStructure + | Self::RayQuery | Self::BindingArray { .. } => false, } } diff --git a/third_party/rust/naga/src/valid/type.rs b/third_party/rust/naga/src/valid/type.rs index 5863eb813f41..8c6825b842e9 100644 --- a/third_party/rust/naga/src/valid/type.rs +++ b/third_party/rust/naga/src/valid/type.rs @@ -1,5 +1,3 @@ -use alloc::string::String; - use super::Capabilities; use crate::{arena::Handle, proc::Alignment}; @@ -704,21 +702,15 @@ impl super::Validator { TypeFlags::ARGUMENT | TypeFlags::CREATION_RESOLVED, Alignment::ONE, ), - Ti::AccelerationStructure { vertex_return } => { + Ti::AccelerationStructure => { self.require_type_capability(Capabilities::RAY_QUERY)?; - if vertex_return { - self.require_type_capability(Capabilities::RAY_HIT_VERTEX_POSITION)?; - } TypeInfo::new( TypeFlags::ARGUMENT | TypeFlags::CREATION_RESOLVED, Alignment::ONE, ) } - Ti::RayQuery { vertex_return } => { + Ti::RayQuery => { self.require_type_capability(Capabilities::RAY_QUERY)?; - if vertex_return { - self.require_type_capability(Capabilities::RAY_HIT_VERTEX_POSITION)?; - } TypeInfo::new( TypeFlags::DATA | TypeFlags::CONSTRUCTIBLE diff --git a/third_party/rust/wgpu-core/.cargo-checksum.json b/third_party/rust/wgpu-core/.cargo-checksum.json index d9e3b5786f4e..2f66b4652f06 100644 --- a/third_party/rust/wgpu-core/.cargo-checksum.json +++ b/third_party/rust/wgpu-core/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"df9c4e07eaaf5e78590d2c1b8b14545311ffda3fddbddf7ea7973a024c03da27","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","build.rs":"d1b16b11773c58612398a008f93e2faa12ada843afc01db3a7559945b43d9bd9","src/binding_model.rs":"250c0071fd6b4e7adf923670c7b42824734bd29668ed17af39ad1dfb909fa688","src/command/allocator.rs":"386cb6e60bd332a881dbbe57ff66a0fa83f35e3ee924559f1689418ac6c7273a","src/command/bind.rs":"71b86e0db5cfaa2b0a4b849320173135893e90d63763c3002a60dcc8fc415a89","src/command/bundle.rs":"cee52e3bce74497b06c733d5c78d39b315124085cd203b0452d52d51d00fc873","src/command/clear.rs":"4522488370bd90b5264e1ddfcacd6d8c48256b5305fa89403e518401ec6970e3","src/command/compute.rs":"ceb91f4922d6b9bde7ac1e4c74ba3880e5efc6f13a9c905aa8c4f8116beda24d","src/command/compute_command.rs":"18aa0b8e389a5d345243b876b1abbacfc998a19d23069e092183fa7be10fa0ab","src/command/draw.rs":"fe23039c3918eb4e61b9c1ac12715eee448277bb4d3537caa4f11287c04687af","src/command/memory_init.rs":"f25554cff06f96e37afd81153a351e9d8482c855318b86b4db29231926d265b5","src/command/mod.rs":"b02acf1aac4d35b31ae643da2f4a367a94bdf5f513b07169918e8a926bba79ce","src/command/query.rs":"0f6e1ead307465318977a6f3c09a3b902b9e59f7a38fcb08db421c5eab57f068","src/command/ray_tracing.rs":"d29e9afe9f7285c9a553d91596ce976c2f4bcd033188c98567fb325e6c6d4307","src/command/render.rs":"6eda7f40fcf2332a30f1fdf361d3cf51d9d3350509300c9f030738ae181ddca4","src/command/render_command.rs":"f216e42d27a6bef9d2e024881f978a11411d07bf2d771262ba79fb1c1e2842d8","src/command/timestamp_writes.rs":"da06fb07b8d0917be3e7fb9212d0ffc6b16526e1c1df617213ef354c3e1fb446","src/command/transfer.rs":"cbc0cbbeaf7f59913ca72cb01bebcd5987674b1b0e58022fba207afde9342547","src/command/transition_resources.rs":"1824f6155047af4b19aeceaa72ac53f1289270eb2732c9f7f3574d806d62f206","src/conv.rs":"e922723428b0ebd774dd52704838a20085b87b8b44ee666485abdce3a9f07fac","src/device/bgl.rs":"fcb1d53b692970912781748379df675268981c97352872abf2e7bb0b1ebdd533","src/device/global.rs":"845fcab531a92eaebdfdc6f71a42fdb81c2884aafe1818c43601e7982f3e3fb0","src/device/life.rs":"bc1899dbf8d2b0389cba39775cc47d5dd0e2ae3a250b5e9db3dd79d613e4fd18","src/device/mod.rs":"7e339cb67c373a230852e2f0758b1fcea11b3eaf7215acd2f41c30afb1917b1f","src/device/queue.rs":"0c4697c841f351355246b99931ec9b7d1836a1ed946f885942dbb5954b60d981","src/device/ray_tracing.rs":"72dab8c0998ef92cad3a0a8ba62675dbdee2feb2044a78079510f9ab1c2a9742","src/device/resource.rs":"d3429696e15e34034e96aa0c7109d5b684b7e7e7508860fbfcb6fb339f17ccb2","src/device/trace.rs":"f0b37f2bebc77c98db3ed047cd4a91fff2ffc2b790b98dd313910be0c237bddd","src/error.rs":"4f07a0b09b30b2d6cbc855d0091d724000f492018af3b41e80befbeccf2a6f4e","src/global.rs":"1c787c8f0491078686caada234a860d7bb16027609738536a9e213a6d0098648","src/hal_api.rs":"7962c119456602e9c2ba958712660532290cabe0b8c4c67ef7595de73cdf8b57","src/hash_utils.rs":"9f57a627fe3f00659391670141df62f68d67922c7b186f2a9a5958ab16fb576f","src/hub.rs":"ce0a14d5a3314df318bbc7c4d8c40ea2b3197dbddb2227e828ceb5127db7d37d","src/id.rs":"207f262558388147b484c51cf07d2554c26a3e19243058939e63a7f8e5c7ea75","src/identity.rs":"0a92302fc5b483ea1a8750b1672971af1cf2abfd4c0325bb02488b43e85073e2","src/indirect_validation.rs":"b41c76f41766dcc4b997e37df3291b10ae8acfe3e9eb5156aaf6cac964ba5f04","src/init_tracker/buffer.rs":"6167a400ab271ba857f1c507e60a46fbd318c185aff87eecf7eb05f7f09b6963","src/init_tracker/mod.rs":"3895c4a2284631b6d6247c0d96c5fc9cfd024d358e09cad8752b2505700138a3","src/init_tracker/texture.rs":"83e3769b21ee7b784f71f638a525bf25daf91da23fee1f807af739cf89c88391","src/instance.rs":"1cbbcc6002946f39e669b610a179bc435b80c6d1511fa9cc1a6151dd74562c39","src/lib.rs":"4902abe167b4c58b268d57a6ae9e15a0f2f35f56535e259780e82c0e217ab785","src/lock/mod.rs":"c58ae08a8e6108432d9e14e7d8b7bd15af7bb5e98bf700d6bd9a469b80a38b11","src/lock/observing.rs":"acc4fba523512066a519b95cf1f7846fda08a9d76e1ce65168aac8b21b67d1b6","src/lock/rank.rs":"8cf08cd720bac88c06bd8b0fe11f35175546c3e52c75a0163ddeded6fb383923","src/lock/ranked.rs":"7f44776bc7d71a25e23c97ab80e2fdab3576bb3f912bc8a0b4fcc28a64ef5c6e","src/lock/vanilla.rs":"713c4f8408b60779bb32377aca6fb7fd1241456057ebcf01f7602f52397a7cbe","src/pipeline.rs":"e6d57bb5aca82dc389214899066c6fd644dbae63b89df8c36e92471bc52d4ff1","src/pipeline_cache.rs":"ada909b8d80de15687963559eb04936181d6b50d5ec1ea50a2188721748da4ed","src/pool.rs":"e11bfdc73a66321d26715465fa74657dcd26a9b856b80b8369b4aac2132a4295","src/present.rs":"165c9e0f81c87e6b5c0500915e8f9db0448208a953d2e9468bd270ed2f2948ce","src/ray_tracing.rs":"ba6e9c78e26e28821582b996e2b19aa751f03dea6a84336788e5e31aaeefef8b","src/registry.rs":"779d8c277193537edd2b883b72cdcc07161b7231c8d2c80be726bd800cd327b6","src/resource.rs":"a0110c6e82b5e7bbfb44f4ac55a02237d137829a73f7842fe8dc71ef54fe7dcd","src/scratch.rs":"05f2032fa6d6f589c2507f4028755769b9524029e5ad59cc500cab7940e40d42","src/snatch.rs":"68ce9e096f649b50f2856e1407ed5945c15cdba29761f8395a1f09e5aee209a3","src/storage.rs":"2ea3695b77ea540fee05149650005043fcc0abb3eb405738b5dea53efa60903d","src/track/buffer.rs":"1ab5310367606fc74f0791733ea5ba2e09acc92ff7f4f4773f66bcfb3138c52f","src/track/metadata.rs":"04b8bcf8ded7c7c805d9336cfc874da9d8de7d12d99f7525f0540780a1dffc45","src/track/mod.rs":"6af2b831b3a0c91a60a8fd6f141db67695218e0af1735a31b9dee39053703b27","src/track/range.rs":"2688b05a0c6e8510ff6ba3a9623e8b83f433a05ba743129928c56c93d9a9c233","src/track/stateless.rs":"3db699f5f48a319fa07fb16cdf51e1623d6ecac7a476467ee366e014ea665b89","src/track/texture.rs":"fbd5f3cde5161404048131dbea014806cfc210ab1497bfd638f0064969c004f9","src/validation.rs":"a77c592a8de2419a697b06938c9e06bae86a5755fd7b6056be093d8aec474922","src/weak_vec.rs":"a4193add5912b91226a3155cc613365b7fafdf2e7929d21d68bc19d149696e85"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"a67ceea75e8e2a08f78c8761ce91ef9fcd575366feb4df5ee59b2f6ea6781873","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","build.rs":"d1b16b11773c58612398a008f93e2faa12ada843afc01db3a7559945b43d9bd9","src/binding_model.rs":"66065c3e8b57543892764a5b9e4b7759d169dd6f306832e4d731cd5227b76fa5","src/command/allocator.rs":"386cb6e60bd332a881dbbe57ff66a0fa83f35e3ee924559f1689418ac6c7273a","src/command/bind.rs":"71b86e0db5cfaa2b0a4b849320173135893e90d63763c3002a60dcc8fc415a89","src/command/bundle.rs":"4505b036b602302afcdf9ffbcf111ee396612d15758b919276e91a3278b5db64","src/command/clear.rs":"4522488370bd90b5264e1ddfcacd6d8c48256b5305fa89403e518401ec6970e3","src/command/compute.rs":"5f9748cff962b3602ecffa8a0b5ea96d9455a403392d9cd9cd2cc79a2a175708","src/command/compute_command.rs":"18aa0b8e389a5d345243b876b1abbacfc998a19d23069e092183fa7be10fa0ab","src/command/draw.rs":"fe23039c3918eb4e61b9c1ac12715eee448277bb4d3537caa4f11287c04687af","src/command/memory_init.rs":"f25554cff06f96e37afd81153a351e9d8482c855318b86b4db29231926d265b5","src/command/mod.rs":"b02acf1aac4d35b31ae643da2f4a367a94bdf5f513b07169918e8a926bba79ce","src/command/query.rs":"0f6e1ead307465318977a6f3c09a3b902b9e59f7a38fcb08db421c5eab57f068","src/command/ray_tracing.rs":"3ab138c1f2599cc687c316d3d0db61b240a63098f99199ef205f654605afcf1b","src/command/render.rs":"dd948ca985c3f7bff09cb752fc60edf60caa7fd7a28d0358a9bb0e0a12836cb7","src/command/render_command.rs":"f216e42d27a6bef9d2e024881f978a11411d07bf2d771262ba79fb1c1e2842d8","src/command/timestamp_writes.rs":"da06fb07b8d0917be3e7fb9212d0ffc6b16526e1c1df617213ef354c3e1fb446","src/command/transfer.rs":"cbc0cbbeaf7f59913ca72cb01bebcd5987674b1b0e58022fba207afde9342547","src/command/transition_resources.rs":"1824f6155047af4b19aeceaa72ac53f1289270eb2732c9f7f3574d806d62f206","src/conv.rs":"e922723428b0ebd774dd52704838a20085b87b8b44ee666485abdce3a9f07fac","src/device/bgl.rs":"fcb1d53b692970912781748379df675268981c97352872abf2e7bb0b1ebdd533","src/device/global.rs":"845fcab531a92eaebdfdc6f71a42fdb81c2884aafe1818c43601e7982f3e3fb0","src/device/life.rs":"bc1899dbf8d2b0389cba39775cc47d5dd0e2ae3a250b5e9db3dd79d613e4fd18","src/device/mod.rs":"e5d9a7f1af8ca840289495b8774640fce6f0931cfcc3794ebf57bb8440213ad3","src/device/queue.rs":"0c4697c841f351355246b99931ec9b7d1836a1ed946f885942dbb5954b60d981","src/device/ray_tracing.rs":"ac72925fd9b9119e0f0b99c859714a5f2d3553df0dd2b27d00ece87732072e18","src/device/resource.rs":"4997b431f4ef2da4ed6dfeaab577b8134822a41fa556af9b6f605c2b666f1c17","src/device/trace.rs":"f0b37f2bebc77c98db3ed047cd4a91fff2ffc2b790b98dd313910be0c237bddd","src/error.rs":"e2bedec8e0357f95478ca9468aa84a9fa19ce75b5e71a0ac9506d53520ebd294","src/global.rs":"1c787c8f0491078686caada234a860d7bb16027609738536a9e213a6d0098648","src/hal_api.rs":"7962c119456602e9c2ba958712660532290cabe0b8c4c67ef7595de73cdf8b57","src/hash_utils.rs":"9f57a627fe3f00659391670141df62f68d67922c7b186f2a9a5958ab16fb576f","src/hub.rs":"ce0a14d5a3314df318bbc7c4d8c40ea2b3197dbddb2227e828ceb5127db7d37d","src/id.rs":"142feebe19f356af18e46970730ca0913593fcb440f289db31aa9f61220502bc","src/identity.rs":"0a92302fc5b483ea1a8750b1672971af1cf2abfd4c0325bb02488b43e85073e2","src/indirect_validation.rs":"057d1c9b8c323c1e248358fba57d905c70c8612f76930d1592ebae595e351026","src/init_tracker/buffer.rs":"6167a400ab271ba857f1c507e60a46fbd318c185aff87eecf7eb05f7f09b6963","src/init_tracker/mod.rs":"3895c4a2284631b6d6247c0d96c5fc9cfd024d358e09cad8752b2505700138a3","src/init_tracker/texture.rs":"83e3769b21ee7b784f71f638a525bf25daf91da23fee1f807af739cf89c88391","src/instance.rs":"9b7f6d15c22ff8128f111fa3528297653ce9115f9c14f206045721ae8a36deb5","src/lib.rs":"16b86a1549142c59309ec350552c6f420a2c776ad6a2bee1bbd69929fc747b16","src/lock/mod.rs":"c58ae08a8e6108432d9e14e7d8b7bd15af7bb5e98bf700d6bd9a469b80a38b11","src/lock/observing.rs":"acc4fba523512066a519b95cf1f7846fda08a9d76e1ce65168aac8b21b67d1b6","src/lock/rank.rs":"8cf08cd720bac88c06bd8b0fe11f35175546c3e52c75a0163ddeded6fb383923","src/lock/ranked.rs":"7f44776bc7d71a25e23c97ab80e2fdab3576bb3f912bc8a0b4fcc28a64ef5c6e","src/lock/vanilla.rs":"713c4f8408b60779bb32377aca6fb7fd1241456057ebcf01f7602f52397a7cbe","src/pipeline.rs":"e6d57bb5aca82dc389214899066c6fd644dbae63b89df8c36e92471bc52d4ff1","src/pipeline_cache.rs":"4d5d823e2be797ef5573b9a4d0f9888fbbb2d9b83ab3a6c4731eb38c563b9af9","src/pool.rs":"e11bfdc73a66321d26715465fa74657dcd26a9b856b80b8369b4aac2132a4295","src/present.rs":"165c9e0f81c87e6b5c0500915e8f9db0448208a953d2e9468bd270ed2f2948ce","src/ray_tracing.rs":"d18ee884098bf7b3eb290a596c81f01d2e5b8219c0e7cb8c9665bc7706734390","src/registry.rs":"4eb33818f22825afa05814160289a8498e2cd04036b6e08e507d40908c498499","src/resource.rs":"a0110c6e82b5e7bbfb44f4ac55a02237d137829a73f7842fe8dc71ef54fe7dcd","src/scratch.rs":"05f2032fa6d6f589c2507f4028755769b9524029e5ad59cc500cab7940e40d42","src/snatch.rs":"68ce9e096f649b50f2856e1407ed5945c15cdba29761f8395a1f09e5aee209a3","src/storage.rs":"2ea3695b77ea540fee05149650005043fcc0abb3eb405738b5dea53efa60903d","src/track/buffer.rs":"1ab5310367606fc74f0791733ea5ba2e09acc92ff7f4f4773f66bcfb3138c52f","src/track/metadata.rs":"04b8bcf8ded7c7c805d9336cfc874da9d8de7d12d99f7525f0540780a1dffc45","src/track/mod.rs":"6af2b831b3a0c91a60a8fd6f141db67695218e0af1735a31b9dee39053703b27","src/track/range.rs":"2688b05a0c6e8510ff6ba3a9623e8b83f433a05ba743129928c56c93d9a9c233","src/track/stateless.rs":"3db699f5f48a319fa07fb16cdf51e1623d6ecac7a476467ee366e014ea665b89","src/track/texture.rs":"fbd5f3cde5161404048131dbea014806cfc210ab1497bfd638f0064969c004f9","src/validation.rs":"06684d20a4548133104291acfa06a03c41fefc7b70f0bf757b06b74fcc941ca0","src/weak_vec.rs":"a4193add5912b91226a3155cc613365b7fafdf2e7929d21d68bc19d149696e85"},"package":null} \ No newline at end of file diff --git a/third_party/rust/wgpu-core/Cargo.toml b/third_party/rust/wgpu-core/Cargo.toml index b5acf368cc9e..2a6e95a9576b 100644 --- a/third_party/rust/wgpu-core/Cargo.toml +++ b/third_party/rust/wgpu-core/Cargo.toml @@ -11,7 +11,7 @@ [package] edition = "2021" -rust-version = "1.82.0" +rust-version = "1.76" name = "wgpu-core" version = "24.0.0" authors = ["gfx-rs developers"] @@ -108,7 +108,7 @@ version = "0.8" default-features = false [dependencies.bitflags] -version = "2.9" +version = "2.7" [dependencies.bytemuck] version = "1.21" diff --git a/third_party/rust/wgpu-core/src/binding_model.rs b/third_party/rust/wgpu-core/src/binding_model.rs index 5f6d52e00b3f..111442270473 100644 --- a/third_party/rust/wgpu-core/src/binding_model.rs +++ b/third_party/rust/wgpu-core/src/binding_model.rs @@ -188,8 +188,6 @@ pub enum CreateBindGroupError { layout_flt: bool, sampler_flt: bool, }, - #[error("TLAS binding {binding} is required to support vertex returns but is missing flag AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN")] - MissingTLASVertexReturn { binding: u32 }, #[error("Bound texture views can not have both depth and stencil aspects enabled")] DepthStencilAspect, #[error("The adapter does not support read access for storage textures of format {0:?}")] @@ -382,7 +380,7 @@ impl BindingTypeMaxCountValidator { wgt::BindingType::StorageTexture { .. } => { self.storage_textures.add(binding.visibility, count); } - wgt::BindingType::AccelerationStructure { .. } => { + wgt::BindingType::AccelerationStructure => { self.acceleration_structures.add(binding.visibility, count); } } diff --git a/third_party/rust/wgpu-core/src/command/bundle.rs b/third_party/rust/wgpu-core/src/command/bundle.rs index e192c0b99bc5..099446426c01 100644 --- a/third_party/rust/wgpu-core/src/command/bundle.rs +++ b/third_party/rust/wgpu-core/src/command/bundle.rs @@ -85,6 +85,7 @@ use alloc::{ vec::Vec, }; use core::{ + mem::size_of, num::{NonZeroU32, NonZeroU64}, ops::Range, }; diff --git a/third_party/rust/wgpu-core/src/command/compute.rs b/third_party/rust/wgpu-core/src/command/compute.rs index 8519e8be82b6..d973176c61d2 100644 --- a/third_party/rust/wgpu-core/src/command/compute.rs +++ b/third_party/rust/wgpu-core/src/command/compute.rs @@ -2,7 +2,7 @@ use thiserror::Error; use wgt::{BufferAddress, DynamicOffset}; use alloc::{borrow::Cow, boxed::Box, sync::Arc, vec::Vec}; -use core::{fmt, str}; +use core::{fmt, mem::size_of, str}; use crate::{ binding_model::{ diff --git a/third_party/rust/wgpu-core/src/command/ray_tracing.rs b/third_party/rust/wgpu-core/src/command/ray_tracing.rs index f6334d8275f2..868d43ab17e5 100644 --- a/third_party/rust/wgpu-core/src/command/ray_tracing.rs +++ b/third_party/rust/wgpu-core/src/command/ray_tracing.rs @@ -530,21 +530,6 @@ impl Global { }, )); - if tlas - .flags - .contains(wgpu_types::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN) - && !blas.flags.contains( - wgpu_types::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN, - ) - { - return Err( - BuildAccelerationStructureError::TlasDependentMissingVertexReturn( - tlas.error_ident(), - blas.error_ident(), - ), - ); - } - instance_count += 1; dependencies.push(blas.clone()); diff --git a/third_party/rust/wgpu-core/src/command/render.rs b/third_party/rust/wgpu-core/src/command/render.rs index 6d59f1b18688..cf14d6b4d0f3 100644 --- a/third_party/rust/wgpu-core/src/command/render.rs +++ b/third_party/rust/wgpu-core/src/command/render.rs @@ -1,5 +1,5 @@ use alloc::{borrow::Cow, sync::Arc, vec::Vec}; -use core::{fmt, num::NonZeroU32, ops::Range, str}; +use core::{fmt, mem::size_of, num::NonZeroU32, ops::Range, str}; use arrayvec::ArrayVec; use thiserror::Error; diff --git a/third_party/rust/wgpu-core/src/device/mod.rs b/third_party/rust/wgpu-core/src/device/mod.rs index 30c4daad6d38..5bb1aad6f21d 100644 --- a/third_party/rust/wgpu-core/src/device/mod.rs +++ b/third_party/rust/wgpu-core/src/device/mod.rs @@ -303,7 +303,7 @@ impl fmt::Display for DeviceMismatch { } } -impl core::error::Error for DeviceMismatch {} +impl std::error::Error for DeviceMismatch {} #[derive(Clone, Debug, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] @@ -469,10 +469,6 @@ pub fn create_validator( Caps::SUBGROUP_VERTEX_STAGE, features.contains(wgt::Features::SUBGROUP_VERTEX), ); - caps.set( - Caps::RAY_HIT_VERTEX_POSITION, - features.intersects(wgt::Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN), - ); naga::valid::Validator::new(flags, caps) } diff --git a/third_party/rust/wgpu-core/src/device/ray_tracing.rs b/third_party/rust/wgpu-core/src/device/ray_tracing.rs index 0146741254ed..52d01b6a5838 100644 --- a/third_party/rust/wgpu-core/src/device/ray_tracing.rs +++ b/third_party/rust/wgpu-core/src/device/ray_tracing.rs @@ -27,13 +27,6 @@ impl Device { self.check_is_valid()?; self.require_features(Features::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE)?; - if blas_desc - .flags - .contains(wgt::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN) - { - self.require_features(Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN)?; - } - let size_info = match &sizes { wgt::BlasGeometrySizeDescriptors::Triangles { descriptors } => { let mut entries = @@ -146,13 +139,6 @@ impl Device { )); } - if desc - .flags - .contains(wgt::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN) - { - self.require_features(Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN)?; - } - let size_info = unsafe { self.raw().get_acceleration_structure_build_sizes( &hal::GetAccelerationStructureBuildSizesDescriptor { diff --git a/third_party/rust/wgpu-core/src/device/resource.rs b/third_party/rust/wgpu-core/src/device/resource.rs index b61bf1442fb3..69a62ab11914 100644 --- a/third_party/rust/wgpu-core/src/device/resource.rs +++ b/third_party/rust/wgpu-core/src/device/resource.rs @@ -1905,7 +1905,7 @@ impl Device { }, ) } - Bt::AccelerationStructure { .. } => (None, WritableStorage::No), + Bt::AccelerationStructure => (None, WritableStorage::No), }; // Validate the count parameter @@ -2249,15 +2249,7 @@ impl Device { tlas.same_device(self)?; match decl.ty { - wgt::BindingType::AccelerationStructure { vertex_return } => { - if vertex_return - && !tlas.flags.contains( - wgpu_types::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN, - ) - { - return Err(Error::MissingTLASVertexReturn { binding }); - } - } + wgt::BindingType::AccelerationStructure => (), _ => { return Err(Error::WrongBindingType { binding, diff --git a/third_party/rust/wgpu-core/src/error.rs b/third_party/rust/wgpu-core/src/error.rs index 8c5eb8ab12d4..b5881825e697 100644 --- a/third_party/rust/wgpu-core/src/error.rs +++ b/third_party/rust/wgpu-core/src/error.rs @@ -1,5 +1,6 @@ use alloc::{boxed::Box, string::String, sync::Arc, vec::Vec}; -use core::{error::Error, fmt}; +use core::fmt; +use std::error::Error; // TODO(https://github.com/gfx-rs/wgpu/issues/6826): use core::error after MSRV bump use thiserror::Error; diff --git a/third_party/rust/wgpu-core/src/id.rs b/third_party/rust/wgpu-core/src/id.rs index 8858e1f89666..a74b9e9096de 100644 --- a/third_party/rust/wgpu-core/src/id.rs +++ b/third_party/rust/wgpu-core/src/id.rs @@ -4,6 +4,7 @@ use core::{ fmt::{self, Debug}, hash::Hash, marker::PhantomData, + mem::size_of, num::NonZeroU64, }; use wgt::WasmNotSendSync; diff --git a/third_party/rust/wgpu-core/src/indirect_validation.rs b/third_party/rust/wgpu-core/src/indirect_validation.rs index 624ad3f9ece7..8cce7614bf8d 100644 --- a/third_party/rust/wgpu-core/src/indirect_validation.rs +++ b/third_party/rust/wgpu-core/src/indirect_validation.rs @@ -1,4 +1,5 @@ use alloc::{boxed::Box, format, string::ToString as _}; +use core::mem::size_of; use core::num::NonZeroU64; use thiserror::Error; diff --git a/third_party/rust/wgpu-core/src/instance.rs b/third_party/rust/wgpu-core/src/instance.rs index ab2f62e9a336..78d2003d0e9e 100644 --- a/third_party/rust/wgpu-core/src/instance.rs +++ b/third_party/rust/wgpu-core/src/instance.rs @@ -202,72 +202,6 @@ impl Instance { } } - /// Creates a new surface from the given drm configuration. - /// - /// # Safety - /// - /// - All parameters must point to valid DRM values. - /// - /// # Platform Support - /// - /// This function is only available on non-apple Unix-like platforms (Linux, FreeBSD) and - /// currently only works with the Vulkan backend. - #[cfg(all(unix, not(target_vendor = "apple"), not(target_family = "wasm")))] - #[cfg_attr(not(vulkan), expect(unused_variables))] - pub unsafe fn create_surface_from_drm( - &self, - fd: i32, - plane: u32, - connector_id: u32, - width: u32, - height: u32, - refresh_rate: u32, - ) -> Result { - profiling::scope!("Instance::create_surface_from_drm"); - - let mut errors = HashMap::default(); - let mut surface_per_backend: HashMap> = - HashMap::default(); - - #[cfg(vulkan)] - { - let instance = unsafe { self.as_hal::() } - .ok_or(CreateSurfaceError::BackendNotEnabled(Backend::Vulkan))?; - - // Safety must be upheld by the caller - match unsafe { - instance.create_surface_from_drm( - fd, - plane, - connector_id, - width, - height, - refresh_rate, - ) - } { - Ok(surface) => { - surface_per_backend.insert(Backend::Vulkan, Box::new(surface)); - } - Err(err) => { - errors.insert(Backend::Vulkan, err); - } - } - } - - if surface_per_backend.is_empty() { - Err(CreateSurfaceError::FailedToCreateSurfaceForAnyBackend( - errors, - )) - } else { - let surface = Surface { - presentation: Mutex::new(rank::SURFACE_PRESENTATION, None), - surface_per_backend, - }; - - Ok(surface) - } - } - /// # Safety /// /// `layer` must be a valid pointer. @@ -838,42 +772,6 @@ impl Global { Ok(id) } - /// Creates a new surface from the given drm configuration. - /// - /// # Safety - /// - /// - All parameters must point to valid DRM values. - /// - /// # Platform Support - /// - /// This function is only available on non-apple Unix-like platforms (Linux, FreeBSD) and - /// currently only works with the Vulkan backend. - #[cfg(all(unix, not(target_vendor = "apple"), not(target_family = "wasm")))] - pub unsafe fn instance_create_surface_from_drm( - &self, - fd: i32, - plane: u32, - connector_id: u32, - width: u32, - height: u32, - refresh_rate: u32, - id_in: Option, - ) -> Result { - let surface = unsafe { - self.instance.create_surface_from_drm( - fd, - plane, - connector_id, - width, - height, - refresh_rate, - ) - }?; - let id = self.surfaces.prepare(id_in).assign(Arc::new(surface)); - - Ok(id) - } - /// # Safety /// /// `layer` must be a valid pointer. diff --git a/third_party/rust/wgpu-core/src/lib.rs b/third_party/rust/wgpu-core/src/lib.rs index db3fcde3887b..ec873852d9a4 100644 --- a/third_party/rust/wgpu-core/src/lib.rs +++ b/third_party/rust/wgpu-core/src/lib.rs @@ -58,8 +58,6 @@ // this doesn't make a difference. // Therefore, this is only really a concern for users targeting WebGL // (the only reason to use wgpu-core on the web in the first place) that have atomics enabled. -// -// NOTE: Keep this in sync with `wgpu`. #![cfg_attr(not(send_sync), allow(clippy::arc_with_non_send_sync))] extern crate alloc; diff --git a/third_party/rust/wgpu-core/src/pipeline_cache.rs b/third_party/rust/wgpu-core/src/pipeline_cache.rs index 0253163f6daf..b206c09ea4f5 100644 --- a/third_party/rust/wgpu-core/src/pipeline_cache.rs +++ b/third_party/rust/wgpu-core/src/pipeline_cache.rs @@ -1,3 +1,5 @@ +use core::mem::size_of; + use thiserror::Error; use wgt::AdapterInfo; diff --git a/third_party/rust/wgpu-core/src/ray_tracing.rs b/third_party/rust/wgpu-core/src/ray_tracing.rs index 7810854ee580..2d8217dfe642 100644 --- a/third_party/rust/wgpu-core/src/ray_tracing.rs +++ b/third_party/rust/wgpu-core/src/ray_tracing.rs @@ -130,10 +130,6 @@ pub enum BuildAccelerationStructureError { #[error("Blas {0:?} is missing the flag USE_TRANSFORM but the transform buffer is set")] UseTransformMissing(ResourceErrorIdent), - #[error( - "Tlas {0:?} dependent {1:?} is missing AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN" - )] - TlasDependentMissingVertexReturn(ResourceErrorIdent, ResourceErrorIdent), } #[derive(Clone, Debug, Error)] diff --git a/third_party/rust/wgpu-core/src/registry.rs b/third_party/rust/wgpu-core/src/registry.rs index e015eb93af3a..753fb0c1e747 100644 --- a/third_party/rust/wgpu-core/src/registry.rs +++ b/third_party/rust/wgpu-core/src/registry.rs @@ -1,4 +1,5 @@ use alloc::sync::Arc; +use core::mem::size_of; use crate::{ id::Id, diff --git a/third_party/rust/wgpu-core/src/validation.rs b/third_party/rust/wgpu-core/src/validation.rs index 175c47a06a6b..274cfab1c19a 100644 --- a/third_party/rust/wgpu-core/src/validation.rs +++ b/third_party/rust/wgpu-core/src/validation.rs @@ -25,9 +25,7 @@ enum ResourceType { Sampler { comparison: bool, }, - AccelerationStructure { - vertex_return: bool, - }, + AccelerationStructure, } #[derive(Clone, Debug)] @@ -44,7 +42,7 @@ impl From<&ResourceType> for BindingTypeName { ResourceType::Buffer { .. } => BindingTypeName::Buffer, ResourceType::Texture { .. } => BindingTypeName::Texture, ResourceType::Sampler { .. } => BindingTypeName::Sampler, - ResourceType::AccelerationStructure { .. } => BindingTypeName::AccelerationStructure, + ResourceType::AccelerationStructure => BindingTypeName::AccelerationStructure, } } } @@ -56,7 +54,7 @@ impl From<&BindingType> for BindingTypeName { BindingType::Texture { .. } => BindingTypeName::Texture, BindingType::StorageTexture { .. } => BindingTypeName::Texture, BindingType::Sampler { .. } => BindingTypeName::Sampler, - BindingType::AccelerationStructure { .. } => BindingTypeName::AccelerationStructure, + BindingType::AccelerationStructure => BindingTypeName::AccelerationStructure, } } } @@ -559,10 +557,8 @@ impl Resource { }); } } - ResourceType::AccelerationStructure { vertex_return } => match entry.ty { - BindingType::AccelerationStructure { - vertex_return: entry_vertex_return, - } if vertex_return == entry_vertex_return => (), + ResourceType::AccelerationStructure => match entry.ty { + BindingType::AccelerationStructure => (), _ => { return Err(BindingError::WrongType { binding: (&entry.ty).into(), @@ -654,9 +650,7 @@ impl Resource { }, } } - ResourceType::AccelerationStructure { vertex_return } => { - BindingType::AccelerationStructure { vertex_return } - } + ResourceType::AccelerationStructure => BindingType::AccelerationStructure, }) } } @@ -955,9 +949,7 @@ impl Interface { class, }, naga::TypeInner::Sampler { comparison } => ResourceType::Sampler { comparison }, - naga::TypeInner::AccelerationStructure { vertex_return } => { - ResourceType::AccelerationStructure { vertex_return } - } + naga::TypeInner::AccelerationStructure => ResourceType::AccelerationStructure, ref other => ResourceType::Buffer { size: wgt::BufferSize::new(other.size(module.to_ctx()) as u64).unwrap(), }, diff --git a/third_party/rust/wgpu-hal/.cargo-checksum.json b/third_party/rust/wgpu-hal/.cargo-checksum.json index d43166424831..510f35ce430a 100644 --- a/third_party/rust/wgpu-hal/.cargo-checksum.json +++ b/third_party/rust/wgpu-hal/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"75c99f62573453c460f6ab67716feb3a98d55bead62449001641596fdb2d6dc6","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","README.md":"cf9e84804a635e4a8a9fefc596be9da6bf7354dde0d105e27d56a12cb20dd8e3","build.rs":"40c99bddda32846afd639d84b9a160ddab338092560b5cb3402112ff37ab4fba","examples/halmark/main.rs":"a16c6902b2ad1a4d8db8d057091b47259d5f59e63058b07a4bada6c7defd9312","examples/halmark/shader.wgsl":"26c256ec36d6f0e9a1647431ca772766bee4382d64eaa718ba7b488dcfb6bcca","examples/raw-gles.em.html":"70fbe68394a1a4522192de1dcfaf7d399f60d7bdf5de70b708f9bb0417427546","examples/raw-gles.rs":"288dae4c701aa7e5ba498fdd03ea42e1046a27db0914d93c88a43a7953cb9064","examples/ray-traced-triangle/main.rs":"3d702095bd8295a0f762fded0e123845beb4d2c25bda2cf05c2de94a9420023c","examples/ray-traced-triangle/shader.wgsl":"cc10caf92746724a71f6dd0dbc3a71e57b37c7d1d83278556805a535c0728a9d","src/auxil/dxgi/conv.rs":"c7564baf7142ebcc1135e14f0c2600580edde8903279372bd25767fe532d20d3","src/auxil/dxgi/exception.rs":"7df3597c1fd6e7708f96a342846b87e6c6cc17fb9dbe09f6aec54984809a4818","src/auxil/dxgi/factory.rs":"fbae1cf83f4ac8cd356557fb3caa0da92c3968d68a36f5c8ea18b90b3bcaeeaa","src/auxil/dxgi/mod.rs":"56925eb2801c4abe80254ada791cd6587a97472f50df715534d61a362253e05b","src/auxil/dxgi/result.rs":"a14b8b0dd052e7dde11220043f180d2e8ce7ae522dea6e96536c82db13fc7abc","src/auxil/dxgi/time.rs":"1414a57363adf8381d89d9c1efdf9eee471081e1a2a583ae90f0310fd8902fd4","src/auxil/mod.rs":"ebb7c070f75a598822ce10c6563c6ffb49e941882c1b435000d71a493bba79f6","src/auxil/renderdoc.rs":"e687710ea0c9e88c9be0e2acd39d136635b835ffb941886b875811b3ec945080","src/dx12/adapter.rs":"6e419e59202a65ce22b3c64d20a1a22a61ae2d6cafc5d1f3b229d676962fa45f","src/dx12/command.rs":"b348f945b4af33aecf667139c8ec7a697d5cf8cbb686c3220ac655c86164b876","src/dx12/conv.rs":"818bbbac8bb593fe1b0346b69cfd36c68e9a78e8be7e9f1ecac62a19133fc2ff","src/dx12/descriptor.rs":"fa523bb069b775065367a71edad7fbbfa2bad6f952a4781b048ecec0d35b70fb","src/dx12/device.rs":"fbcaafabb8db61541b3dba622fb4d863f04e69b46f4fc0dc350d7854a7e7f888","src/dx12/instance.rs":"626ff3377fae82a356da3ebc66b6c453a6c9bfb0bb0cce51c4c3f20b2d9df964","src/dx12/mod.rs":"9346dbe200189216c2ff88c8a11ec5636eca45afd46920c4c373650935efea53","src/dx12/sampler.rs":"402b5850dc64ab23b760fa9ab44c229ed808bc4ab58f78de0b889b68a0e207c0","src/dx12/shader_compilation.rs":"590fd829ed1e7c55a0373017b5695481895e76f9127588f2966e78502949b371","src/dx12/suballocation.rs":"ff637f0c1d618ea2abf259c13b7830ba15fba77d026c575835afa459261283b6","src/dx12/types.rs":"3fc7619fc09303eb3c936d4ded6889f94ce9e8b9aa62742ce900baa1b1e1cca7","src/dx12/view.rs":"3f4c23a34b86e3bfbcb11169a9dec5e1c21425e7ecad846b36c159ced0138cee","src/dynamic/adapter.rs":"e93f7d082a3950c9e8ccff8a631d251c7598b4b25dda9fe6347dadfa3ba07829","src/dynamic/command.rs":"a67394c333b2f0773717d64d7ca9a900868e7ce46dac832ec09a17a5a84bfa43","src/dynamic/device.rs":"230c48fba8e49cc46c420bcd1621beaf9802be9e65710cbfc2c1aea78e91b573","src/dynamic/instance.rs":"7b515c201e1ca24f24439544dbfa1d19ea1412a4f89bd803e009aed13b021e55","src/dynamic/mod.rs":"b02a3c11b22c896cf66ef206f5d4bb4e24988ecadc29972c572baf347f54aa04","src/dynamic/queue.rs":"d76abb4797e90253386d24584f186dbe1909e772560156b2e891fa043cfefbdc","src/dynamic/surface.rs":"4328c2fe86931f50aa00ac3d6982d0879b774eebf7a507903d1b1898c891fb4d","src/gles/adapter.rs":"e0187c442af127cb3940af9f1c5b27836a290bed706ca2177b7e03e1ae3021ef","src/gles/command.rs":"11becc2f9e6171b0cc90456d9c414b94e7f2152a53e4753c90aca3c42ab0204f","src/gles/conv.rs":"7f885dd2bc72641d22f8f2e688ebdd857663bfe315f1b5364ea302f99a05adbf","src/gles/device.rs":"061a883e5a8c15f20afbda8ab4b4a85482793abdeb49f27433d73865efecc54c","src/gles/egl.rs":"c9737871f276c81f1994ebd55dabf8817cb46bdb4ecd495b1c28b52aba8f74fd","src/gles/emscripten.rs":"316d2bb6f2a4bb126dbe68a223f7393399080d116b61c39504454acdf4f9cfaf","src/gles/fence.rs":"083cd49747aba6272002aba0b0c37e5768cdbc2a1b8bacd1a244ee905d3f7b0f","src/gles/mod.rs":"346cbbe8bd070b24f36aefd3c425d8c255716a675a3ce182f12c39f580f6a077","src/gles/queue.rs":"992099d38a23d1f30292749932e627e74d490b62fbbba945b0349ac04d86dd88","src/gles/shaders/clear.frag":"9133ed8ed97d3641fbb6b5f5ea894a3554c629ccc1b80a5fc9221d7293aa1954","src/gles/shaders/clear.vert":"a543768725f4121ff2e9e1fb5b00644931e9d6f2f946c0ef01968afb5a135abd","src/gles/shaders/srgb_present.frag":"dd9a43c339a2fa4ccf7f6a1854c6f400cabf271a7d5e9230768e9f39d47f3ff5","src/gles/shaders/srgb_present.vert":"6e85d489403d80b81cc94790730bb53b309dfc5eeede8f1ea3412a660f31d357","src/gles/web.rs":"cb5940bf7b2381811675011b640040274f407a7d1908d0f82c813d6a9d3b00f7","src/gles/wgl.rs":"4242466a745e2263204e61b7de011c4a9a4c559ab06ae4df063685762b0cd042","src/lib.rs":"46ce110c98da4c32a678010f75d0b60bb44e55ed3edc139d8234d9e760d796b9","src/metal/adapter.rs":"6fef5b86aa923a75495adc5a51f4b9c7fa78da3194e7a58d3c6c527a2032f3f3","src/metal/command.rs":"e8af9260abc9852fce35d4dda981750c8f4c4d970ca9959e48442a036414aa8a","src/metal/conv.rs":"17f37cf5fea93b437e5ec9cfff9ae96e2c6a7f23fb2d3890616fb8dbeb5f13c4","src/metal/device.rs":"7874cfb8c865c2e65bfc07489b61a58f67a40974749b705a25172db444064ff5","src/metal/layer_observer.rs":"8370a6e443d01739b951b8538ee719a03b69fc0cbac92c748db418fbcc8837b5","src/metal/mod.rs":"8ea1846700e700e932178093b63955ce31ba7540d16af01dff4da3dcea91b939","src/metal/surface.rs":"828cf6f22bb5038afbd471d4164ecc256e832d51b0a845a12be839289f8bded8","src/metal/time.rs":"c32d69f30e846dfcc0e39e01097fb80df63b2bebb6586143bb62494999850246","src/noop/buffer.rs":"89a938411204b33082200a1306fe589587de15142392d7ec591676512e4cfeb2","src/noop/command.rs":"917b70ac315101633094b3f92744310a60940747a2cc8a9368141200ce0ed1fd","src/noop/mod.rs":"1af00e4b7bd2e57fec3c1dfbd56efd5acf3dfeb9f2d3618f91a6e40cdce6d59d","src/vulkan/adapter.rs":"0d5207d17ed4877da8e09e213e8dc2947dbb28c29716920644da059b51f71690","src/vulkan/command.rs":"571662697bdfd6d8f5dada24a57dd72b6324f9f3abc787025adca67df7455cd4","src/vulkan/conv.rs":"ebb9bd12bfcf2c596d89c515b3d767241d61beb7cc138c61759a627183f23aa7","src/vulkan/device.rs":"f87cdf45597436e70e973fac66cac0bada184e86d663808d1872f0a5b768760f","src/vulkan/drm.rs":"4b067b273d45c54578b419ec6037bc55fa364f0053fd949de07152334ff49fa7","src/vulkan/instance.rs":"c76b5ceaf2be18f8334963114b9e5002c31b8edb375a2fffc6b8eef4cda820ad","src/vulkan/mod.rs":"025833e3521186838a50219ef4a584fd7b388cc88a7901db75a33ad32790d66b","src/vulkan/sampler.rs":"77a91ec2e61481256eddcff7c4081d72b5cda09e2824333d77945da9eada8933"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"315946dd2cfcabf35baa0ecfd7bc34498bc0c1cfb5e144a256fde35d0dc8e2e1","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","README.md":"cf9e84804a635e4a8a9fefc596be9da6bf7354dde0d105e27d56a12cb20dd8e3","build.rs":"25a0d16603ace556f145da6c7121b5aeca4f33dbbb4b6e655610cbb2fc15b715","examples/halmark/main.rs":"305774a69bffc6fa3f77c1211ef93bc4d107cbc055c237dfa4305cc17a078513","examples/halmark/shader.wgsl":"26c256ec36d6f0e9a1647431ca772766bee4382d64eaa718ba7b488dcfb6bcca","examples/raw-gles.em.html":"70fbe68394a1a4522192de1dcfaf7d399f60d7bdf5de70b708f9bb0417427546","examples/raw-gles.rs":"288dae4c701aa7e5ba498fdd03ea42e1046a27db0914d93c88a43a7953cb9064","examples/ray-traced-triangle/main.rs":"82ab4f9877c8f8ab6367c82bc939acf7b04b478ee95750885e3ce699bf9a8595","examples/ray-traced-triangle/shader.wgsl":"cc10caf92746724a71f6dd0dbc3a71e57b37c7d1d83278556805a535c0728a9d","src/auxil/dxgi/conv.rs":"c7564baf7142ebcc1135e14f0c2600580edde8903279372bd25767fe532d20d3","src/auxil/dxgi/exception.rs":"7df3597c1fd6e7708f96a342846b87e6c6cc17fb9dbe09f6aec54984809a4818","src/auxil/dxgi/factory.rs":"fbae1cf83f4ac8cd356557fb3caa0da92c3968d68a36f5c8ea18b90b3bcaeeaa","src/auxil/dxgi/mod.rs":"56925eb2801c4abe80254ada791cd6587a97472f50df715534d61a362253e05b","src/auxil/dxgi/result.rs":"a14b8b0dd052e7dde11220043f180d2e8ce7ae522dea6e96536c82db13fc7abc","src/auxil/dxgi/time.rs":"6235cc071b8535b4b58f843dbaf4ff4564a37e80a99c452c4a8988e436192483","src/auxil/mod.rs":"ebb7c070f75a598822ce10c6563c6ffb49e941882c1b435000d71a493bba79f6","src/auxil/renderdoc.rs":"0d106fb77746805c18334d957dcf67f9f547d17471117664b9523232d496c2b9","src/dx12/adapter.rs":"5f5382601d4fec4678bdd73c90b7ed83866a9b86fb58b35e8bef641635a80019","src/dx12/command.rs":"f88073ef59047c38b923e1528726ec1116302e8d8fbf070174d3154b031d232a","src/dx12/conv.rs":"d459258a78e3976843692c2e8f9ebea8ca9385edd84a3b18cb9299ec10fae954","src/dx12/descriptor.rs":"fa523bb069b775065367a71edad7fbbfa2bad6f952a4781b048ecec0d35b70fb","src/dx12/device.rs":"08d68412b191d58a8c75e760fad72926773db27998ab224f700d91b7f19e1a3d","src/dx12/instance.rs":"a3d8a18579b403ce7f9228b15999f1bf8a75ad0c97517426a9c6296011007e16","src/dx12/mod.rs":"4651f29935e5b892d79f0286e002a006c1ad279cc255b9f90a6532dc32cf4e3f","src/dx12/sampler.rs":"402b5850dc64ab23b760fa9ab44c229ed808bc4ab58f78de0b889b68a0e207c0","src/dx12/shader_compilation.rs":"23ac90865f1247556627ed4c7f70a8b5d4fb739f6bb6ab825355852127223f49","src/dx12/suballocation.rs":"ff637f0c1d618ea2abf259c13b7830ba15fba77d026c575835afa459261283b6","src/dx12/types.rs":"3fc7619fc09303eb3c936d4ded6889f94ce9e8b9aa62742ce900baa1b1e1cca7","src/dx12/view.rs":"3f4c23a34b86e3bfbcb11169a9dec5e1c21425e7ecad846b36c159ced0138cee","src/dynamic/adapter.rs":"e93f7d082a3950c9e8ccff8a631d251c7598b4b25dda9fe6347dadfa3ba07829","src/dynamic/command.rs":"6857c98892ba5c8781a529baa96158ef9ab3e94c9cac91306b585cc3a5f0eeb4","src/dynamic/device.rs":"79edfe57569bf999b9abfaf6e84cec27ce9afd8aa6c38c7cd53640a6cda43580","src/dynamic/instance.rs":"7b515c201e1ca24f24439544dbfa1d19ea1412a4f89bd803e009aed13b021e55","src/dynamic/mod.rs":"b02a3c11b22c896cf66ef206f5d4bb4e24988ecadc29972c572baf347f54aa04","src/dynamic/queue.rs":"d76abb4797e90253386d24584f186dbe1909e772560156b2e891fa043cfefbdc","src/dynamic/surface.rs":"4328c2fe86931f50aa00ac3d6982d0879b774eebf7a507903d1b1898c891fb4d","src/gles/adapter.rs":"2ec2d31cc04a00d04904967023f8a679c90b4ab980209c589289d947b61c4e02","src/gles/command.rs":"4eea78b72e612f7894858db5f73ec78a3d5c7d849bc88542c8ee9e9cbd70ac13","src/gles/conv.rs":"7f885dd2bc72641d22f8f2e688ebdd857663bfe315f1b5364ea302f99a05adbf","src/gles/device.rs":"94ec02c783b2f117c60e17a0a69d4d240a152ee3b8596e71706d0eb65c94435e","src/gles/egl.rs":"214384161b21637e1ec5a45aa593735788dc485ab899dd2af19ea17a61096bc6","src/gles/emscripten.rs":"316d2bb6f2a4bb126dbe68a223f7393399080d116b61c39504454acdf4f9cfaf","src/gles/fence.rs":"083cd49747aba6272002aba0b0c37e5768cdbc2a1b8bacd1a244ee905d3f7b0f","src/gles/mod.rs":"712602084bf330228215476d71307191ddf72d1b85d7e77e4e60e7225b2768d5","src/gles/queue.rs":"76024dd5ecee17ebda0f41b5e764cad79871d47e96989916dd13080bc9bc907c","src/gles/shaders/clear.frag":"9133ed8ed97d3641fbb6b5f5ea894a3554c629ccc1b80a5fc9221d7293aa1954","src/gles/shaders/clear.vert":"a543768725f4121ff2e9e1fb5b00644931e9d6f2f946c0ef01968afb5a135abd","src/gles/shaders/srgb_present.frag":"dd9a43c339a2fa4ccf7f6a1854c6f400cabf271a7d5e9230768e9f39d47f3ff5","src/gles/shaders/srgb_present.vert":"6e85d489403d80b81cc94790730bb53b309dfc5eeede8f1ea3412a660f31d357","src/gles/web.rs":"cb5940bf7b2381811675011b640040274f407a7d1908d0f82c813d6a9d3b00f7","src/gles/wgl.rs":"bffa0fc29e2b2e74ab48742ab3f222a2a453b2e4f3bb4271b60e3f60baba9633","src/lib.rs":"240e178bcf0c9a44fede1a74569550a861d57212866938b8970bc3bd6c7fcb26","src/metal/adapter.rs":"6fef5b86aa923a75495adc5a51f4b9c7fa78da3194e7a58d3c6c527a2032f3f3","src/metal/command.rs":"99b36de2791d83fa5b3753f7b1a8d20d46c3df7faace1c2f4a07ae3aa1e2ba73","src/metal/conv.rs":"17f37cf5fea93b437e5ec9cfff9ae96e2c6a7f23fb2d3890616fb8dbeb5f13c4","src/metal/device.rs":"751e61be66afd5f1746226c76cfc16491581fdede9259aadb4c433ebbda5a810","src/metal/layer_observer.rs":"630a11dbfd67929db67716b5f82f2bdb9ba93366b6f5d1aa8fb3eccd8ef61ee5","src/metal/mod.rs":"967d9d9616c18f79f912a59e58e25a8e849586379383e10f45b0c1f9ef9cb2e2","src/metal/surface.rs":"828cf6f22bb5038afbd471d4164ecc256e832d51b0a845a12be839289f8bded8","src/metal/time.rs":"c32d69f30e846dfcc0e39e01097fb80df63b2bebb6586143bb62494999850246","src/noop/buffer.rs":"89a938411204b33082200a1306fe589587de15142392d7ec591676512e4cfeb2","src/noop/command.rs":"f804e2cb0011b02cafc063b553d4a320018989f31a989f5fb007f2f1110ed5e4","src/noop/mod.rs":"ed8dabadd35a35dd8f3849b2fb79012402fb87e7b9c4a8e05fbd46ec52ffd50c","src/vulkan/adapter.rs":"e8186d2c002df6833cdf50a4c97eebe7cabf21ff427d22a9a7d8f35310d6e131","src/vulkan/command.rs":"3cbed7e1ed7f38a3915bc204f827d43d36ed6b65d21642097f7d938e9951ea4a","src/vulkan/conv.rs":"4132f37cc738d29d58d47147c57ea980bd3c46ec9a6324620197e3782e358e67","src/vulkan/device.rs":"f9b8ff56ea2a95a95b25629b91030e9407df97b83abab5781e129fe6165feaa7","src/vulkan/instance.rs":"1ba189d00b43d6476016fa0da2aed3d243dfcf1a08d97ada88629a7a2470e674","src/vulkan/mod.rs":"806c54d72e0beb9971054a77adb071bcbe4abfac459f209045e7b199f6284800","src/vulkan/sampler.rs":"77a91ec2e61481256eddcff7c4081d72b5cda09e2824333d77945da9eada8933"},"package":null} \ No newline at end of file diff --git a/third_party/rust/wgpu-hal/Cargo.toml b/third_party/rust/wgpu-hal/Cargo.toml index 36c54bae43d1..acfdfe38cd8f 100644 --- a/third_party/rust/wgpu-hal/Cargo.toml +++ b/third_party/rust/wgpu-hal/Cargo.toml @@ -11,7 +11,7 @@ [package] edition = "2021" -rust-version = "1.82.0" +rust-version = "1.76" name = "wgpu-hal" version = "24.0.0" authors = ["gfx-rs developers"] @@ -81,7 +81,6 @@ gles = [ "naga/glsl-out", "dep:arrayvec", "dep:bytemuck", - "dep:cfg-if", "dep:glow", "dep:glutin_wgl_sys", "dep:hashbrown", @@ -90,10 +89,10 @@ gles = [ "dep:libloading", "dep:log", "dep:ndk-sys", - "dep:objc", "dep:profiling", "dep:wasm-bindgen", "dep:web-sys", + "once_cell/std", "windows/Win32_Graphics_OpenGL", "windows/Win32_Graphics_Gdi", "windows/Win32_System_LibraryLoader", @@ -161,7 +160,7 @@ optional = true default-features = false [dependencies.bitflags] -version = "2.9" +version = "2.7" [dependencies.bytemuck] version = "1.21" @@ -172,10 +171,6 @@ features = [ ] optional = true -[dependencies.cfg-if] -version = "1" -optional = true - [dependencies.glow] version = "0.16" optional = true diff --git a/third_party/rust/wgpu-hal/build.rs b/third_party/rust/wgpu-hal/build.rs index 960f6453008d..d67321a72d8a 100644 --- a/third_party/rust/wgpu-hal/build.rs +++ b/third_party/rust/wgpu-hal/build.rs @@ -9,18 +9,6 @@ fn main() { Emscripten: { all(target_os = "emscripten", gles) }, dx12: { all(target_os = "windows", feature = "dx12") }, gles: { all(feature = "gles") }, - // Within the GL ES backend, use `std` and be Send + Sync only if we are using a target - // that, among the ones where the GL ES backend is supported, has `std`. - gles_with_std: { all( - feature = "gles", - any( - not(target_arch = "wasm32"), - // Accept wasm32-unknown-unknown, which uniquely has a stub `std` - all(target_vendor = "unknown", target_os = "unknown"), - // Accept wasm32-unknown-emscripten and similar, which has a real `std` - target_os = "emscripten" - ) - ) }, metal: { all(target_vendor = "apple", feature = "metal") }, vulkan: { all(not(target_arch = "wasm32"), feature = "vulkan") }, // ⚠️ Keep in sync with target.cfg() definition in Cargo.toml and cfg_alias in `wgpu` crate ⚠️ diff --git a/third_party/rust/wgpu-hal/examples/halmark/main.rs b/third_party/rust/wgpu-hal/examples/halmark/main.rs index f7ce594d610e..731d9f0f0261 100644 --- a/third_party/rust/wgpu-hal/examples/halmark/main.rs +++ b/third_party/rust/wgpu-hal/examples/halmark/main.rs @@ -14,7 +14,9 @@ use winit::{ use std::{ borrow::{Borrow, Cow}, - iter, ptr, + iter, + mem::size_of, + ptr, time::Instant, }; diff --git a/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs b/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs index 9e2a7771e122..730f6b111cd2 100644 --- a/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs +++ b/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs @@ -8,7 +8,9 @@ use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; use glam::{Affine3A, Mat4, Vec3}; use std::{ borrow::{Borrow, Cow}, - iter, ptr, + iter, + mem::size_of, + ptr, time::Instant, }; use wgpu_types::Dx12BackendOptions; @@ -342,9 +344,7 @@ impl Example { wgpu_types::BindGroupLayoutEntry { binding: 2, visibility: wgpu_types::ShaderStages::COMPUTE, - ty: wgpu_types::BindingType::AccelerationStructure { - vertex_return: false, - }, + ty: wgpu_types::BindingType::AccelerationStructure, count: None, }, ], diff --git a/third_party/rust/wgpu-hal/src/auxil/dxgi/time.rs b/third_party/rust/wgpu-hal/src/auxil/dxgi/time.rs index 752a4845a62f..1b312fd6518b 100644 --- a/third_party/rust/wgpu-hal/src/auxil/dxgi/time.rs +++ b/third_party/rust/wgpu-hal/src/auxil/dxgi/time.rs @@ -62,11 +62,7 @@ impl PresentationTimer { let kernelbase = libloading::os::windows::Library::open_already_loaded("kernelbase.dll").unwrap(); // No concerns about lifetimes here as kernelbase is always there. - let ptr = unsafe { - kernelbase - .get(c"QueryInterruptTimePrecise".to_bytes()) - .unwrap() - }; + let ptr = unsafe { kernelbase.get(b"QueryInterruptTimePrecise\0").unwrap() }; Self::IPresentationManager { fnQueryInterruptTimePrecise: *ptr, } diff --git a/third_party/rust/wgpu-hal/src/auxil/renderdoc.rs b/third_party/rust/wgpu-hal/src/auxil/renderdoc.rs index 2770869be582..c5fa96c7941f 100644 --- a/third_party/rust/wgpu-hal/src/auxil/renderdoc.rs +++ b/third_party/rust/wgpu-hal/src/auxil/renderdoc.rs @@ -1,7 +1,6 @@ //! RenderDoc integration - #![cfg_attr(not(any(feature = "gles", feature = "vulkan")), allow(dead_code))] -use alloc::format; use alloc::string::String; use core::{ffi, ptr}; @@ -72,7 +71,7 @@ impl RenderDoc { }; let get_api: libloading::Symbol = - match unsafe { renderdoc_lib.get(c"RENDERDOC_GetAPI".to_bytes()) } { + match unsafe { renderdoc_lib.get(b"RENDERDOC_GetAPI\0") } { Ok(api) => api, Err(e) => { return RenderDoc::NotAvailable { diff --git a/third_party/rust/wgpu-hal/src/dx12/adapter.rs b/third_party/rust/wgpu-hal/src/dx12/adapter.rs index 82b62c5161bb..bc5c943d88b0 100644 --- a/third_party/rust/wgpu-hal/src/dx12/adapter.rs +++ b/third_party/rust/wgpu-hal/src/dx12/adapter.rs @@ -1,4 +1,11 @@ -use std::{ptr, string::String, sync::Arc, thread, vec::Vec}; +use std::{ + mem::{size_of, size_of_val}, + ptr, + string::String, + sync::Arc, + thread, + vec::Vec, +}; use parking_lot::Mutex; use windows::{ diff --git a/third_party/rust/wgpu-hal/src/dx12/command.rs b/third_party/rust/wgpu-hal/src/dx12/command.rs index 5ca6b87cdc9f..474500d145a5 100644 --- a/third_party/rust/wgpu-hal/src/dx12/command.rs +++ b/third_party/rust/wgpu-hal/src/dx12/command.rs @@ -1179,14 +1179,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) } } - unsafe fn draw_mesh_tasks( - &mut self, - _group_count_x: u32, - _group_count_y: u32, - _group_count_z: u32, - ) { - unreachable!() - } unsafe fn draw_indirect( &mut self, buffer: &super::Buffer, @@ -1223,14 +1215,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) } } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _draw_count: u32, - ) { - unreachable!() - } unsafe fn draw_indirect_count( &mut self, buffer: &super::Buffer, @@ -1271,16 +1255,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) } } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _count_buffer: &::Buffer, - _count_offset: wgt::BufferAddress, - _max_count: u32, - ) { - unreachable!() - } // compute diff --git a/third_party/rust/wgpu-hal/src/dx12/conv.rs b/third_party/rust/wgpu-hal/src/dx12/conv.rs index b636dbc8d54a..3342a6ab06be 100644 --- a/third_party/rust/wgpu-hal/src/dx12/conv.rs +++ b/third_party/rust/wgpu-hal/src/dx12/conv.rs @@ -114,7 +114,7 @@ pub fn map_binding_type(ty: &wgt::BindingType) -> Direct3D12::D3D12_DESCRIPTOR_R .. } | Bt::StorageTexture { .. } => Direct3D12::D3D12_DESCRIPTOR_RANGE_TYPE_UAV, - Bt::AccelerationStructure { .. } => Direct3D12::D3D12_DESCRIPTOR_RANGE_TYPE_SRV, + Bt::AccelerationStructure => Direct3D12::D3D12_DESCRIPTOR_RANGE_TYPE_SRV, } } diff --git a/third_party/rust/wgpu-hal/src/dx12/device.rs b/third_party/rust/wgpu-hal/src/dx12/device.rs index 87e611a188b2..9c344fd94d28 100644 --- a/third_party/rust/wgpu-hal/src/dx12/device.rs +++ b/third_party/rust/wgpu-hal/src/dx12/device.rs @@ -1,6 +1,7 @@ use std::{ borrow::Cow, - ffi, mem, + ffi, + mem::{self, size_of, size_of_val}, num::NonZeroU32, ptr, slice, string::{String, ToString as _}, @@ -30,7 +31,7 @@ use crate::{ }; // this has to match Naga's HLSL backend, and also needs to be null-terminated -const NAGA_LOCATION_SEMANTIC: &[u8] = c"LOC".to_bytes(); +const NAGA_LOCATION_SEMANTIC: &[u8] = b"LOC\0"; impl super::Device { pub(super) fn new( @@ -773,7 +774,7 @@ impl crate::Device for super::Device { wgt::BindingType::Buffer { .. } | wgt::BindingType::Texture { .. } | wgt::BindingType::StorageTexture { .. } - | wgt::BindingType::AccelerationStructure { .. } => num_views += count, + | wgt::BindingType::AccelerationStructure => num_views += count, wgt::BindingType::Sampler { .. } => has_sampler_in_group = true, } } @@ -1514,7 +1515,7 @@ impl crate::Device for super::Device { sampler_indexes.push(data.index); } } - wgt::BindingType::AccelerationStructure { .. } => { + wgt::BindingType::AccelerationStructure => { let start = entry.resource_index as usize; let end = start + entry.count as usize; for data in &desc.acceleration_structures[start..end] { @@ -1883,18 +1884,6 @@ impl crate::Device for super::Device { vertex_strides, }) } - - unsafe fn create_mesh_pipeline( - &self, - _desc: &crate::MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, crate::PipelineError> { - unreachable!() - } - unsafe fn destroy_render_pipeline(&self, _pipeline: super::RenderPipeline) { self.counters.render_pipelines.sub(1); } diff --git a/third_party/rust/wgpu-hal/src/dx12/instance.rs b/third_party/rust/wgpu-hal/src/dx12/instance.rs index ef02c8aca7bb..69f1ac78648c 100644 --- a/third_party/rust/wgpu-hal/src/dx12/instance.rs +++ b/third_party/rust/wgpu-hal/src/dx12/instance.rs @@ -1,4 +1,4 @@ -use std::{string::String, sync::Arc, vec::Vec}; +use std::{mem::size_of_val, string::String, sync::Arc, vec::Vec}; use parking_lot::RwLock; use windows::{ diff --git a/third_party/rust/wgpu-hal/src/dx12/mod.rs b/third_party/rust/wgpu-hal/src/dx12/mod.rs index 1df48860288c..99e29e87c936 100644 --- a/third_party/rust/wgpu-hal/src/dx12/mod.rs +++ b/third_party/rust/wgpu-hal/src/dx12/mod.rs @@ -158,8 +158,7 @@ impl D3D12Lib { riid: *const windows_core::GUID, ppdevice: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; - let func: libloading::Symbol = - unsafe { self.lib.get(c"D3D12CreateDevice".to_bytes()) }?; + let func: libloading::Symbol = unsafe { self.lib.get(b"D3D12CreateDevice\0") }?; let mut result__: Option = None; @@ -200,7 +199,7 @@ impl D3D12Lib { pperrorblob: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; let func: libloading::Symbol = - unsafe { self.lib.get(c"D3D12SerializeRootSignature".to_bytes()) }?; + unsafe { self.lib.get(b"D3D12SerializeRootSignature\0") }?; let desc = Direct3D12::D3D12_ROOT_SIGNATURE_DESC { NumParameters: parameters.len() as _, @@ -239,8 +238,7 @@ impl D3D12Lib { riid: *const windows_core::GUID, ppvdebug: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; - let func: libloading::Symbol = - unsafe { self.lib.get(c"D3D12GetDebugInterface".to_bytes()) }?; + let func: libloading::Symbol = unsafe { self.lib.get(b"D3D12GetDebugInterface\0") }?; let mut result__ = None; @@ -277,8 +275,7 @@ impl DxgiLib { riid: *const windows_core::GUID, pdebug: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; - let func: libloading::Symbol = - unsafe { self.lib.get(c"DXGIGetDebugInterface1".to_bytes()) }?; + let func: libloading::Symbol = unsafe { self.lib.get(b"DXGIGetDebugInterface1\0") }?; let mut result__ = None; @@ -307,8 +304,7 @@ impl DxgiLib { riid: *const windows_core::GUID, ppfactory: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; - let func: libloading::Symbol = - unsafe { self.lib.get(c"CreateDXGIFactory2".to_bytes()) }?; + let func: libloading::Symbol = unsafe { self.lib.get(b"CreateDXGIFactory2\0") }?; let mut result__ = None; @@ -330,8 +326,7 @@ impl DxgiLib { riid: *const windows_core::GUID, ppfactory: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT; - let func: libloading::Symbol = - unsafe { self.lib.get(c"CreateDXGIFactory1".to_bytes()) }?; + let func: libloading::Symbol = unsafe { self.lib.get(b"CreateDXGIFactory1\0") }?; let mut result__ = None; @@ -670,12 +665,6 @@ pub struct Queue { temp_lists: Mutex>>, } -impl Queue { - pub fn as_raw(&self) -> &Direct3D12::ID3D12CommandQueue { - &self.raw - } -} - unsafe impl Send for Queue {} unsafe impl Sync for Queue {} diff --git a/third_party/rust/wgpu-hal/src/dx12/shader_compilation.rs b/third_party/rust/wgpu-hal/src/dx12/shader_compilation.rs index 4574fac5d40e..f9f3a6b74073 100644 --- a/third_party/rust/wgpu-hal/src/dx12/shader_compilation.rs +++ b/third_party/rust/wgpu-hal/src/dx12/shader_compilation.rs @@ -112,7 +112,7 @@ impl DxcLib { -> windows_core::HRESULT; let func: libloading::Symbol = - self.lib.get(c"DxcCreateInstance".to_bytes())?; + self.lib.get(b"DxcCreateInstance\0")?; dxc_create_instance::(|clsid, iid, ppv| func(clsid, iid, ppv)) } } diff --git a/third_party/rust/wgpu-hal/src/dynamic/command.rs b/third_party/rust/wgpu-hal/src/dynamic/command.rs index a33930262740..7b79866ad14d 100644 --- a/third_party/rust/wgpu-hal/src/dynamic/command.rs +++ b/third_party/rust/wgpu-hal/src/dynamic/command.rs @@ -130,12 +130,6 @@ pub trait DynCommandEncoder: DynResource + core::fmt::Debug { first_instance: u32, instance_count: u32, ); - unsafe fn draw_mesh_tasks( - &mut self, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ); unsafe fn draw_indirect( &mut self, buffer: &dyn DynBuffer, @@ -148,12 +142,6 @@ pub trait DynCommandEncoder: DynResource + core::fmt::Debug { offset: wgt::BufferAddress, draw_count: u32, ); - unsafe fn draw_mesh_tasks_indirect( - &mut self, - buffer: &dyn DynBuffer, - offset: wgt::BufferAddress, - draw_count: u32, - ); unsafe fn draw_indirect_count( &mut self, buffer: &dyn DynBuffer, @@ -170,14 +158,6 @@ pub trait DynCommandEncoder: DynResource + core::fmt::Debug { count_offset: wgt::BufferAddress, max_count: u32, ); - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - buffer: &dyn DynBuffer, - offset: wgt::BufferAddress, - count_buffer: &dyn DynBuffer, - count_offset: wgt::BufferAddress, - max_count: u32, - ); unsafe fn begin_compute_pass(&mut self, desc: &ComputePassDescriptor); unsafe fn end_compute_pass(&mut self); @@ -493,15 +473,6 @@ impl DynCommandEncoder for C { }; } - unsafe fn draw_mesh_tasks( - &mut self, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ) { - unsafe { C::draw_mesh_tasks(self, group_count_x, group_count_y, group_count_z) }; - } - unsafe fn draw_indirect( &mut self, buffer: &dyn DynBuffer, @@ -522,16 +493,6 @@ impl DynCommandEncoder for C { unsafe { C::draw_indexed_indirect(self, buffer, offset, draw_count) }; } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - buffer: &dyn DynBuffer, - offset: wgt::BufferAddress, - draw_count: u32, - ) { - let buffer = buffer.expect_downcast_ref(); - unsafe { C::draw_mesh_tasks_indirect(self, buffer, offset, draw_count) }; - } - unsafe fn draw_indirect_count( &mut self, buffer: &dyn DynBuffer, @@ -569,28 +530,6 @@ impl DynCommandEncoder for C { }; } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - buffer: &dyn DynBuffer, - offset: wgt::BufferAddress, - count_buffer: &dyn DynBuffer, - count_offset: wgt::BufferAddress, - max_count: u32, - ) { - let buffer = buffer.expect_downcast_ref(); - let count_buffer = count_buffer.expect_downcast_ref(); - unsafe { - C::draw_mesh_tasks_indirect_count( - self, - buffer, - offset, - count_buffer, - count_offset, - max_count, - ) - }; - } - unsafe fn begin_compute_pass(&mut self, desc: &ComputePassDescriptor) { let desc = ComputePassDescriptor { label: desc.label, diff --git a/third_party/rust/wgpu-hal/src/dynamic/device.rs b/third_party/rust/wgpu-hal/src/dynamic/device.rs index c0de61f88c2d..f0519609cc10 100644 --- a/third_party/rust/wgpu-hal/src/dynamic/device.rs +++ b/third_party/rust/wgpu-hal/src/dynamic/device.rs @@ -4,10 +4,10 @@ use crate::{ AccelerationStructureBuildSizes, AccelerationStructureDescriptor, Api, BindGroupDescriptor, BindGroupLayoutDescriptor, BufferDescriptor, BufferMapping, CommandEncoderDescriptor, ComputePipelineDescriptor, Device, DeviceError, FenceValue, - GetAccelerationStructureBuildSizesDescriptor, Label, MemoryRange, MeshPipelineDescriptor, - PipelineCacheDescriptor, PipelineCacheError, PipelineError, PipelineLayoutDescriptor, - RenderPipelineDescriptor, SamplerDescriptor, ShaderError, ShaderInput, ShaderModuleDescriptor, - TextureDescriptor, TextureViewDescriptor, TlasInstance, + GetAccelerationStructureBuildSizesDescriptor, Label, MemoryRange, PipelineCacheDescriptor, + PipelineCacheError, PipelineError, PipelineLayoutDescriptor, RenderPipelineDescriptor, + SamplerDescriptor, ShaderError, ShaderInput, ShaderModuleDescriptor, TextureDescriptor, + TextureViewDescriptor, TlasInstance, }; use super::{ @@ -100,14 +100,6 @@ pub trait DynDevice: DynResource { dyn DynPipelineCache, >, ) -> Result, PipelineError>; - unsafe fn create_mesh_pipeline( - &self, - desc: &MeshPipelineDescriptor< - dyn DynPipelineLayout, - dyn DynShaderModule, - dyn DynPipelineCache, - >, - ) -> Result, PipelineError>; unsafe fn destroy_render_pipeline(&self, pipeline: Box); unsafe fn create_compute_pipeline( @@ -401,32 +393,6 @@ impl DynDevice for D { .map(|b| -> Box { Box::new(b) }) } - unsafe fn create_mesh_pipeline( - &self, - desc: &MeshPipelineDescriptor< - dyn DynPipelineLayout, - dyn DynShaderModule, - dyn DynPipelineCache, - >, - ) -> Result, PipelineError> { - let desc = MeshPipelineDescriptor { - label: desc.label, - layout: desc.layout.expect_downcast_ref(), - task_stage: desc.task_stage.clone().map(|f| f.expect_downcast()), - mesh_stage: desc.mesh_stage.clone().expect_downcast(), - primitive: desc.primitive, - depth_stencil: desc.depth_stencil.clone(), - multisample: desc.multisample, - fragment_stage: desc.fragment_stage.clone().map(|f| f.expect_downcast()), - color_targets: desc.color_targets, - multiview: desc.multiview, - cache: desc.cache.map(|c| c.expect_downcast_ref()), - }; - - unsafe { D::create_mesh_pipeline(self, &desc) } - .map(|b| -> Box { Box::new(b) }) - } - unsafe fn destroy_render_pipeline(&self, pipeline: Box) { unsafe { D::destroy_render_pipeline(self, pipeline.unbox()) }; } diff --git a/third_party/rust/wgpu-hal/src/gles/adapter.rs b/third_party/rust/wgpu-hal/src/gles/adapter.rs index ff476645b8a7..248e7f7a5d2a 100644 --- a/third_party/rust/wgpu-hal/src/gles/adapter.rs +++ b/third_party/rust/wgpu-hal/src/gles/adapter.rs @@ -203,9 +203,7 @@ impl super::Adapter { // emscripten doesn't enable "WEBGL_debug_renderer_info" extension by default. so, we do it manually. // See https://github.com/gfx-rs/wgpu/issues/3245 for context #[cfg(Emscripten)] - if unsafe { - super::emscripten::enable_extension(c"WEBGL_debug_renderer_info".to_str().unwrap()) - } { + if unsafe { super::emscripten::enable_extension("WEBGL_debug_renderer_info\0") } { (GL_UNMASKED_VENDOR_WEBGL, GL_UNMASKED_RENDERER_WEBGL) } else { (glow::VENDOR, glow::RENDERER) diff --git a/third_party/rust/wgpu-hal/src/gles/command.rs b/third_party/rust/wgpu-hal/src/gles/command.rs index 9644018b371d..2bff6278f1c8 100644 --- a/third_party/rust/wgpu-hal/src/gles/command.rs +++ b/third_party/rust/wgpu-hal/src/gles/command.rs @@ -1,5 +1,9 @@ use alloc::string::String; -use core::{mem, ops::Range, slice}; +use core::{ + mem::{self, size_of, size_of_val}, + ops::Range, + slice, +}; use arrayvec::ArrayVec; @@ -1073,14 +1077,6 @@ impl crate::CommandEncoder for super::CommandEncoder { first_instance_location: self.state.first_instance_location.clone(), }); } - unsafe fn draw_mesh_tasks( - &mut self, - _group_count_x: u32, - _group_count_y: u32, - _group_count_z: u32, - ) { - unreachable!() - } unsafe fn draw_indirect( &mut self, buffer: &super::Buffer, @@ -1124,14 +1120,6 @@ impl crate::CommandEncoder for super::CommandEncoder { }); } } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _draw_count: u32, - ) { - unreachable!() - } unsafe fn draw_indirect_count( &mut self, _buffer: &super::Buffer, @@ -1152,16 +1140,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) { unreachable!() } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _count_buffer: &::Buffer, - _count_offset: wgt::BufferAddress, - _max_count: u32, - ) { - unreachable!() - } // compute diff --git a/third_party/rust/wgpu-hal/src/gles/device.rs b/third_party/rust/wgpu-hal/src/gles/device.rs index 2cf1de9cdf4c..56060de656a4 100644 --- a/third_party/rust/wgpu-hal/src/gles/device.rs +++ b/third_party/rust/wgpu-hal/src/gles/device.rs @@ -2,12 +2,13 @@ use alloc::{ borrow::ToOwned, format, string::String, string::ToString as _, sync::Arc, vec, vec::Vec, }; use core::{cmp::max, convert::TryInto, num::NonZeroU32, ptr, sync::atomic::Ordering}; +use std::sync::Mutex; use arrayvec::ArrayVec; use glow::HasContext; use naga::FastHashMap; -use super::{conv, lock, MaybeMutex, PrivateCapabilities}; +use super::{conv, PrivateCapabilities}; use crate::auxil::map_naga_stage; use crate::TlasInstance; @@ -525,8 +526,8 @@ impl crate::Device for super::Device { target, size: desc.size, map_flags: 0, - data: Some(Arc::new(MaybeMutex::new(vec![0; desc.size as usize]))), - offset_of_current_mapping: Arc::new(MaybeMutex::new(0)), + data: Some(Arc::new(Mutex::new(vec![0; desc.size as usize]))), + offset_of_current_mapping: Arc::new(Mutex::new(0)), }); } @@ -613,7 +614,7 @@ impl crate::Device for super::Device { } let data = if emulate_map && desc.usage.contains(wgt::BufferUses::MAP_READ) { - Some(Arc::new(MaybeMutex::new(vec![0; desc.size as usize]))) + Some(Arc::new(Mutex::new(vec![0; desc.size as usize]))) } else { None }; @@ -626,7 +627,7 @@ impl crate::Device for super::Device { size: desc.size, map_flags, data, - offset_of_current_mapping: Arc::new(MaybeMutex::new(0)), + offset_of_current_mapping: Arc::new(Mutex::new(0)), }) } @@ -651,7 +652,7 @@ impl crate::Device for super::Device { let is_coherent = buffer.map_flags & glow::MAP_COHERENT_BIT != 0; let ptr = match buffer.raw { None => { - let mut vec = lock(buffer.data.as_ref().unwrap()); + let mut vec = buffer.data.as_ref().unwrap().lock().unwrap(); let slice = &mut vec.as_mut_slice()[range.start as usize..range.end as usize]; slice.as_mut_ptr() } @@ -659,12 +660,12 @@ impl crate::Device for super::Device { let gl = &self.shared.context.lock(); unsafe { gl.bind_buffer(buffer.target, Some(raw)) }; let ptr = if let Some(ref map_read_allocation) = buffer.data { - let mut guard = lock(map_read_allocation); + let mut guard = map_read_allocation.lock().unwrap(); let slice = guard.as_mut_slice(); unsafe { self.shared.get_buffer_sub_data(gl, buffer.target, 0, slice) }; slice.as_mut_ptr() } else { - *lock(&buffer.offset_of_current_mapping) = range.start; + *buffer.offset_of_current_mapping.lock().unwrap() = range.start; unsafe { gl.map_buffer_range( buffer.target, @@ -690,7 +691,7 @@ impl crate::Device for super::Device { unsafe { gl.bind_buffer(buffer.target, Some(raw)) }; unsafe { gl.unmap_buffer(buffer.target) }; unsafe { gl.bind_buffer(buffer.target, None) }; - *lock(&buffer.offset_of_current_mapping) = 0; + *buffer.offset_of_current_mapping.lock().unwrap() = 0; } } } @@ -703,7 +704,8 @@ impl crate::Device for super::Device { let gl = &self.shared.context.lock(); unsafe { gl.bind_buffer(buffer.target, Some(raw)) }; for range in ranges { - let offset_of_current_mapping = *lock(&buffer.offset_of_current_mapping); + let offset_of_current_mapping = + *buffer.offset_of_current_mapping.lock().unwrap(); unsafe { gl.flush_mapped_buffer_range( buffer.target, @@ -1189,7 +1191,7 @@ impl crate::Device for super::Device { ty: wgt::BufferBindingType::Storage { .. }, .. } => &mut num_storage_buffers, - wgt::BindingType::AccelerationStructure { .. } => unimplemented!(), + wgt::BindingType::AccelerationStructure => unimplemented!(), }; binding_to_slot[entry.binding as usize] = *counter; @@ -1299,7 +1301,7 @@ impl crate::Device for super::Device { format: format_desc.internal, }) } - wgt::BindingType::AccelerationStructure { .. } => unimplemented!(), + wgt::BindingType::AccelerationStructure => unimplemented!(), }; contents.push(binding); } @@ -1413,16 +1415,6 @@ impl crate::Device for super::Device { alpha_to_coverage_enabled: desc.multisample.alpha_to_coverage_enabled, }) } - unsafe fn create_mesh_pipeline( - &self, - _desc: &crate::MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, crate::PipelineError> { - unreachable!() - } unsafe fn destroy_render_pipeline(&self, pipeline: super::RenderPipeline) { // If the pipeline only has 2 strong references remaining, they're `pipeline` and `program_cache` diff --git a/third_party/rust/wgpu-hal/src/gles/egl.rs b/third_party/rust/wgpu-hal/src/gles/egl.rs index 6f246cad194c..c88abb28c111 100644 --- a/third_party/rust/wgpu-hal/src/gles/egl.rs +++ b/third_party/rust/wgpu-hal/src/gles/egl.rs @@ -1,19 +1,13 @@ #![allow(clippy::std_instead_of_alloc, clippy::std_instead_of_core)] use std::{ - ffi, - mem::ManuallyDrop, - os::raw, - ptr, - rc::Rc, - string::String, - sync::{Arc, LazyLock}, - time::Duration, + ffi, mem::ManuallyDrop, os::raw, ptr, rc::Rc, string::String, sync::Arc, time::Duration, vec::Vec, }; use glow::HasContext; use hashbrown::HashMap; +use once_cell::sync::Lazy; use parking_lot::{MappedMutexGuard, Mutex, MutexGuard, RwLock}; /// The amount of time to wait while trying to obtain a lock to the adapter context @@ -153,7 +147,7 @@ impl Drop for DisplayOwner { match self.display { DisplayRef::X11(ptr) => unsafe { let func: libloading::Symbol = - self.library.get(c"XCloseDisplay".to_bytes()).unwrap(); + self.library.get(b"XCloseDisplay\0").unwrap(); func(ptr.as_ptr()); }, DisplayRef::Wayland => {} @@ -165,8 +159,7 @@ fn open_x_display() -> Option { log::debug!("Loading X11 library to get the current display"); unsafe { let library = find_library(&["libX11.so.6", "libX11.so"])?; - let func: libloading::Symbol = - library.get(c"XOpenDisplay".to_bytes()).unwrap(); + let func: libloading::Symbol = library.get(b"XOpenDisplay\0").unwrap(); let result = func(ptr::null()); ptr::NonNull::new(result).map(|ptr| DisplayOwner { display: DisplayRef::X11(ptr), @@ -192,12 +185,10 @@ fn test_wayland_display() -> Option { log::debug!("Loading Wayland library to get the current display"); let library = unsafe { let client_library = find_library(&["libwayland-client.so.0", "libwayland-client.so"])?; - let wl_display_connect: libloading::Symbol = client_library - .get(c"wl_display_connect".to_bytes()) - .unwrap(); - let wl_display_disconnect: libloading::Symbol = client_library - .get(c"wl_display_disconnect".to_bytes()) - .unwrap(); + let wl_display_connect: libloading::Symbol = + client_library.get(b"wl_display_connect\0").unwrap(); + let wl_display_disconnect: libloading::Symbol = + client_library.get(b"wl_display_disconnect\0").unwrap(); let display = ptr::NonNull::new(wl_display_connect(ptr::null()))?; wl_display_disconnect(display.as_ptr()); find_library(&["libwayland-egl.so.1", "libwayland-egl.so"])? @@ -480,8 +471,7 @@ struct Inner { // Different calls to `eglGetPlatformDisplay` may return the same `Display`, making it a global // state of all our `EglContext`s. This forces us to track the number of such context to prevent // terminating the display if it's currently used by another `EglContext`. -static DISPLAYS_REFERENCE_COUNT: LazyLock>> = - LazyLock::new(Default::default); +static DISPLAYS_REFERENCE_COUNT: Lazy>> = Lazy::new(Default::default); fn initialize_display( egl: &EglInstance, @@ -1327,7 +1317,7 @@ impl crate::Surface for Surface { (WindowKind::Wayland, Rwh::Wayland(handle)) => { let library = &self.wsi.display_owner.as_ref().unwrap().library; let wl_egl_window_create: libloading::Symbol = - unsafe { library.get(c"wl_egl_window_create".to_bytes()) }.unwrap(); + unsafe { library.get(b"wl_egl_window_create\0") }.unwrap(); let window = unsafe { wl_egl_window_create(handle.surface.as_ptr(), 640, 480) } .cast(); @@ -1439,7 +1429,7 @@ impl crate::Surface for Surface { if let Some(window) = wl_window { let library = &self.wsi.display_owner.as_ref().unwrap().library; let wl_egl_window_resize: libloading::Symbol = - unsafe { library.get(c"wl_egl_window_resize".to_bytes()) }.unwrap(); + unsafe { library.get(b"wl_egl_window_resize\0") }.unwrap(); unsafe { wl_egl_window_resize( window, @@ -1511,7 +1501,7 @@ impl crate::Surface for Surface { .expect("unsupported window") .library; let wl_egl_window_destroy: libloading::Symbol = - unsafe { library.get(c"wl_egl_window_destroy".to_bytes()) }.unwrap(); + unsafe { library.get(b"wl_egl_window_destroy\0") }.unwrap(); unsafe { wl_egl_window_destroy(window) }; } } diff --git a/third_party/rust/wgpu-hal/src/gles/mod.rs b/third_party/rust/wgpu-hal/src/gles/mod.rs index ab434b90dd1b..756838d776da 100644 --- a/third_party/rust/wgpu-hal/src/gles/mod.rs +++ b/third_party/rust/wgpu-hal/src/gles/mod.rs @@ -346,8 +346,8 @@ pub struct Buffer { target: BindTarget, size: wgt::BufferAddress, map_flags: u32, - data: Option>>>, - offset_of_current_mapping: Arc>, + data: Option>>>, + offset_of_current_mapping: Arc>, } #[cfg(send_sync)] @@ -1093,26 +1093,3 @@ fn gl_debug_message_callback(source: u32, gltype: u32, id: u32, severity: u32, m crate::VALIDATION_CANARY.add(message.to_string()); } } - -// If we are using `std`, then use `Mutex` to provide `Send` and `Sync` -cfg_if::cfg_if! { - if #[cfg(gles_with_std)] { - type MaybeMutex = std::sync::Mutex; - - fn lock(mutex: &MaybeMutex) -> std::sync::MutexGuard<'_, T> { - mutex.lock().unwrap() - } - } else { - // It should be impossible for any build configuration to trigger this error - // It is intended only as a guard against changes elsewhere causing the use of - // `RefCell` here to become unsound. - #[cfg(all(send_sync, not(feature = "fragile-send-sync-non-atomic-wasm")))] - compile_error!("cannot provide non-fragile Send+Sync without std"); - - type MaybeMutex = core::cell::RefCell; - - fn lock(mutex: &MaybeMutex) -> core::cell::RefMut<'_, T> { - mutex.borrow_mut() - } - } -} diff --git a/third_party/rust/wgpu-hal/src/gles/queue.rs b/third_party/rust/wgpu-hal/src/gles/queue.rs index 1d391f7bded6..73681b7b70af 100644 --- a/third_party/rust/wgpu-hal/src/gles/queue.rs +++ b/third_party/rust/wgpu-hal/src/gles/queue.rs @@ -1,12 +1,9 @@ +use super::{conv::is_layered_target, Command as C, PrivateCapabilities}; use alloc::sync::Arc; -use alloc::vec; -use core::{slice, sync::atomic::Ordering}; - use arrayvec::ArrayVec; +use core::{mem::size_of, slice, sync::atomic::Ordering}; use glow::HasContext; -use super::{conv::is_layered_target, lock, Command as C, PrivateCapabilities}; - const DEBUG_ID: u32 = 0; fn extract_marker<'a>(data: &'a [u8], range: &core::ops::Range) -> &'a str { @@ -343,7 +340,7 @@ impl super::Queue { } } None => { - lock(dst.data.as_ref().unwrap()).as_mut_slice() + dst.data.as_ref().unwrap().lock().unwrap().as_mut_slice() [range.start as usize..range.end as usize] .fill(0); } @@ -385,7 +382,7 @@ impl super::Queue { }; } (Some(src), None) => { - let mut data = lock(dst.data.as_ref().unwrap()); + let mut data = dst.data.as_ref().unwrap().lock().unwrap(); let dst_data = &mut data.as_mut_slice() [copy.dst_offset as usize..copy.dst_offset as usize + size]; @@ -400,7 +397,7 @@ impl super::Queue { }; } (None, Some(dst)) => { - let data = lock(src.data.as_ref().unwrap()); + let data = src.data.as_ref().unwrap().lock().unwrap(); let src_data = &data.as_slice() [copy.src_offset as usize..copy.src_offset as usize + size]; unsafe { gl.bind_buffer(copy_dst_target, Some(dst)) }; @@ -741,7 +738,7 @@ impl super::Queue { glow::PixelUnpackData::BufferOffset(copy.buffer_layout.offset as u32) } None => { - buffer_data = lock(src.data.as_ref().unwrap()); + buffer_data = src.data.as_ref().unwrap().lock().unwrap(); let src_data = &buffer_data.as_slice()[copy.buffer_layout.offset as usize..]; glow::PixelUnpackData::Slice(Some(src_data)) @@ -805,7 +802,7 @@ impl super::Queue { ) } None => { - buffer_data = lock(src.data.as_ref().unwrap()); + buffer_data = src.data.as_ref().unwrap().lock().unwrap(); let src_data = &buffer_data.as_slice() [(offset as usize)..(offset + bytes_in_upload) as usize]; glow::CompressedPixelUnpackData::Slice(src_data) @@ -886,7 +883,7 @@ impl super::Queue { glow::PixelPackData::BufferOffset(offset as u32) } None => { - buffer_data = lock(dst.data.as_ref().unwrap()); + buffer_data = dst.data.as_ref().unwrap().lock().unwrap(); let dst_data = &mut buffer_data.as_mut_slice()[offset as usize..]; glow::PixelPackData::Slice(Some(dst_data)) } @@ -1057,7 +1054,7 @@ impl super::Queue { }; } None => { - let data = &mut lock(dst.data.as_ref().unwrap()); + let data = &mut dst.data.as_ref().unwrap().lock().unwrap(); let len = query_data.len().min(data.len()); data[..len].copy_from_slice(&query_data[..len]); } diff --git a/third_party/rust/wgpu-hal/src/gles/wgl.rs b/third_party/rust/wgpu-hal/src/gles/wgl.rs index 13e276cfaee6..0e7acc1884c6 100644 --- a/third_party/rust/wgpu-hal/src/gles/wgl.rs +++ b/third_party/rust/wgpu-hal/src/gles/wgl.rs @@ -3,13 +3,13 @@ use std::{ borrow::ToOwned as _, ffi::{c_void, CStr, CString}, - mem::{self, ManuallyDrop}, + mem::{self, size_of, size_of_val, ManuallyDrop}, os::raw::c_int, ptr, string::String, sync::{ mpsc::{sync_channel, SyncSender}, - Arc, LazyLock, + Arc, }, thread, time::Duration, @@ -22,6 +22,7 @@ use glutin_wgl_sys::wgl_extra::{ CONTEXT_PROFILE_MASK_ARB, }; use hashbrown::HashSet; +use once_cell::sync::Lazy; use parking_lot::{Mutex, MutexGuard, RwLock}; use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; use wgt::InstanceFlags; @@ -324,8 +325,8 @@ fn create_global_window_class() -> Result { } fn get_global_window_class() -> Result { - static GLOBAL: LazyLock> = - LazyLock::new(create_global_window_class); + static GLOBAL: Lazy> = + Lazy::new(create_global_window_class); GLOBAL.clone() } @@ -439,13 +440,14 @@ impl crate::Instance for Instance { unsafe fn init(desc: &crate::InstanceDescriptor) -> Result { profiling::scope!("Init OpenGL (WGL) Backend"); let opengl_module = - unsafe { LibraryLoader::LoadLibraryA(PCSTR(c"opengl32.dll".as_ptr().cast())) } - .map_err(|e| { + unsafe { LibraryLoader::LoadLibraryA(PCSTR("opengl32.dll\0".as_ptr())) }.map_err( + |e| { crate::InstanceError::with_source( String::from("unable to load the OpenGL library"), e, ) - })?; + }, + )?; let device = create_instance_device()?; let dc = device.dc; diff --git a/third_party/rust/wgpu-hal/src/lib.rs b/third_party/rust/wgpu-hal/src/lib.rs index aa997a2d9dd6..cd7139b27de2 100644 --- a/third_party/rust/wgpu-hal/src/lib.rs +++ b/third_party/rust/wgpu-hal/src/lib.rs @@ -240,8 +240,8 @@ extern crate alloc; extern crate wgpu_types as wgt; -// Each of these backends needs `std` in some fashion; usually `std::thread` functions. -#[cfg(any(dx12, gles_with_std, metal, vulkan))] +// TODO(https://github.com/gfx-rs/wgpu/issues/6826): disable std except on noop and gles-WebGL. +// Requires Rust 1.81 for core::error::Error. #[macro_use] extern crate std; @@ -290,12 +290,12 @@ use alloc::boxed::Box; use alloc::{borrow::Cow, string::String, sync::Arc, vec::Vec}; use core::{ borrow::Borrow, - error::Error, fmt, num::NonZeroU32, ops::{Range, RangeInclusive}, ptr::NonNull, }; +use std::error::Error; // TODO(https://github.com/gfx-rs/wgpu/issues/6826): use core::error after MSRV bump use bitflags::bitflags; use parking_lot::Mutex; @@ -304,8 +304,7 @@ use wgt::WasmNotSendSync; // - Vertex + Fragment // - Compute -// Task + Mesh + Fragment -pub const MAX_CONCURRENT_SHADER_STAGES: usize = 3; +pub const MAX_CONCURRENT_SHADER_STAGES: usize = 2; pub const MAX_ANISOTROPY: u8 = 16; pub const MAX_BIND_GROUPS: usize = 8; pub const MAX_VERTEX_BUFFERS: usize = 16; @@ -901,15 +900,6 @@ pub trait Device: WasmNotSendSync { ::PipelineCache, >, ) -> Result<::RenderPipeline, PipelineError>; - #[allow(clippy::type_complexity)] - unsafe fn create_mesh_pipeline( - &self, - desc: &MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, PipelineError>; unsafe fn destroy_render_pipeline(&self, pipeline: ::RenderPipeline); #[allow(clippy::type_complexity)] @@ -1467,26 +1457,6 @@ pub trait CommandEncoder: WasmNotSendSync + fmt::Debug { count_offset: wgt::BufferAddress, max_count: u32, ); - unsafe fn draw_mesh_tasks( - &mut self, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ); - unsafe fn draw_mesh_tasks_indirect( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - draw_count: u32, - ); - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - count_buffer: &::Buffer, - count_offset: wgt::BufferAddress, - max_count: u32, - ); // compute passes @@ -2187,33 +2157,6 @@ pub struct RenderPipelineDescriptor< /// The cache which will be used and filled when compiling this pipeline pub cache: Option<&'a Pc>, } -pub struct MeshPipelineDescriptor< - 'a, - Pl: DynPipelineLayout + ?Sized, - M: DynShaderModule + ?Sized, - Pc: DynPipelineCache + ?Sized, -> { - pub label: Label<'a>, - /// The layout of bind groups for this pipeline. - pub layout: &'a Pl, - pub task_stage: Option>, - pub mesh_stage: ProgrammableStage<'a, M>, - /// The properties of the pipeline at the primitive assembly and rasterization level. - pub primitive: wgt::PrimitiveState, - /// The effect of draw calls on the depth and stencil aspects of the output target, if any. - pub depth_stencil: Option, - /// The multi-sampling properties of the pipeline. - pub multisample: wgt::MultisampleState, - /// The fragment stage for this pipeline. - pub fragment_stage: Option>, - /// The effect of draw calls on the color aspect of the output target. - pub color_targets: &'a [Option], - /// If the pipeline will be used with a multiview render pass, this indicates how many array - /// layers the attachments will have. - pub multiview: Option, - /// The cache which will be used and filled when compiling this pipeline - pub cache: Option<&'a Pc>, -} #[derive(Debug, Clone)] pub struct SurfaceConfiguration { diff --git a/third_party/rust/wgpu-hal/src/metal/command.rs b/third_party/rust/wgpu-hal/src/metal/command.rs index 6f4f2e289ec6..65e3fafe7346 100644 --- a/third_party/rust/wgpu-hal/src/metal/command.rs +++ b/third_party/rust/wgpu-hal/src/metal/command.rs @@ -2,6 +2,7 @@ use super::{conv, AsNative, TimestampQuerySupport}; use crate::CommandEncoder as _; use std::{ borrow::{Cow, ToOwned as _}, + mem::size_of, ops::Range, vec::Vec, }; @@ -1100,15 +1101,6 @@ impl crate::CommandEncoder for super::CommandEncoder { } } - unsafe fn draw_mesh_tasks( - &mut self, - _group_count_x: u32, - _group_count_y: u32, - _group_count_z: u32, - ) { - unreachable!() - } - unsafe fn draw_indirect( &mut self, buffer: &super::Buffer, @@ -1143,15 +1135,6 @@ impl crate::CommandEncoder for super::CommandEncoder { } } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _draw_count: u32, - ) { - unreachable!() - } - unsafe fn draw_indirect_count( &mut self, _buffer: &super::Buffer, @@ -1173,17 +1156,6 @@ impl crate::CommandEncoder for super::CommandEncoder { //TODO } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - _buffer: &::Buffer, - _offset: wgt::BufferAddress, - _count_buffer: &::Buffer, - _count_offset: wgt::BufferAddress, - _max_count: u32, - ) { - unreachable!() - } - // compute unsafe fn begin_compute_pass(&mut self, desc: &crate::ComputePassDescriptor) { @@ -1285,7 +1257,8 @@ impl crate::CommandEncoder for super::CommandEncoder { .zip(pipeline.work_group_memory_sizes.iter()) .enumerate() { - let size = pipeline_size.next_multiple_of(16); + const ALIGN_MASK: u32 = 0xF; // must be a multiple of 16 bytes + let size = ((*pipeline_size - 1) | ALIGN_MASK) + 1; if *cur_size != size { *cur_size = size; encoder.set_threadgroup_memory_length(index as _, size as _); diff --git a/third_party/rust/wgpu-hal/src/metal/device.rs b/third_party/rust/wgpu-hal/src/metal/device.rs index 6fb172d0072c..885772909e4d 100644 --- a/third_party/rust/wgpu-hal/src/metal/device.rs +++ b/third_party/rust/wgpu-hal/src/metal/device.rs @@ -735,7 +735,7 @@ impl crate::Device for super::Device { wgt::StorageTextureAccess::Atomic => true, }; } - wgt::BindingType::AccelerationStructure { .. } => unimplemented!(), + wgt::BindingType::AccelerationStructure => unimplemented!(), } } @@ -960,7 +960,7 @@ impl crate::Device for super::Device { ); counter.textures += 1; } - wgt::BindingType::AccelerationStructure { .. } => unimplemented!(), + wgt::BindingType::AccelerationStructure => unimplemented!(), } } } @@ -1269,17 +1269,6 @@ impl crate::Device for super::Device { }) } - unsafe fn create_mesh_pipeline( - &self, - _desc: &crate::MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, crate::PipelineError> { - unreachable!() - } - unsafe fn destroy_render_pipeline(&self, _pipeline: super::RenderPipeline) { self.counters.render_pipelines.sub(1); } diff --git a/third_party/rust/wgpu-hal/src/metal/layer_observer.rs b/third_party/rust/wgpu-hal/src/metal/layer_observer.rs index 8acd83b53147..6f1fade72eca 100644 --- a/third_party/rust/wgpu-hal/src/metal/layer_observer.rs +++ b/third_party/rust/wgpu-hal/src/metal/layer_observer.rs @@ -23,8 +23,8 @@ const NSKeyValueObservingOptionNew: usize = 0x01; #[allow(non_upper_case_globals)] const NSKeyValueObservingOptionInitial: usize = 0x04; -const CONTENTS_SCALE: &CStr = c"contentsScale"; -const BOUNDS: &CStr = c"bounds"; +const CONTENTS_SCALE: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"contentsScale\0") }; +const BOUNDS: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"bounds\0") }; /// Create a new custom layer that tracks parameters from the given super layer. /// diff --git a/third_party/rust/wgpu-hal/src/metal/mod.rs b/third_party/rust/wgpu-hal/src/metal/mod.rs index f8b04591a776..d97d67576bde 100644 --- a/third_party/rust/wgpu-hal/src/metal/mod.rs +++ b/third_party/rust/wgpu-hal/src/metal/mod.rs @@ -362,10 +362,6 @@ impl Queue { timestamp_period, } } - - pub fn as_raw(&self) -> &Arc> { - &self.raw - } } pub struct Device { diff --git a/third_party/rust/wgpu-hal/src/noop/command.rs b/third_party/rust/wgpu-hal/src/noop/command.rs index 36b5c9216808..000834109895 100644 --- a/third_party/rust/wgpu-hal/src/noop/command.rs +++ b/third_party/rust/wgpu-hal/src/noop/command.rs @@ -207,13 +207,6 @@ impl crate::CommandEncoder for CommandBuffer { instance_count: u32, ) { } - unsafe fn draw_mesh_tasks( - &mut self, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ) { - } unsafe fn draw_indirect( &mut self, buffer: &Buffer, @@ -228,13 +221,6 @@ impl crate::CommandEncoder for CommandBuffer { draw_count: u32, ) { } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - draw_count: u32, - ) { - } unsafe fn draw_indirect_count( &mut self, buffer: &Buffer, @@ -253,15 +239,6 @@ impl crate::CommandEncoder for CommandBuffer { max_count: u32, ) { } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - count_buffer: &::Buffer, - count_offset: wgt::BufferAddress, - max_count: u32, - ) { - } // compute diff --git a/third_party/rust/wgpu-hal/src/noop/mod.rs b/third_party/rust/wgpu-hal/src/noop/mod.rs index f5f98539286f..b9ddb242cba9 100644 --- a/third_party/rust/wgpu-hal/src/noop/mod.rs +++ b/third_party/rust/wgpu-hal/src/noop/mod.rs @@ -368,16 +368,6 @@ impl crate::Device for Context { ) -> Result { Ok(Resource) } - unsafe fn create_mesh_pipeline( - &self, - desc: &crate::MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, crate::PipelineError> { - Ok(Resource) - } unsafe fn destroy_render_pipeline(&self, pipeline: Resource) {} unsafe fn create_compute_pipeline( &self, diff --git a/third_party/rust/wgpu-hal/src/vulkan/adapter.rs b/third_party/rust/wgpu-hal/src/vulkan/adapter.rs index e751464c235c..477a7711f9db 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/adapter.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/adapter.rs @@ -106,7 +106,6 @@ pub struct PhysicalDeviceFeatures { /// to Vulkan 1.3. zero_initialize_workgroup_memory: Option>, - position_fetch: Option>, /// Features provided by `VK_KHR_shader_atomic_int64`, promoted to Vulkan 1.2. shader_atomic_int64: Option>, @@ -119,12 +118,6 @@ pub struct PhysicalDeviceFeatures { /// Features provided by `VK_EXT_subgroup_size_control`, promoted to Vulkan 1.3. subgroup_size_control: Option>, - - /// Features proved by `VK_KHR_maintenance4`, needed for mesh shaders - maintenance4: Option>, - - /// Features proved by `VK_EXT_mesh_shader` - mesh_shader: Option>, } impl PhysicalDeviceFeatures { @@ -149,9 +142,6 @@ impl PhysicalDeviceFeatures { if let Some(ref mut feature) = self.robustness2 { info = info.push_next(feature); } - if let Some(ref mut feature) = self.multiview { - info = info.push_next(feature); - } if let Some(ref mut feature) = self.astc_hdr { info = info.push_next(feature); } @@ -174,9 +164,6 @@ impl PhysicalDeviceFeatures { if let Some(ref mut feature) = self.shader_atomic_int64 { info = info.push_next(feature); } - if let Some(ref mut feature) = self.position_fetch { - info = info.push_next(feature); - } if let Some(ref mut feature) = self.shader_image_atomic_int64 { info = info.push_next(feature); } @@ -186,12 +173,6 @@ impl PhysicalDeviceFeatures { if let Some(ref mut feature) = self.subgroup_size_control { info = info.push_next(feature); } - if let Some(ref mut feature) = self.maintenance4 { - info = info.push_next(feature); - } - if let Some(ref mut feature) = self.mesh_shader { - info = info.push_next(feature); - } info } @@ -222,14 +203,12 @@ impl PhysicalDeviceFeatures { /// [`add_to_device_create`]: PhysicalDeviceFeatures::add_to_device_create /// [`Adapter::required_device_extensions`]: super::Adapter::required_device_extensions fn from_extensions_and_requested_features( - phd_capabilities: &PhysicalDeviceProperties, - _phd_features: &PhysicalDeviceFeatures, + device_api_version: u32, enabled_extensions: &[&'static CStr], requested_features: wgt::Features, downlevel_flags: wgt::DownlevelFlags, private_caps: &super::PrivateCapabilities, ) -> Self { - let device_api_version = phd_capabilities.device_api_version; let needs_bindless = requested_features.intersects( wgt::Features::TEXTURE_BINDING_ARRAY | wgt::Features::BUFFER_BINDING_ARRAY @@ -486,32 +465,6 @@ impl PhysicalDeviceFeatures { } else { None }, - position_fetch: if enabled_extensions.contains(&khr::ray_tracing_position_fetch::NAME) { - Some( - vk::PhysicalDeviceRayTracingPositionFetchFeaturesKHR::default() - .ray_tracing_position_fetch(true), - ) - } else { - None - }, - mesh_shader: if enabled_extensions.contains(&ext::mesh_shader::NAME) { - let needed = requested_features.contains(wgt::Features::MESH_SHADER); - Some( - vk::PhysicalDeviceMeshShaderFeaturesEXT::default() - .mesh_shader(needed) - .task_shader(needed) - // Multiview needs some special work https://github.com/gfx-rs/wgpu/issues/7262 - .multiview_mesh_shader(false), - ) - } else { - None - }, - maintenance4: if enabled_extensions.contains(&khr::maintenance4::NAME) { - let needed = requested_features.contains(wgt::Features::MESH_SHADER); - Some(vk::PhysicalDeviceMaintenance4FeaturesKHR::default().maintenance4(needed)) - } else { - None - }, } } @@ -656,10 +609,6 @@ impl PhysicalDeviceFeatures { F::CONSERVATIVE_RASTERIZATION, caps.supports_extension(ext::conservative_rasterization::NAME), ); - features.set( - F::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN, - caps.supports_extension(khr::ray_tracing_position_fetch::NAME), - ); if let Some(ref descriptor_indexing) = self.descriptor_indexing { // We use update-after-bind descriptors for all bind groups containing binding arrays. @@ -835,10 +784,7 @@ impl PhysicalDeviceFeatures { F::VULKAN_EXTERNAL_MEMORY_WIN32, caps.supports_extension(khr::external_memory_win32::NAME), ); - features.set( - F::MESH_SHADER, - caps.supports_extension(ext::mesh_shader::NAME), - ); + (features, dl_flags) } } @@ -900,10 +846,6 @@ pub struct PhysicalDeviceProperties { /// `VK_EXT_robustness2` extension. robustness2: Option>, - /// Additional `vk::PhysicalDevice` properties from the - /// `VK_EXT_mesh_shader` extension. - _mesh_shader: Option>, - /// The device API version. /// /// Which is the version of Vulkan supported for device-level functionality. @@ -1005,10 +947,6 @@ impl PhysicalDeviceProperties { } } - if requested_features.intersects(wgt::Features::MESH_SHADER) { - extensions.push(khr::spirv_1_4::NAME); - } - //extensions.push(khr::sampler_mirror_clamp_to_edge::NAME); //extensions.push(ext::sampler_filter_minmax::NAME); } @@ -1023,10 +961,6 @@ impl PhysicalDeviceProperties { if requested_features.contains(wgt::Features::SUBGROUP) { extensions.push(ext::subgroup_size_control::NAME); } - - if requested_features.intersects(wgt::Features::MESH_SHADER) { - extensions.push(khr::maintenance4::NAME); - } } // Optional `VK_KHR_swapchain_mutable_format` @@ -1065,10 +999,6 @@ impl PhysicalDeviceProperties { extensions.push(khr::ray_query::NAME); } - if requested_features.contains(wgt::Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN) { - extensions.push(khr::ray_tracing_position_fetch::NAME) - } - // Require `VK_EXT_conservative_rasterization` if the associated feature was requested if requested_features.contains(wgt::Features::CONSERVATIVE_RASTERIZATION) { extensions.push(ext::conservative_rasterization::NAME); @@ -1105,10 +1035,6 @@ impl PhysicalDeviceProperties { extensions.push(google::display_timing::NAME); } - if requested_features.contains(wgt::Features::MESH_SHADER) { - extensions.push(ext::mesh_shader::NAME); - } - extensions } @@ -1290,8 +1216,6 @@ impl super::InstanceShared { let supports_acceleration_structure = capabilities.supports_extension(khr::acceleration_structure::NAME); - let supports_mesh_shader = capabilities.supports_extension(ext::mesh_shader::NAME); - let mut properties2 = vk::PhysicalDeviceProperties2KHR::default(); if supports_maintenance3 { let next = capabilities @@ -1342,13 +1266,6 @@ impl super::InstanceShared { properties2 = properties2.push_next(next); } - if supports_mesh_shader { - let next = capabilities - ._mesh_shader - .insert(vk::PhysicalDeviceMeshShaderPropertiesEXT::default()); - properties2 = properties2.push_next(next); - } - unsafe { get_device_properties.get_physical_device_properties2(phd, &mut properties2) }; @@ -1475,13 +1392,6 @@ impl super::InstanceShared { features2 = features2.push_next(next); } - if capabilities.supports_extension(khr::ray_tracing_position_fetch::NAME) { - let next = features - .position_fetch - .insert(vk::PhysicalDeviceRayTracingPositionFetchFeaturesKHR::default()); - features2 = features2.push_next(next); - } - // `VK_KHR_zero_initialize_workgroup_memory` is promoted to 1.3 if capabilities.device_api_version >= vk::API_VERSION_1_3 || capabilities.supports_extension(khr::zero_initialize_workgroup_memory::NAME) @@ -1502,13 +1412,6 @@ impl super::InstanceShared { features2 = features2.push_next(next); } - if capabilities.supports_extension(ext::mesh_shader::NAME) { - let next = features - .mesh_shader - .insert(vk::PhysicalDeviceMeshShaderFeaturesEXT::default()); - features2 = features2.push_next(next); - } - unsafe { get_device_properties.get_physical_device_features2(phd, &mut features2) }; features2.features } else { @@ -1568,6 +1471,7 @@ impl super::Instance { }, backend: wgt::Backend::Vulkan, }; + let (available_features, downlevel_flags) = phd_features.to_wgpu(&self.shared.raw, phd, &phd_capabilities); let mut workarounds = super::Workarounds::empty(); @@ -1722,7 +1626,7 @@ impl super::Instance { | vk::MemoryPropertyFlags::HOST_CACHED | vk::MemoryPropertyFlags::LAZILY_ALLOCATED, phd_capabilities, - phd_features, + //phd_features, downlevel_flags, private_caps, workarounds, @@ -1787,8 +1691,7 @@ impl super::Adapter { features: wgt::Features, ) -> PhysicalDeviceFeatures { PhysicalDeviceFeatures::from_extensions_and_requested_features( - &self.phd_capabilities, - &self.phd_features, + self.phd_capabilities.device_api_version, enabled_extensions, features, self.downlevel_flags, @@ -1877,14 +1780,6 @@ impl super::Adapter { } else { None }; - let mesh_shading_fns = if enabled_extensions.contains(&ext::mesh_shader::NAME) { - Some(ext::mesh_shader::Device::new( - &self.instance.raw, - &raw_device, - )) - } else { - None - }; let naga_options = { use naga::back::spv; @@ -1986,9 +1881,6 @@ impl super::Adapter { if features.contains(wgt::Features::EXPERIMENTAL_RAY_QUERY) { capabilities.push(spv::Capability::RayQueryKHR); } - if features.contains(wgt::Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN) { - capabilities.push(spv::Capability::RayQueryPositionFetchKHR) - } spv::Options { lang_version: if features .intersects(wgt::Features::SUBGROUP | wgt::Features::SUBGROUP_VERTEX) @@ -2063,7 +1955,6 @@ impl super::Adapter { draw_indirect_count: indirect_count_fn, timeline_semaphore: timeline_semaphore_fn, ray_tracing: ray_tracing_fns, - mesh_shading: mesh_shading_fns, }, pipeline_cache_validation_key, vendor_id: self.phd_capabilities.properties.vendor_id, @@ -2192,10 +2083,6 @@ impl super::Adapter { Ok(crate::OpenDevice { device, queue }) } - - pub fn texture_format_as_raw(&self, texture_format: wgt::TextureFormat) -> vk::Format { - self.private_caps.map_texture_format(texture_format) - } } impl crate::Adapter for super::Adapter { diff --git a/third_party/rust/wgpu-hal/src/vulkan/command.rs b/third_party/rust/wgpu-hal/src/vulkan/command.rs index 03659efba33c..ca19d0dcaecf 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/command.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/command.rs @@ -3,7 +3,11 @@ use super::conv; use arrayvec::ArrayVec; use ash::vk; -use std::{mem, ops::Range, slice}; +use std::{ + mem::{self, size_of}, + ops::Range, + slice, +}; const ALLOCATION_GRANULARITY: u32 = 16; const DST_IMAGE_LAYOUT: vk::ImageLayout = vk::ImageLayout::TRANSFER_DST_OPTIMAL; @@ -1047,20 +1051,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) }; } - unsafe fn draw_mesh_tasks( - &mut self, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ) { - if let Some(ref t) = self.device.extension_fns.mesh_shading { - unsafe { - t.cmd_draw_mesh_tasks(self.active, group_count_x, group_count_y, group_count_z); - }; - } else { - panic!("Feature `MESH_SHADING` not enabled"); - } - } unsafe fn draw_indirect( &mut self, buffer: &super::Buffer, @@ -1093,26 +1083,6 @@ impl crate::CommandEncoder for super::CommandEncoder { ) }; } - unsafe fn draw_mesh_tasks_indirect( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - draw_count: u32, - ) { - if let Some(ref t) = self.device.extension_fns.mesh_shading { - unsafe { - t.cmd_draw_mesh_tasks_indirect( - self.active, - buffer.raw, - offset, - draw_count, - size_of::() as u32, - ); - }; - } else { - panic!("Feature `MESH_SHADING` not enabled"); - } - } unsafe fn draw_indirect_count( &mut self, buffer: &super::Buffer, @@ -1165,33 +1135,6 @@ impl crate::CommandEncoder for super::CommandEncoder { None => panic!("Feature `DRAW_INDIRECT_COUNT` not enabled"), } } - unsafe fn draw_mesh_tasks_indirect_count( - &mut self, - buffer: &::Buffer, - offset: wgt::BufferAddress, - count_buffer: &super::Buffer, - count_offset: wgt::BufferAddress, - max_count: u32, - ) { - if self.device.extension_fns.draw_indirect_count.is_none() { - panic!("Feature `DRAW_INDIRECT_COUNT` not enabled"); - } - if let Some(ref t) = self.device.extension_fns.mesh_shading { - unsafe { - t.cmd_draw_mesh_tasks_indirect_count( - self.active, - buffer.raw, - offset, - count_buffer.raw, - count_offset, - max_count, - size_of::() as u32, - ); - }; - } else { - panic!("Feature `MESH_SHADING` not enabled"); - } - } // compute diff --git a/third_party/rust/wgpu-hal/src/vulkan/conv.rs b/third_party/rust/wgpu-hal/src/vulkan/conv.rs index e1d5cb30e867..204d20adae2d 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/conv.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/conv.rs @@ -771,9 +771,7 @@ pub fn map_binding_type(ty: wgt::BindingType) -> vk::DescriptorType { wgt::BindingType::Sampler { .. } => vk::DescriptorType::SAMPLER, wgt::BindingType::Texture { .. } => vk::DescriptorType::SAMPLED_IMAGE, wgt::BindingType::StorageTexture { .. } => vk::DescriptorType::STORAGE_IMAGE, - wgt::BindingType::AccelerationStructure { .. } => { - vk::DescriptorType::ACCELERATION_STRUCTURE_KHR - } + wgt::BindingType::AccelerationStructure => vk::DescriptorType::ACCELERATION_STRUCTURE_KHR, } } @@ -955,10 +953,6 @@ pub fn map_acceleration_structure_flags( vk_flags |= vk::BuildAccelerationStructureFlagsKHR::ALLOW_COMPACTION } - if flags.contains(crate::AccelerationStructureBuildFlags::ALLOW_RAY_HIT_VERTEX_RETURN) { - vk_flags |= vk::BuildAccelerationStructureFlagsKHR::ALLOW_DATA_ACCESS - } - vk_flags } diff --git a/third_party/rust/wgpu-hal/src/vulkan/device.rs b/third_party/rust/wgpu-hal/src/vulkan/device.rs index d12748fcfd4d..9fce6b37e46a 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/device.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/device.rs @@ -2,7 +2,7 @@ use std::{ borrow::{Cow, ToOwned as _}, collections::BTreeMap, ffi::{CStr, CString}, - mem::{self, MaybeUninit}, + mem::{self, size_of, MaybeUninit}, num::NonZeroU32, ptr, slice, sync::Arc, @@ -1446,7 +1446,7 @@ impl crate::Device for super::Device { wgt::BindingType::StorageTexture { .. } => { desc_count.storage_image += count; } - wgt::BindingType::AccelerationStructure { .. } => { + wgt::BindingType::AccelerationStructure => { desc_count.acceleration_structure += count; } } @@ -2120,237 +2120,6 @@ impl crate::Device for super::Device { Ok(super::RenderPipeline { raw }) } - unsafe fn create_mesh_pipeline( - &self, - desc: &crate::MeshPipelineDescriptor< - ::PipelineLayout, - ::ShaderModule, - ::PipelineCache, - >, - ) -> Result<::RenderPipeline, crate::PipelineError> { - let dynamic_states = [ - vk::DynamicState::VIEWPORT, - vk::DynamicState::SCISSOR, - vk::DynamicState::BLEND_CONSTANTS, - vk::DynamicState::STENCIL_REFERENCE, - ]; - let mut compatible_rp_key = super::RenderPassKey { - sample_count: desc.multisample.count, - multiview: desc.multiview, - ..Default::default() - }; - let mut stages = ArrayVec::<_, { crate::MAX_CONCURRENT_SHADER_STAGES }>::new(); - - let vk_input_assembly = vk::PipelineInputAssemblyStateCreateInfo::default() - .topology(conv::map_topology(desc.primitive.topology)) - .primitive_restart_enable(desc.primitive.strip_index_format.is_some()); - - let compiled_ts = match desc.task_stage { - Some(ref stage) => { - // TODO: add proper naga stages - let mut compiled = self.compile_stage( - stage, - naga::ShaderStage::Compute, - &desc.layout.binding_arrays, - )?; - compiled.create_info.stage = vk::ShaderStageFlags::TASK_EXT; - stages.push(compiled.create_info); - Some(compiled) - } - None => None, - }; - - // TODO: add proper naga stages - let mut compiled_ms = self.compile_stage( - &desc.mesh_stage, - naga::ShaderStage::Compute, - &desc.layout.binding_arrays, - )?; - compiled_ms.create_info.stage = vk::ShaderStageFlags::MESH_EXT; - stages.push(compiled_ms.create_info); - let compiled_fs = match desc.fragment_stage { - Some(ref stage) => { - let compiled = self.compile_stage( - stage, - naga::ShaderStage::Fragment, - &desc.layout.binding_arrays, - )?; - stages.push(compiled.create_info); - Some(compiled) - } - None => None, - }; - - let mut vk_rasterization = vk::PipelineRasterizationStateCreateInfo::default() - .polygon_mode(conv::map_polygon_mode(desc.primitive.polygon_mode)) - .front_face(conv::map_front_face(desc.primitive.front_face)) - .line_width(1.0) - .depth_clamp_enable(desc.primitive.unclipped_depth); - if let Some(face) = desc.primitive.cull_mode { - vk_rasterization = vk_rasterization.cull_mode(conv::map_cull_face(face)) - } - let mut vk_rasterization_conservative_state = - vk::PipelineRasterizationConservativeStateCreateInfoEXT::default() - .conservative_rasterization_mode( - vk::ConservativeRasterizationModeEXT::OVERESTIMATE, - ); - if desc.primitive.conservative { - vk_rasterization = vk_rasterization.push_next(&mut vk_rasterization_conservative_state); - } - - let mut vk_depth_stencil = vk::PipelineDepthStencilStateCreateInfo::default(); - if let Some(ref ds) = desc.depth_stencil { - let vk_format = self.shared.private_caps.map_texture_format(ds.format); - let vk_layout = if ds.is_read_only(desc.primitive.cull_mode) { - vk::ImageLayout::DEPTH_STENCIL_READ_ONLY_OPTIMAL - } else { - vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL - }; - compatible_rp_key.depth_stencil = Some(super::DepthStencilAttachmentKey { - base: super::AttachmentKey::compatible(vk_format, vk_layout), - stencil_ops: crate::AttachmentOps::all(), - }); - - if ds.is_depth_enabled() { - vk_depth_stencil = vk_depth_stencil - .depth_test_enable(true) - .depth_write_enable(ds.depth_write_enabled) - .depth_compare_op(conv::map_comparison(ds.depth_compare)); - } - if ds.stencil.is_enabled() { - let s = &ds.stencil; - let front = conv::map_stencil_face(&s.front, s.read_mask, s.write_mask); - let back = conv::map_stencil_face(&s.back, s.read_mask, s.write_mask); - vk_depth_stencil = vk_depth_stencil - .stencil_test_enable(true) - .front(front) - .back(back); - } - - if ds.bias.is_enabled() { - vk_rasterization = vk_rasterization - .depth_bias_enable(true) - .depth_bias_constant_factor(ds.bias.constant as f32) - .depth_bias_clamp(ds.bias.clamp) - .depth_bias_slope_factor(ds.bias.slope_scale); - } - } - - let vk_viewport = vk::PipelineViewportStateCreateInfo::default() - .flags(vk::PipelineViewportStateCreateFlags::empty()) - .scissor_count(1) - .viewport_count(1); - - let vk_sample_mask = [ - desc.multisample.mask as u32, - (desc.multisample.mask >> 32) as u32, - ]; - let vk_multisample = vk::PipelineMultisampleStateCreateInfo::default() - .rasterization_samples(vk::SampleCountFlags::from_raw(desc.multisample.count)) - .alpha_to_coverage_enable(desc.multisample.alpha_to_coverage_enabled) - .sample_mask(&vk_sample_mask); - - let mut vk_attachments = Vec::with_capacity(desc.color_targets.len()); - for cat in desc.color_targets { - let (key, attarchment) = if let Some(cat) = cat.as_ref() { - let mut vk_attachment = vk::PipelineColorBlendAttachmentState::default() - .color_write_mask(vk::ColorComponentFlags::from_raw(cat.write_mask.bits())); - if let Some(ref blend) = cat.blend { - let (color_op, color_src, color_dst) = conv::map_blend_component(&blend.color); - let (alpha_op, alpha_src, alpha_dst) = conv::map_blend_component(&blend.alpha); - vk_attachment = vk_attachment - .blend_enable(true) - .color_blend_op(color_op) - .src_color_blend_factor(color_src) - .dst_color_blend_factor(color_dst) - .alpha_blend_op(alpha_op) - .src_alpha_blend_factor(alpha_src) - .dst_alpha_blend_factor(alpha_dst); - } - - let vk_format = self.shared.private_caps.map_texture_format(cat.format); - ( - Some(super::ColorAttachmentKey { - base: super::AttachmentKey::compatible( - vk_format, - vk::ImageLayout::COLOR_ATTACHMENT_OPTIMAL, - ), - resolve: None, - }), - vk_attachment, - ) - } else { - (None, vk::PipelineColorBlendAttachmentState::default()) - }; - - compatible_rp_key.colors.push(key); - vk_attachments.push(attarchment); - } - - let vk_color_blend = - vk::PipelineColorBlendStateCreateInfo::default().attachments(&vk_attachments); - - let vk_dynamic_state = - vk::PipelineDynamicStateCreateInfo::default().dynamic_states(&dynamic_states); - - let raw_pass = self.shared.make_render_pass(compatible_rp_key)?; - - let vk_infos = [{ - vk::GraphicsPipelineCreateInfo::default() - .layout(desc.layout.raw) - .stages(&stages) - .input_assembly_state(&vk_input_assembly) - .rasterization_state(&vk_rasterization) - .viewport_state(&vk_viewport) - .multisample_state(&vk_multisample) - .depth_stencil_state(&vk_depth_stencil) - .color_blend_state(&vk_color_blend) - .dynamic_state(&vk_dynamic_state) - .render_pass(raw_pass) - }]; - - let pipeline_cache = desc - .cache - .map(|it| it.raw) - .unwrap_or(vk::PipelineCache::null()); - - let mut raw_vec = { - profiling::scope!("vkCreateGraphicsPipelines"); - unsafe { - self.shared - .raw - .create_graphics_pipelines(pipeline_cache, &vk_infos, None) - .map_err(|(_, e)| super::map_pipeline_err(e)) - }? - }; - - let raw = raw_vec.pop().unwrap(); - if let Some(label) = desc.label { - unsafe { self.shared.set_object_name(raw, label) }; - } - // NOTE: this could leak shaders in case of an error. - if let Some(CompiledStage { - temp_raw_module: Some(raw_module), - .. - }) = compiled_ts - { - unsafe { self.shared.raw.destroy_shader_module(raw_module, None) }; - } - if let Some(raw_module) = compiled_ms.temp_raw_module { - unsafe { self.shared.raw.destroy_shader_module(raw_module, None) }; - } - if let Some(CompiledStage { - temp_raw_module: Some(raw_module), - .. - }) = compiled_fs - { - unsafe { self.shared.raw.destroy_shader_module(raw_module, None) }; - } - - self.counters.render_pipelines.add(1); - - Ok(super::RenderPipeline { raw }) - } unsafe fn destroy_render_pipeline(&self, pipeline: super::RenderPipeline) { unsafe { self.shared.raw.destroy_pipeline(pipeline.raw, None) }; diff --git a/third_party/rust/wgpu-hal/src/vulkan/drm.rs b/third_party/rust/wgpu-hal/src/vulkan/drm.rs deleted file mode 100644 index fdbda046181d..000000000000 --- a/third_party/rust/wgpu-hal/src/vulkan/drm.rs +++ /dev/null @@ -1,147 +0,0 @@ -#![cfg(all(unix, not(target_vendor = "apple"), not(target_family = "wasm")))] - -use core::mem::MaybeUninit; -use std::{string::ToString, vec::Vec}; - -use ash::{ext, khr, vk}; - -impl super::Instance { - /// Creates a new surface from the given drm configuration. - /// - /// # Safety - /// - /// - All parameters must point to valid DRM values. - pub unsafe fn create_surface_from_drm( - &self, - fd: i32, - plane: u32, - connector_id: u32, - width: u32, - height: u32, - refresh_rate: u32, - ) -> Result { - if !self.shared.extensions.contains(&khr::display::NAME) { - return Err(crate::InstanceError::new( - "Vulkan driver does not support VK_KHR_display".to_string(), - )); - } - - let drm_stat = { - let mut stat = MaybeUninit::::uninit(); - - if unsafe { libc::fstat(fd, stat.as_mut_ptr()) } != 0 { - return Err(crate::InstanceError::new( - "Unable to fstat drm device".to_string(), - )); - } - - unsafe { stat.assume_init() } - }; - - let raw_devices = match unsafe { self.shared.raw.enumerate_physical_devices() } { - Ok(devices) => devices, - Err(err) => { - log::error!("enumerate_adapters: {}", err); - Vec::new() - } - }; - - let mut physical_device = None; - - for device in raw_devices { - let properties2 = vk::PhysicalDeviceProperties2KHR::default(); - - let mut drm_props = vk::PhysicalDeviceDrmPropertiesEXT::default(); - let mut properties2 = properties2.push_next(&mut drm_props); - - unsafe { - self.shared - .raw - .get_physical_device_properties2(device, &mut properties2) - }; - - /* - The makedev call is just bit manipulation to combine major and minor device numbers into a Unix device ID. - It doesn't perform any filesystem operations, only bitshifting. - See: https://github.com/rust-lang/libc/blob/268e1b3810ac07ed637d9005bc1a54e49218c958/src/unix/linux_like/linux/mod.rs#L6049 - We use the resulting device IDs to check if the Vulkan raw device from enumerate_physical_devices - matches the DRM device referred to by our file descriptor. - */ - - let primary_devid = - libc::makedev(drm_props.primary_major as _, drm_props.primary_minor as _); - let render_devid = - libc::makedev(drm_props.render_major as _, drm_props.render_minor as _); - - // Various platforms use different widths between `dev_t` and `c_int`, so just - // force-convert to `u64` to keep things portable. - #[allow(clippy::useless_conversion)] - if [primary_devid, render_devid] - .map(u64::from) - .contains(&drm_stat.st_rdev) - { - physical_device = Some(device) - } - } - - let physical_device = physical_device.ok_or(crate::InstanceError::new( - "Failed to find suitable drm device".to_string(), - ))?; - - let acquire_drm_display_instance = - ext::acquire_drm_display::Instance::new(&self.shared.entry, &self.shared.raw); - - let display = unsafe { - acquire_drm_display_instance - .get_drm_display(physical_device, fd, connector_id) - .expect("Failed to get drm display") - }; - - unsafe { - acquire_drm_display_instance - .acquire_drm_display(physical_device, fd, display) - .expect("Failed to acquire drm display") - } - - let display_instance = khr::display::Instance::new(&self.shared.entry, &self.shared.raw); - - let modes = unsafe { - display_instance - .get_display_mode_properties(physical_device, display) - .expect("Failed to get display modes") - }; - - let mut mode = None; - - for current_mode in modes { - log::trace!( - "Comparing mode {}x{}@{} with {width}x{height}@{refresh_rate}", - current_mode.parameters.visible_region.width, - current_mode.parameters.visible_region.height, - current_mode.parameters.refresh_rate - ); - if current_mode.parameters.refresh_rate == refresh_rate - && current_mode.parameters.visible_region.width == width - && current_mode.parameters.visible_region.height == height - { - mode = Some(current_mode) - } - } - - let mode = mode.ok_or(crate::InstanceError::new( - "Failed to find suitable display mode".to_string(), - ))?; - - let create_info = vk::DisplaySurfaceCreateInfoKHR::default() - .display_mode(mode.display_mode) - .image_extent(mode.parameters.visible_region) - .transform(vk::SurfaceTransformFlagsKHR::IDENTITY) - .alpha_mode(vk::DisplayPlaneAlphaFlagsKHR::OPAQUE) - .plane_index(plane); - - let surface = unsafe { display_instance.create_display_plane_surface(&create_info, None) } - .expect("Failed to create DRM surface"); - - Ok(self.create_surface_from_vk_surface_khr(surface)) - } -} diff --git a/third_party/rust/wgpu-hal/src/vulkan/instance.rs b/third_party/rust/wgpu-hal/src/vulkan/instance.rs index 073f438c2ea6..a67781dba730 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/instance.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/instance.rs @@ -34,8 +34,10 @@ unsafe extern "system" fn debug_utils_messenger_callback( // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671 // Versions 1.3.240 through 1.3.250 return a spurious error here if // the debug range start and end appear in different command buffers. + const KHRONOS_VALIDATION_LAYER: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Khronos Validation Layer\0") }; if let Some(layer_properties) = user_data.validation_layer_properties.as_ref() { - if layer_properties.layer_description.as_ref() == c"Khronos Validation Layer" + if layer_properties.layer_description.as_ref() == KHRONOS_VALIDATION_LAYER && layer_properties.layer_spec_version >= vk::make_api_version(0, 1, 3, 240) && layer_properties.layer_spec_version <= vk::make_api_version(0, 1, 3, 250) { @@ -257,13 +259,6 @@ impl super::Instance { // VK_KHR_surface extensions.push(khr::surface::NAME); - // Extensions needed for drm support - extensions.push(khr::display::NAME); - extensions.push(ext::physical_device_drm::NAME); - extensions.push(khr::get_display_properties2::NAME); - extensions.push(ext::direct_mode_display::NAME); - extensions.push(ext::acquire_drm_display::NAME); - // Platform-specific WSI extensions if cfg!(all( unix, @@ -557,10 +552,7 @@ impl super::Instance { Ok(self.create_surface_from_vk_surface_khr(surface)) } - pub(super) fn create_surface_from_vk_surface_khr( - &self, - surface: vk::SurfaceKHR, - ) -> super::Surface { + fn create_surface_from_vk_surface_khr(&self, surface: vk::SurfaceKHR) -> super::Surface { let functor = khr::surface::Instance::new(&self.shared.entry, &self.shared.raw); super::Surface { raw: surface, @@ -619,7 +611,7 @@ impl crate::Instance for super::Instance { let app_info = vk::ApplicationInfo::default() .application_name(app_name.as_c_str()) .application_version(1) - .engine_name(c"wgpu-hal") + .engine_name(CStr::from_bytes_with_nul(b"wgpu-hal\0").unwrap()) .engine_version(2) .api_version( // Vulkan 1.0 doesn't like anything but 1.0 passed in here... @@ -661,7 +653,8 @@ impl crate::Instance for super::Instance { .find(|inst_layer| inst_layer.layer_name_as_c_str() == Ok(name)) } - let validation_layer_name = c"VK_LAYER_KHRONOS_validation"; + let validation_layer_name = + CStr::from_bytes_with_nul(b"VK_LAYER_KHRONOS_validation\0").unwrap(); let validation_layer_properties = find_layer(&instance_layers, validation_layer_name); // Determine if VK_EXT_validation_features is available, so we can enable @@ -685,9 +678,11 @@ impl crate::Instance for super::Instance { .intersects(wgt::InstanceFlags::GPU_BASED_VALIDATION) && validation_features_are_enabled; - let has_nv_optimus = find_layer(&instance_layers, c"VK_LAYER_NV_optimus").is_some(); + let nv_optimus_layer = CStr::from_bytes_with_nul(b"VK_LAYER_NV_optimus\0").unwrap(); + let has_nv_optimus = find_layer(&instance_layers, nv_optimus_layer).is_some(); - let has_obs_layer = find_layer(&instance_layers, c"VK_LAYER_OBS_HOOK").is_some(); + let obs_layer = CStr::from_bytes_with_nul(b"VK_LAYER_OBS_HOOK\0").unwrap(); + let has_obs_layer = find_layer(&instance_layers, obs_layer).is_some(); let mut layers: Vec<&'static CStr> = Vec::new(); diff --git a/third_party/rust/wgpu-hal/src/vulkan/mod.rs b/third_party/rust/wgpu-hal/src/vulkan/mod.rs index ef349c7b2666..f052d1c25a31 100644 --- a/third_party/rust/wgpu-hal/src/vulkan/mod.rs +++ b/third_party/rust/wgpu-hal/src/vulkan/mod.rs @@ -30,7 +30,6 @@ mod adapter; mod command; mod conv; mod device; -mod drm; mod instance; mod sampler; @@ -465,7 +464,7 @@ pub struct Adapter { //queue_families: Vec, known_memory_flags: vk::MemoryPropertyFlags, phd_capabilities: adapter::PhysicalDeviceProperties, - phd_features: adapter::PhysicalDeviceFeatures, + //phd_features: adapter::PhysicalDeviceFeatures, downlevel_flags: wgt::DownlevelFlags, private_caps: PrivateCapabilities, workarounds: Workarounds, @@ -484,7 +483,6 @@ struct DeviceExtensionFunctions { draw_indirect_count: Option, timeline_semaphore: Option>, ray_tracing: Option, - mesh_shading: Option, } struct RayTracingDeviceExtensionFunctions { @@ -773,12 +771,6 @@ pub struct Queue { signal_semaphores: Mutex<(Vec, Vec)>, } -impl Queue { - pub fn as_raw(&self) -> vk::Queue { - self.raw - } -} - impl Drop for Queue { fn drop(&mut self) { unsafe { self.relay_semaphores.lock().destroy(&self.device.raw) }; diff --git a/third_party/rust/wgpu-types/.cargo-checksum.json b/third_party/rust/wgpu-types/.cargo-checksum.json index f11b00b2656e..166f98258d96 100644 --- a/third_party/rust/wgpu-types/.cargo-checksum.json +++ b/third_party/rust/wgpu-types/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"f15aa3cb2e106f34630ff279f9dbb19021e1303266966bbac2e943abe712e73e","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","src/assertions.rs":"e4d2d40bc1e870a59637f4b9574743e19565a62f6dbcc21cb18a76b666b796eb","src/counters.rs":"ded6ed268bfd7161f06509aae3947650507ba69d72394f68b019b6fa8b324d2d","src/env.rs":"26ffc91867625784159bcf391881187aa92cf92b81b1f40959ce1b96ae6d554d","src/features.rs":"ac55c10a32ae85f763a96a87775270a0187fac4e927f112e454044ca92c965f2","src/instance.rs":"ac6dfd5377e0f43d3261f55b4a6c969d7a7c79e5da5ec11d0d0deb0f461e2269","src/lib.rs":"a66ff638390e3864e1d915b110993a72566de8cc495e9b92e169b7068e06a998","src/math.rs":"3046121800bded318b7d219aea401907e7d3bba3b998df6745a71e76f0734de2"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"2dbf2882e87978e2e8b136dc5e6752c4c184308eb8cdefd5d668246b1700a1c1","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","src/assertions.rs":"e4d2d40bc1e870a59637f4b9574743e19565a62f6dbcc21cb18a76b666b796eb","src/counters.rs":"ded6ed268bfd7161f06509aae3947650507ba69d72394f68b019b6fa8b324d2d","src/env.rs":"26ffc91867625784159bcf391881187aa92cf92b81b1f40959ce1b96ae6d554d","src/features.rs":"7ea54e481422fcc185feaa316c2e42b30c5d257933f14d604fe19938be61315d","src/instance.rs":"ac6dfd5377e0f43d3261f55b4a6c969d7a7c79e5da5ec11d0d0deb0f461e2269","src/lib.rs":"d0f8a545b3fa7007a1e55cda50fd6ca7a18c1ac6b8042eff5b80b95e35496a38","src/math.rs":"3046121800bded318b7d219aea401907e7d3bba3b998df6745a71e76f0734de2"},"package":null} \ No newline at end of file diff --git a/third_party/rust/wgpu-types/Cargo.toml b/third_party/rust/wgpu-types/Cargo.toml index 1fd8182f0565..8d3044231644 100644 --- a/third_party/rust/wgpu-types/Cargo.toml +++ b/third_party/rust/wgpu-types/Cargo.toml @@ -11,7 +11,7 @@ [package] edition = "2021" -rust-version = "1.82.0" +rust-version = "1.76" name = "wgpu-types" version = "24.0.0" authors = ["gfx-rs developers"] @@ -61,7 +61,7 @@ name = "wgpu_types" path = "src/lib.rs" [dependencies.bitflags] -version = "2.9" +version = "2.7" features = ["serde"] [dependencies.log] diff --git a/third_party/rust/wgpu-types/src/features.rs b/third_party/rust/wgpu-types/src/features.rs index 1ffe3a016d2d..9724c6dd2a50 100644 --- a/third_party/rust/wgpu-types/src/features.rs +++ b/third_party/rust/wgpu-types/src/features.rs @@ -1153,32 +1153,6 @@ bitflags_array! { /// /// This is a native only feature. const UNIFORM_BUFFER_BINDING_ARRAYS = 1 << 46; - - /// Enables mesh shaders and task shaders in mesh shader pipelines. - /// - /// Supported platforms: - /// - Vulkan (with [VK_EXT_mesh_shader](https://registry.khronos.org/vulkan/specs/latest/man/html/VK_EXT_mesh_shader.html)) - /// - /// Potential Platforms: - /// - DX12 - /// - Metal - /// - /// This is a native only feature. - const MESH_SHADER = 1 << 47; - /// ***THIS IS EXPERIMENTAL:*** Features enabled by this may have - /// major bugs in them and are expected to be subject to breaking changes, suggestions - /// for the API exposed by this should be posted on [the ray-tracing issue](https://github.com/gfx-rs/wgpu/issues/6762) - /// - /// Allows for returning of the hit triangle's vertex position when tracing with an - /// acceleration structure marked with [`AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN`]. - /// - /// Supported platforms: - /// - Vulkan - /// - /// This is a native only feature - /// - /// [`AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN`]: super::AccelerationStructureFlags::ALLOW_RAY_HIT_VERTEX_RETURN - const EXPERIMENTAL_RAY_HIT_VERTEX_RETURN = 1 << 48; } /// Features that are not guaranteed to be supported. diff --git a/third_party/rust/wgpu-types/src/lib.rs b/third_party/rust/wgpu-types/src/lib.rs index e88773348711..9587216deea8 100644 --- a/third_party/rust/wgpu-types/src/lib.rs +++ b/third_party/rust/wgpu-types/src/lib.rs @@ -17,6 +17,7 @@ extern crate alloc; use alloc::{string::String, vec, vec::Vec}; use core::{ hash::{Hash, Hasher}, + mem::size_of, num::NonZeroU32, ops::Range, }; @@ -6495,24 +6496,12 @@ pub enum BindingType { /// var as: acceleration_structure; /// ``` /// - /// or with vertex return enabled - /// ```rust,ignore - /// @group(0) @binding(0) - /// var as: acceleration_structure; - /// ``` - /// /// Example GLSL syntax: /// ```cpp,ignore /// layout(binding = 0) /// uniform accelerationStructureEXT as; /// ``` - AccelerationStructure { - /// Whether this acceleration structure can be used to - /// create a ray query that has flag vertex return in the shader - /// - /// If enabled requires [`Features::EXPERIMENTAL_RAY_HIT_VERTEX_RETURN`] - vertex_return: bool, - }, + AccelerationStructure, } impl BindingType { @@ -7295,8 +7284,6 @@ bitflags::bitflags!( /// Use `BlasTriangleGeometry::transform_buffer` when building a BLAS (only allowed in /// BLAS creation) const USE_TRANSFORM = 1 << 5; - /// Allow retrieval of the vertices of the triangle hit by a ray. - const ALLOW_RAY_HIT_VERTEX_RETURN = 1 << 6; } ); diff --git a/tools/tryselect/try_presets.yml b/tools/tryselect/try_presets.yml index e0e7dc84c911..3669228d4392 100644 --- a/tools/tryselect/try_presets.yml +++ b/tools/tryselect/try_presets.yml @@ -369,10 +369,9 @@ webgpu: description: >- Runs the tests relevant to WebGPU. query: - - "'webgpu !cf !devedition !shippable !nofis" + - "'webgpu" - "source-test-mozlint-updatebot" - "source-test-vendor-rust" - full: true webrender: selector: fuzzy