tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 6b6ff145718719ff0a6622d5d659b60f4e003c49
parent 13fe605280dc2e556a56399d3e5949d46d785647
Author: Erich Gubler <erichdongubler@gmail.com>
Date:   Wed, 29 Oct 2025 02:50:27 +0000

Bug 1996957 - build(webgpu): update WGPU to d8f97261d23e436be75884f792b5931b383c4041 r=webgpu-reviewers,supply-chain-reviewers,aleiserson

Differential Revision: https://phabricator.services.mozilla.com/D270400

Diffstat:
M.cargo/config.toml.in | 4++--
MCargo.lock | 12++++++------
Mgfx/wgpu_bindings/Cargo.toml | 12++++++------
Mgfx/wgpu_bindings/moz.yaml | 4++--
Mgfx/wgpu_bindings/src/server.rs | 1+
Msupply-chain/audits.toml | 18++++++++++++------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/encoding/cmds/setBindGroup/cts.https.html.ini | 38++++++--------------------------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini | 53++++++++++++++++++++++++++++++++++-------------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupAdd/cts.https.html.ini | 1+
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini | 2+-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini | 12++++++++++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini | 54++++++++++++++++++++++++++++++++++++++++++++----------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini | 14++++++++++++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleBias/cts.https.html.ini | 6++++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini | 3++-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini | 39+++++++++++++++++++++++----------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini | 6+++++-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini | 60+++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/types/textures/cts.https.html.ini | 356++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini | 9++++++---
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini | 24+++++++++++++-----------
Mthird_party/rust/wgpu-core/.cargo-checksum.json | 4++--
Mthird_party/rust/wgpu-core/src/pipeline_cache.rs | 1+
Mthird_party/rust/wgpu-hal/.cargo-checksum.json | 4++--
Mthird_party/rust/wgpu-hal/Cargo.toml | 2++
Mthird_party/rust/wgpu-hal/src/dx12/adapter.rs | 151++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/rust/wgpu-hal/src/gles/adapter.rs | 1+
Mthird_party/rust/wgpu-hal/src/metal/mod.rs | 1+
Mthird_party/rust/wgpu-hal/src/noop/mod.rs | 1+
Mthird_party/rust/wgpu-hal/src/vulkan/adapter.rs | 140++++++++++++++++---------------------------------------------------------------
Mthird_party/rust/wgpu-hal/src/vulkan/device.rs | 126+------------------------------------------------------------------------------
Mthird_party/rust/wgpu-hal/src/vulkan/instance.rs | 210+++++++++----------------------------------------------------------------------
Mthird_party/rust/wgpu-hal/src/vulkan/mod.rs | 473++++++++++++-------------------------------------------------------------------
Mthird_party/rust/wgpu-hal/src/vulkan/semaphore_list.rs | 140++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
Athird_party/rust/wgpu-hal/src/vulkan/swapchain/mod.rs | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athird_party/rust/wgpu-hal/src/vulkan/swapchain/native.rs | 904+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/rust/wgpu-types/.cargo-checksum.json | 4++--
Mthird_party/rust/wgpu-types/src/lib.rs | 7+++++++
38 files changed, 2012 insertions(+), 992 deletions(-)

diff --git 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=18f4ed66c004d68003528510a0726d86a56acb9c"] +[source."git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041"] git = "https://github.com/gfx-rs/wgpu" -rev = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" replace-with = "vendored-sources" [source."git+https://github.com/glandium/allocator-api2?rev=ad5f3d56a5a4519eff52af4ff85293431466ef5c"] diff --git a/Cargo.lock b/Cargo.lock @@ -4733,7 +4733,7 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664" [[package]] name = "naga" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "arrayvec", "bit-set", @@ -7892,7 +7892,7 @@ dependencies = [ [[package]] name = "wgpu-core" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "arrayvec", "bit-set", @@ -7922,7 +7922,7 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "wgpu-hal", ] @@ -7930,7 +7930,7 @@ dependencies = [ [[package]] name = "wgpu-core-deps-windows-linux-android" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "wgpu-hal", ] @@ -7938,7 +7938,7 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "android_system_properties", "arrayvec", @@ -7976,7 +7976,7 @@ dependencies = [ [[package]] name = "wgpu-types" version = "27.0.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=18f4ed66c004d68003528510a0726d86a56acb9c#18f4ed66c004d68003528510a0726d86a56acb9c" +source = "git+https://github.com/gfx-rs/wgpu?rev=d8f97261d23e436be75884f792b5931b383c4041#d8f97261d23e436be75884f792b5931b383c4041" dependencies = [ "bitflags 2.9.0", "bytemuck", diff --git 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 = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" features = ["serde", "trace", "strict_asserts", "wgsl", "api_log_info"] # We want the wgpu-core Metal backend on macOS and iOS. @@ -25,32 +25,32 @@ features = ["serde", "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 = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" 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 = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" 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 = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" features = ["vulkan"] [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" [dependencies.wgh] package = "wgpu-hal" git = "https://github.com/gfx-rs/wgpu" -rev = "18f4ed66c004d68003528510a0726d86a56acb9c" +rev = "d8f97261d23e436be75884f792b5931b383c4041" features = ["device_lost_panic", "internal_error_panic"] [target.'cfg(windows)'.dependencies] diff --git a/gfx/wgpu_bindings/moz.yaml b/gfx/wgpu_bindings/moz.yaml @@ -8,8 +8,8 @@ origin: name: wgpu description: A cross-platform pure-Rust graphics API, modeled on the WebGPU standard url: https://github.com/gfx-rs/wgpu - release: commit 18f4ed66c004d68003528510a0726d86a56acb9c - revision: 18f4ed66c004d68003528510a0726d86a56acb9c + release: d8f97261d23e436be75884f792b5931b383c4041 (2025-10-27T10:59:42Z). + revision: d8f97261d23e436be75884f792b5931b383c4041 license: ['MIT', 'Apache-2.0'] updatebot: diff --git a/gfx/wgpu_bindings/src/server.rs b/gfx/wgpu_bindings/src/server.rs @@ -2665,6 +2665,7 @@ unsafe fn process_message( driver_info, backend, transient_saves_memory, + device_pci_bus_id: _, } = global.adapter_get_info(adapter_id); let is_hardware = match device_type { diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml @@ -4332,9 +4332,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.net2]] @@ -6868,9 +6869,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.wgpu-core-deps-apple]] @@ -6898,9 +6900,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.wgpu-core-deps-windows-linux-android]] @@ -6928,9 +6931,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.wgpu-hal]] @@ -7036,9 +7040,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.wgpu-types]] @@ -7139,9 +7144,10 @@ who = [ "Andy Leiserson <aleiserson@mozilla.com>", "Jim Blandy <jimb@red-bean.com>", "Teodor Tanasoaia <ttanasoaia@mozilla.com>", + "Erich Gubler <erichdongubler@gmail.com>", ] criteria = "safe-to-deploy" -delta = "27.0.0 -> 27.0.0@git:18f4ed66c004d68003528510a0726d86a56acb9c" +delta = "27.0.0 -> 27.0.0@git:d8f97261d23e436be75884f792b5931b383c4041" importable = false [[audits.whatsys]] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/encoding/cmds/setBindGroup/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/encoding/cmds/setBindGroup/cts.https.html.ini @@ -170,21 +170,11 @@ [cts.https.html?q=webgpu:api,validation,encoding,cmds,setBindGroup:state_and_binding_index:*] implementation-status: backlog - expected: - if os == "linux" and not debug: [OK, CRASH] [:encoderType="compute%20pass";state="destroyed";resourceType="buffer"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="compute%20pass";state="destroyed";resourceType="texture"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="compute%20pass";state="invalid";resourceType="buffer"] expected: @@ -203,18 +193,10 @@ if os == "win" and debug: [PASS, FAIL] [:encoderType="render%20bundle";state="destroyed";resourceType="buffer"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="render%20bundle";state="destroyed";resourceType="texture"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="render%20bundle";state="invalid";resourceType="buffer"] expected: @@ -233,18 +215,10 @@ if os == "win" and debug: [PASS, FAIL] [:encoderType="render%20pass";state="destroyed";resourceType="buffer"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="render%20pass";state="destroyed";resourceType="texture"] - expected: - if os == "win": FAIL - if os == "linux" and debug: [PASS, FAIL] - if os == "linux" and not debug: FAIL - if os == "mac": FAIL + expected: FAIL [:encoderType="render%20pass";state="invalid";resourceType="buffer"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini @@ -4508,12 +4508,12 @@ [:format="rg8sint";usageType="render";usageCopy="none";awaitLost=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="render";usageCopy="none";awaitLost=true] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="render";usageCopy="src";awaitLost=false] @@ -4523,7 +4523,7 @@ [:format="rg8sint";usageType="render";usageCopy="src";awaitLost=true] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="render";usageCopy="src-dest";awaitLost=false] @@ -4538,44 +4538,49 @@ [:format="rg8sint";usageType="storage";usageCopy="dst";awaitLost=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="dst";awaitLost=true] expected: - if os == "win": FAIL + if os == "win" and debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="none";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="none";awaitLost=true] expected: - if os == "win": FAIL + if os == "win" and debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="src";awaitLost=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="src";awaitLost=true] expected: - if os == "win": FAIL + if os == "win" and debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="src-dest";awaitLost=false] expected: - if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="rg8sint";usageType="storage";usageCopy="src-dest";awaitLost=true] expected: - if os == "win": FAIL + if os == "win" and debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [FAIL, TIMEOUT, NOTRUN] @@ -5852,7 +5857,7 @@ [:format="rgba8uint";usageType="render";usageCopy="dst";awaitLost=true] expected: if os == "win" and debug: [PASS, FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux": [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] @@ -6968,47 +6973,57 @@ [:format="astc-5x5-unorm-srgb";usageType="texture";usageCopy="src-dest";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:format="astc-5x5-unorm-srgb";usageType="texture";usageCopy="src-dest";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="dst";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="dst";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="none";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="none";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="src";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="src";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="src-dest";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm";usageType="texture";usageCopy="src-dest";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="dst";awaitLost=false] @@ -7023,18 +7038,22 @@ [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="none";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="none";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="src";awaitLost=false] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="src";awaitLost=true] expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:format="astc-6x5-unorm-srgb";usageType="texture";usageCopy="src-dest";awaitLost=false] @@ -8021,15 +8040,13 @@ [:format="r16float";usageType="render";usageCopy="dst";awaitLost=false] expected: - if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="render";usageCopy="dst";awaitLost=true] expected: - if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] @@ -8059,15 +8076,13 @@ [:format="r16float";usageType="render";usageCopy="src-dest";awaitLost=false] expected: - if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="render";usageCopy="src-dest";awaitLost=true] expected: - if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupAdd/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupAdd/cts.https.html.ini @@ -9391,6 +9391,7 @@ [:case=741;type="f16";wgSize=[128,1,1\]] expected: if os == "win": [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:case=741;type="f16";wgSize=[64,2,1\]] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini @@ -9163,7 +9163,7 @@ [:case=369;type="f32";op="subgroupMax";wgSize=[128,1,1\]] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini @@ -9779,10 +9779,18 @@ [:case=74;type="f32";wgSize=[64,2,1\]] [:case=750;type="f16";wgSize=[128,1,1\]] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:case=750;type="f16";wgSize=[64,2,1\]] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:case=750;type="f32";wgSize=[128,1,1\]] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini @@ -5542,7 +5542,8 @@ [:stage="c";format="bc1-rgba-unorm";filt="nearest";modeU="m";modeV="c";offset=true] expected: - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="c";format="bc1-rgba-unorm";filt="nearest";modeU="m";modeV="m";offset=false] @@ -5557,7 +5558,8 @@ [:stage="c";format="bc1-rgba-unorm";filt="nearest";modeU="m";modeV="r";offset=false] expected: - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="c";format="bc1-rgba-unorm";filt="nearest";modeU="m";modeV="r";offset=true] @@ -35731,7 +35733,11 @@ if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x6-unorm-srgb";filt="linear";mode="m"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x6-unorm-srgb";filt="linear";mode="r"] expected: @@ -35762,22 +35768,46 @@ if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="linear";mode="c"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="linear";mode="m"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="linear";mode="r"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="nearest";mode="c"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="nearest";mode="m"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm";filt="nearest";mode="r"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm-srgb";filt="linear";mode="c"] expected: [TIMEOUT, NOTRUN] @@ -35789,7 +35819,11 @@ expected: [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm-srgb";filt="nearest";mode="c"] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="v";format="astc-8x8-unorm-srgb";filt="nearest";mode="m"] expected: [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini @@ -5035,7 +5035,8 @@ [:format="bc3-rgba-unorm";filt="nearest";modeU="m";modeV="c";offset=false] expected: - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm";filt="nearest";modeU="m";modeV="c";offset=true] @@ -30081,7 +30082,7 @@ expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:format="bgra8unorm-srgb";dim="3d";filt="linear";modeU="r";modeV="c";modeW="r";offset=false] @@ -57729,16 +57730,19 @@ [:format="bc3-rgba-unorm";filt="linear";mode="c"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm";filt="linear";mode="m"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm";filt="linear";mode="r"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm";filt="nearest";mode="c"] @@ -57759,31 +57763,37 @@ [:format="bc3-rgba-unorm-srgb";filt="linear";mode="c"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm-srgb";filt="linear";mode="m"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm-srgb";filt="linear";mode="r"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="c"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="m"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm-srgb";filt="nearest";mode="r"] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] [:format="bc4-r-snorm";filt="linear";mode="c"] 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 @@ -41689,7 +41689,8 @@ [:format="bgra8unorm-srgb";dim="3d";filt="linear";modeU="m";modeV="m";modeW="c";offset=true] expected: - if os == "win": FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL if os == "linux": [TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] @@ -41709,7 +41710,8 @@ [:format="bgra8unorm-srgb";dim="3d";filt="linear";modeU="m";modeV="m";modeW="r";offset=false] expected: - if os == "win": FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL if os == "linux": [TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] 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 @@ -979,7 +979,8 @@ [:format="depth24plus";filt="nearest";modeU="m";modeV="c";offset=false] expected: if os == "win": FAIL - if os == "linux": 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 diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini @@ -1598,7 +1598,8 @@ [:stage="v";format="depth24plus";filt="linear";modeU="c";modeV="m";offset=false] expected: if os == "win": FAIL - if os == "linux": 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: [PASS, FAIL, TIMEOUT, NOTRUN] @@ -1613,14 +1614,16 @@ [:stage="v";format="depth24plus";filt="linear";modeU="c";modeV="r";offset=false] expected: if os == "win": FAIL - if os == "linux": 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: [PASS, FAIL, TIMEOUT, NOTRUN] [:stage="v";format="depth24plus";filt="linear";modeU="c";modeV="r";offset=true] expected: if os == "win": FAIL - if os == "linux": 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: [PASS, FAIL, TIMEOUT, NOTRUN] @@ -3226,16 +3229,14 @@ [:stage="c";format="depth24plus";filt="nearest";modeU="r";modeV="m";offset=false] expected: - if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win": FAIL if os == "linux": FAIL if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac" and not debug: FAIL [:stage="c";format="depth24plus";filt="nearest";modeU="r";modeV="m";offset=true] expected: - if os == "win" and debug: [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: [FAIL, TIMEOUT, NOTRUN] @@ -4209,14 +4210,16 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus";filt="linear";modeU="m";modeV="m";offset=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus";filt="linear";modeU="m";modeV="r";offset=false] @@ -4231,7 +4234,8 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus";filt="linear";modeU="r";modeV="c";offset=false] @@ -4563,14 +4567,16 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus-stencil8";filt="nearest";modeU="c";modeV="c";offset=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus-stencil8";filt="nearest";modeU="c";modeV="m";offset=false] @@ -4593,7 +4599,8 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="depth24plus-stencil8";filt="nearest";modeU="c";modeV="r";offset=true] @@ -4625,7 +4632,7 @@ [:stage="f";format="depth24plus-stencil8";filt="nearest";modeU="m";modeV="m";offset=false] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -4652,7 +4659,7 @@ [:stage="f";format="depth24plus-stencil8";filt="nearest";modeU="m";modeV="r";offset=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -6393,7 +6400,7 @@ [:stage="v";format="depth32float-stencil8";filt="linear";mode="r"] expected: - if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL if os == "linux": FAIL if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] 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 @@ -54257,7 +54257,11 @@ if os == "mac": [TIMEOUT, NOTRUN] [:stage="c";format="r16unorm";dim="3d";filt="nearest";modeU="m";modeV="m";modeW="r";offset=true] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="c";format="r16unorm";dim="3d";filt="nearest";modeU="m";modeV="r";modeW="c";offset=false] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini @@ -592,8 +592,7 @@ [:stage="f";format="depth24plus";viewDimension="cube";mode="m"] expected: - if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win": FAIL if os == "linux": FAIL if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: FAIL @@ -608,8 +607,7 @@ [:stage="f";format="depth24plus";viewDimension="cube-array";A="i32";mode="c"] expected: - if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "win" and not debug: FAIL + if os == "win": FAIL if os == "linux": FAIL if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, FAIL] @@ -45821,6 +45819,7 @@ [:stage="v";format="rg16float";dim="cube";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -46022,41 +46021,49 @@ [:stage="v";format="rgba16snorm";dim="3d";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16snorm";dim="3d";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16snorm";dim="cube";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16snorm";dim="cube";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16unorm";dim="3d";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16unorm";dim="3d";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16unorm";dim="cube";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rgba16unorm";dim="cube";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -55829,7 +55836,11 @@ expected: [TIMEOUT, NOTRUN] [:stage="f";format="r16float";dim="3d";filt="linear";mode="c";offset=false] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="r16float";dim="3d";filt="linear";mode="c";offset=true] expected: [TIMEOUT, NOTRUN] @@ -89676,18 +89687,21 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x5-unorm-srgb";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x5-unorm-srgb";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x5-unorm-srgb";filt="nearest";mode="c"] @@ -89700,6 +89714,7 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x5-unorm-srgb";filt="nearest";mode="r"] @@ -89712,186 +89727,217 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="linear";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-6x6-unorm-srgb";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="linear";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="linear";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x5-unorm-srgb";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="linear";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="linear";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="linear";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm-srgb";filt="linear";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm-srgb";filt="linear";mode="m"] @@ -89905,24 +89951,28 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm-srgb";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm-srgb";filt="nearest";mode="m"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x6-unorm-srgb";filt="nearest";mode="r"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="f";format="astc-8x8-unorm";filt="linear";mode="c"] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/types/textures/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/types/textures/cts.https.html.ini @@ -35,7 +35,7 @@ tags: [webgpu, webgpu-long] implementation-status: backlog expected: - if os == "win" and not debug: [OK, ERROR] + if os == "win" and not debug: [OK, TIMEOUT] [:access="read";format="astc-10x10-unorm";comma=""] [:access="read";format="astc-10x10-unorm";comma=","] @@ -949,272 +949,540 @@ [:access="read_write";format="stencil8";comma=","] [:access="storage";format="astc-10x10-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x10-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x10-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x10-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x5-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x5-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x5-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x5-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x6-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x6-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x6-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x6-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x8-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x8-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x8-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-10x8-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x10-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x10-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x10-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x10-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x12-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x12-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x12-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-12x12-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-4x4-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-4x4-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-4x4-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-4x4-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x4-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x4-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x4-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x4-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x5-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x5-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x5-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-5x5-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x5-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x5-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x5-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x5-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x6-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x6-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x6-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-6x6-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x5-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x5-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x5-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x5-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x6-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x6-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x6-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x6-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x8-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x8-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x8-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="astc-8x8-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc1-rgba-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc1-rgba-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc1-rgba-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc1-rgba-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc2-rgba-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc2-rgba-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc2-rgba-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc2-rgba-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc3-rgba-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc3-rgba-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc3-rgba-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc3-rgba-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc4-r-snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc4-r-snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc4-r-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc4-r-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc5-rg-snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc5-rg-snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc5-rg-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc5-rg-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc6h-rgb-float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc6h-rgb-float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc6h-rgb-ufloat";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc6h-rgb-ufloat";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc7-rgba-unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc7-rgba-unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc7-rgba-unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bc7-rgba-unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bgra8unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bgra8unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bgra8unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="bgra8unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth16unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth16unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth24plus";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth24plus";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth24plus-stencil8";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth24plus-stencil8";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth32float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth32float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth32float-stencil8";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="depth32float-stencil8";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-r11snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-r11snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-r11unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-r11unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-rg11snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-rg11snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-rg11unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="eac-rg11unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8a1unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8a1unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8a1unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8a1unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgb8unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgba8unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgba8unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgba8unorm-srgb";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="etc2-rgba8unorm-srgb";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r16unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r32uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="r8sint";comma=""] @@ -1233,40 +1501,76 @@ [:access="storage";format="r8unorm";comma=","] [:access="storage";format="rg11b10ufloat";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg11b10ufloat";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg16unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg32uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rg8sint";comma=""] @@ -1285,52 +1589,98 @@ [:access="storage";format="rg8unorm";comma=","] [:access="storage";format="rgb10a2uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgb10a2uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgb10a2unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgb10a2unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgb9e5ufloat";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgb9e5ufloat";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16snorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16snorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16unorm";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba16unorm";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32float";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32float";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32sint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32uint";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba32uint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba8sint";comma=""] [:access="storage";format="rgba8sint";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="rgba8snorm";comma=""] @@ -1349,8 +1699,12 @@ [:access="storage";format="rgba8unorm-srgb";comma=","] [:access="storage";format="stencil8";comma=""] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="storage";format="stencil8";comma=","] + expected: + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] [:access="write";format="astc-10x10-unorm";comma=""] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini @@ -1823,7 +1823,8 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rg16float";dstPremultiplied=false] @@ -1929,13 +1930,15 @@ [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rgba32float";dstPremultiplied=false] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rgba32float";dstPremultiplied=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] - if os == "linux": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rgba8unorm";dstPremultiplied=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini @@ -1419,35 +1419,36 @@ [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] @@ -1599,7 +1600,7 @@ [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: @@ -1611,19 +1612,20 @@ [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: - if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] diff --git a/third_party/rust/wgpu-core/.cargo-checksum.json b/third_party/rust/wgpu-core/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"14fc314e094524575e12773badac343c650bfd0c983d828539a4ac887a64bbf6","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","build.rs":"5e3619e28faeac243cbae1a5f739ad15035dc9e1254957b64fd1deed6f393c8a","src/as_hal.rs":"5d08d8e49b016abb662957d8e42ab748d580a2f3e449caeeb7311f222b8818f6","src/binding_model.rs":"9943f0814b697f446ee374343a980e49ca2f8fae1bb1955ba889eb0bee4b1f3b","src/command/allocator.rs":"386cb6e60bd332a881dbbe57ff66a0fa83f35e3ee924559f1689418ac6c7273a","src/command/bind.rs":"060bca4de8e8f2ed3157e702e77eecedd9c5f6eab68c3c07b59b23191308346e","src/command/bundle.rs":"d078bb708cbdea42ebebc5c5a510bff3cad982b67be3682ed5956bfb212114f1","src/command/clear.rs":"932afc6e1858f8c93d3ecf721215a0bc584a8e613444641a98f5cb98e3061b4b","src/command/compute.rs":"2316e2e0409cffdc9b28fc28491e78e8fbaf4ea317ea2a92b27b5a22be38292d","src/command/compute_command.rs":"18aa0b8e389a5d345243b876b1abbacfc998a19d23069e092183fa7be10fa0ab","src/command/draw.rs":"e7bf195d33683a19b077e64d181cb27b8acde724732ac9af3c94d83c3f21559e","src/command/encoder.rs":"7655f8c248120f39e37f3ad0f84bd9816df78a75657790ab12d5aba144fef65f","src/command/encoder_command.rs":"4e1d28040d9330a803644e377bd7675ec503cd0396c31394658dc67d71a4b50f","src/command/ffi.rs":"1fb626579a7726a32d571a17a14f2656def0c170f4f6297e7e51772a6fc5a566","src/command/memory_init.rs":"f68a796c4262d261620cf85e5762e267dee013f4ef5d61f67fcb173b59048983","src/command/mod.rs":"0c650f854bbf48b25c00ff4b3423b0e33abc7199a4a423d39ae155cc694deb47","src/command/pass.rs":"ece99f1a023d03e8f293c9533e90f1762945988819bfb35d6f182bdb1997faf8","src/command/query.rs":"fa7cb51fbbaa50febe0e61c473891d4131125c290180a05d49b60f5138931fb4","src/command/ray_tracing.rs":"bcb785a0845ecccc87411037fac234474429beba9cd67ba33d55476716e25dca","src/command/render.rs":"5cf2e50dfa16426624a3d6b4a6207025c8fbe6a76bb96671ef19fe8337dc95ee","src/command/render_command.rs":"3f1bc2fec688fa3f33052867eeb2e194020a643f7d16f6111b8b128594c38570","src/command/timestamp_writes.rs":"da06fb07b8d0917be3e7fb9212d0ffc6b16526e1c1df617213ef354c3e1fb446","src/command/transfer.rs":"28fdca903934d7e2e5d12d28f952ad3e9ef804c8452f9d020831b5e6aca7e19d","src/command/transition_resources.rs":"753cb02adfee4758404c403d19fd76e6c8de77de01435a2cbe2f60bdbe44bde1","src/conv.rs":"4e4115429df502099f7230d47a050d307f6237c7c11c9c90cba9e34dc909ebdd","src/device/bgl.rs":"b081fe1393f1dd917151efc3a10ee0269fecd3920eac3b45411c1197a98c5a06","src/device/global.rs":"e6ca310ed5f0ed4bd369d25b0f6ee6711624484f35c9fd533111f603aae25618","src/device/life.rs":"44bd34cf5ab1c1a21729f2188df6d2ca0238f11c5f723380c8a4a16fbbd90b88","src/device/mod.rs":"dc8271ae7b62e1096f1a9068f671e6ed8cf7a11b5f9987066d5c173c6e4c4ad8","src/device/queue.rs":"0a883c00acef68fe05d309ec68a5df0c920965074c9c5fa4753b7861d279c4fe","src/device/ray_tracing.rs":"cb13bc0caf54113ca12ce5db147af339474ec4b2423f2556600b5ea936b408cc","src/device/resource.rs":"039e2b45debf9396038482ae67cdea7bed0bb5fc8ba694941ee61638df11ff1f","src/device/trace.rs":"39e52ee5b220eb6a13d949582f1f87756189648bf2f05ea7148b0a67b73c226f","src/error.rs":"4f07a0b09b30b2d6cbc855d0091d724000f492018af3b41e80befbeccf2a6f4e","src/global.rs":"bd76f9552496996f9eba6502e5caf1bcd6ca33bf3d5008795b5335f74e56fd55","src/hash_utils.rs":"9f57a627fe3f00659391670141df62f68d67922c7b186f2a9a5958ab16fb576f","src/hub.rs":"308c53e05134e5a48294c61511e43077adfdb5c334237de2016ed4537d562382","src/id.rs":"134974aa304d1d0eb7349438b9660519886c513f01d5868cd4331d2bc78f2cb8","src/identity.rs":"712ccda267eb602655c53672a94346aa4c9f88c0044ae6edcd658a814c9a50cf","src/indirect_validation/dispatch.rs":"b15d926e0de732c3c39c965f168f99598fa508ca4b0883061993d99dd644b31a","src/indirect_validation/draw.rs":"6d8338f37f406c6e2cf89713e8493f167e1d8e999737f2976de298810c2ada76","src/indirect_validation/mod.rs":"79466e4f9a59386e833958b3537beed6ffb6a7ee62aaabcf35382c2683998e43","src/indirect_validation/utils.rs":"e6a3b636dd71ff6b01d5abd5a589a0136fb30aa1d517a43f45cf2e5ad54da245","src/indirect_validation/validate_draw.wgsl":"fa7bba5f28c6c181f2d55ecfe386a5e5cd276bcb3c36aa7f963f43c535a9bf9a","src/init_tracker/buffer.rs":"6167a400ab271ba857f1c507e60a46fbd318c185aff87eecf7eb05f7f09b6963","src/init_tracker/mod.rs":"aa87df3428e3b23507377c71eae92dc1dd9f5d5374aa0b03906fb81507fc6ce6","src/init_tracker/texture.rs":"ffdc67d4be23bcd48b22945de94ac0ea8ee571f91eb6d00323b9afe6fa91eef3","src/instance.rs":"e7b9a20e070cc401f75dfe07aceb8f2950a4d99ed8a7d4413ef9f0813f5a8ca1","src/lib.rs":"57d2562e33b04113cc6c2ca3bc9a215ec779a291be82b680ff037fac7d7a8a15","src/lock/mod.rs":"8d3ae3f8d004d7f7d8a3aefe9f30b35669cb8e2409f5fba27b1fcb116b2429c4","src/lock/observing.rs":"5bf62cef9f3ae67e99af640442fadd4e1f762480d990ee69ed9924c9e94a8dce","src/lock/rank.rs":"238e6a97c58ee1a804863c8011bb257864301170344d18596bdaab09f3f74b54","src/lock/ranked.rs":"a95d6bf7f2ef510047a4c33687076beccf38a0148aac3261bd29fa7555e3f488","src/lock/vanilla.rs":"ca8156d4c981473d437db1056487a44c714760d685819eaff8cf82fb0098a608","src/pipeline.rs":"b7aae46522bc6843b0f47dac7e73e33197c76e9724cfb4be3b949bfa27a99fb1","src/pipeline_cache.rs":"41a3a76cb9a10777ace910984cabf80b0b73d103108e2db73c2440a4c0a9c191","src/pool.rs":"e11bfdc73a66321d26715465fa74657dcd26a9b856b80b8369b4aac2132a4295","src/present.rs":"bf0c6c47e58496199955013170f41cbf10755c1572583d5af4b88686c28ffb66","src/ray_tracing.rs":"a4261ccd978e8fab1fef48a168d2d33f8a9f2dae89f285ecd9ec8a6d0894fa3b","src/registry.rs":"ecd457e8956e065050bb9c63ca404505e56ffed6d540b3f14f745d7c4010b205","src/resource.rs":"942a362cc4ef05876870d3bcb0f0db8d2a513be5acacf257c202ee2c0c83a908","src/scratch.rs":"ea5c40e4d18a12f09cc1038f2dcdddb69b13e99275ac987d826658229a39b326","src/snatch.rs":"bf422810afd952894e365cd397763d42d6365ce3c5a5b4c1170566432f462939","src/storage.rs":"29427dea035d03abc8b8abdebecc5591378f1366088d1468ab2beb8536e7d675","src/timestamp_normalization/common.wgsl":"9f65aef0526ff9dde945fae70cef064ad961b0aee4291759ae82974cd2ead0a7","src/timestamp_normalization/mod.rs":"89444ad79900c12c2dc44780f1525cd0554d6ed1d9038938dd0075e8173ae59d","src/timestamp_normalization/timestamp_normalization.wgsl":"4b2202b965e4c67482d03a546ac38c72a602d79ed9a60e6f7217393c49afad49","src/track/blas.rs":"18c7b5b89a60ab49bbc0f4f8b85a24502c1d968714ef4c586095e119848d902a","src/track/buffer.rs":"c64e14aba25291064b1a095c875f94cd053b1d7d3744691c041285328e99f7ac","src/track/metadata.rs":"00b754c2c23b6fbfc11a03aecf0528a38fbfec0ff54f4d9eeaed4043e54884a5","src/track/mod.rs":"67e6fd7c6538c7e3cdd1655e85400320adac559f6c257477985081994edbf5d3","src/track/range.rs":"2688b05a0c6e8510ff6ba3a9623e8b83f433a05ba743129928c56c93d9a9c233","src/track/stateless.rs":"3db699f5f48a319fa07fb16cdf51e1623d6ecac7a476467ee366e014ea665b89","src/track/texture.rs":"3f3295bbc1b41415fceac700e6b494b26c3c673ebc5aa1fe31803197e53b68ea","src/validation.rs":"a4f661cd65a621e1aebf2d5c5aa3d726373647d6cbab36ed8ebdcb42bbecf416","src/weak_vec.rs":"a4193add5912b91226a3155cc613365b7fafdf2e7929d21d68bc19d149696e85"},"package":null} -\ No newline at end of file +{"files":{"Cargo.toml":"14fc314e094524575e12773badac343c650bfd0c983d828539a4ac887a64bbf6","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","build.rs":"5e3619e28faeac243cbae1a5f739ad15035dc9e1254957b64fd1deed6f393c8a","src/as_hal.rs":"5d08d8e49b016abb662957d8e42ab748d580a2f3e449caeeb7311f222b8818f6","src/binding_model.rs":"9943f0814b697f446ee374343a980e49ca2f8fae1bb1955ba889eb0bee4b1f3b","src/command/allocator.rs":"386cb6e60bd332a881dbbe57ff66a0fa83f35e3ee924559f1689418ac6c7273a","src/command/bind.rs":"060bca4de8e8f2ed3157e702e77eecedd9c5f6eab68c3c07b59b23191308346e","src/command/bundle.rs":"d078bb708cbdea42ebebc5c5a510bff3cad982b67be3682ed5956bfb212114f1","src/command/clear.rs":"932afc6e1858f8c93d3ecf721215a0bc584a8e613444641a98f5cb98e3061b4b","src/command/compute.rs":"2316e2e0409cffdc9b28fc28491e78e8fbaf4ea317ea2a92b27b5a22be38292d","src/command/compute_command.rs":"18aa0b8e389a5d345243b876b1abbacfc998a19d23069e092183fa7be10fa0ab","src/command/draw.rs":"e7bf195d33683a19b077e64d181cb27b8acde724732ac9af3c94d83c3f21559e","src/command/encoder.rs":"7655f8c248120f39e37f3ad0f84bd9816df78a75657790ab12d5aba144fef65f","src/command/encoder_command.rs":"4e1d28040d9330a803644e377bd7675ec503cd0396c31394658dc67d71a4b50f","src/command/ffi.rs":"1fb626579a7726a32d571a17a14f2656def0c170f4f6297e7e51772a6fc5a566","src/command/memory_init.rs":"f68a796c4262d261620cf85e5762e267dee013f4ef5d61f67fcb173b59048983","src/command/mod.rs":"0c650f854bbf48b25c00ff4b3423b0e33abc7199a4a423d39ae155cc694deb47","src/command/pass.rs":"ece99f1a023d03e8f293c9533e90f1762945988819bfb35d6f182bdb1997faf8","src/command/query.rs":"fa7cb51fbbaa50febe0e61c473891d4131125c290180a05d49b60f5138931fb4","src/command/ray_tracing.rs":"bcb785a0845ecccc87411037fac234474429beba9cd67ba33d55476716e25dca","src/command/render.rs":"5cf2e50dfa16426624a3d6b4a6207025c8fbe6a76bb96671ef19fe8337dc95ee","src/command/render_command.rs":"3f1bc2fec688fa3f33052867eeb2e194020a643f7d16f6111b8b128594c38570","src/command/timestamp_writes.rs":"da06fb07b8d0917be3e7fb9212d0ffc6b16526e1c1df617213ef354c3e1fb446","src/command/transfer.rs":"28fdca903934d7e2e5d12d28f952ad3e9ef804c8452f9d020831b5e6aca7e19d","src/command/transition_resources.rs":"753cb02adfee4758404c403d19fd76e6c8de77de01435a2cbe2f60bdbe44bde1","src/conv.rs":"4e4115429df502099f7230d47a050d307f6237c7c11c9c90cba9e34dc909ebdd","src/device/bgl.rs":"b081fe1393f1dd917151efc3a10ee0269fecd3920eac3b45411c1197a98c5a06","src/device/global.rs":"e6ca310ed5f0ed4bd369d25b0f6ee6711624484f35c9fd533111f603aae25618","src/device/life.rs":"44bd34cf5ab1c1a21729f2188df6d2ca0238f11c5f723380c8a4a16fbbd90b88","src/device/mod.rs":"dc8271ae7b62e1096f1a9068f671e6ed8cf7a11b5f9987066d5c173c6e4c4ad8","src/device/queue.rs":"0a883c00acef68fe05d309ec68a5df0c920965074c9c5fa4753b7861d279c4fe","src/device/ray_tracing.rs":"cb13bc0caf54113ca12ce5db147af339474ec4b2423f2556600b5ea936b408cc","src/device/resource.rs":"039e2b45debf9396038482ae67cdea7bed0bb5fc8ba694941ee61638df11ff1f","src/device/trace.rs":"39e52ee5b220eb6a13d949582f1f87756189648bf2f05ea7148b0a67b73c226f","src/error.rs":"4f07a0b09b30b2d6cbc855d0091d724000f492018af3b41e80befbeccf2a6f4e","src/global.rs":"bd76f9552496996f9eba6502e5caf1bcd6ca33bf3d5008795b5335f74e56fd55","src/hash_utils.rs":"9f57a627fe3f00659391670141df62f68d67922c7b186f2a9a5958ab16fb576f","src/hub.rs":"308c53e05134e5a48294c61511e43077adfdb5c334237de2016ed4537d562382","src/id.rs":"134974aa304d1d0eb7349438b9660519886c513f01d5868cd4331d2bc78f2cb8","src/identity.rs":"712ccda267eb602655c53672a94346aa4c9f88c0044ae6edcd658a814c9a50cf","src/indirect_validation/dispatch.rs":"b15d926e0de732c3c39c965f168f99598fa508ca4b0883061993d99dd644b31a","src/indirect_validation/draw.rs":"6d8338f37f406c6e2cf89713e8493f167e1d8e999737f2976de298810c2ada76","src/indirect_validation/mod.rs":"79466e4f9a59386e833958b3537beed6ffb6a7ee62aaabcf35382c2683998e43","src/indirect_validation/utils.rs":"e6a3b636dd71ff6b01d5abd5a589a0136fb30aa1d517a43f45cf2e5ad54da245","src/indirect_validation/validate_draw.wgsl":"fa7bba5f28c6c181f2d55ecfe386a5e5cd276bcb3c36aa7f963f43c535a9bf9a","src/init_tracker/buffer.rs":"6167a400ab271ba857f1c507e60a46fbd318c185aff87eecf7eb05f7f09b6963","src/init_tracker/mod.rs":"aa87df3428e3b23507377c71eae92dc1dd9f5d5374aa0b03906fb81507fc6ce6","src/init_tracker/texture.rs":"ffdc67d4be23bcd48b22945de94ac0ea8ee571f91eb6d00323b9afe6fa91eef3","src/instance.rs":"e7b9a20e070cc401f75dfe07aceb8f2950a4d99ed8a7d4413ef9f0813f5a8ca1","src/lib.rs":"57d2562e33b04113cc6c2ca3bc9a215ec779a291be82b680ff037fac7d7a8a15","src/lock/mod.rs":"8d3ae3f8d004d7f7d8a3aefe9f30b35669cb8e2409f5fba27b1fcb116b2429c4","src/lock/observing.rs":"5bf62cef9f3ae67e99af640442fadd4e1f762480d990ee69ed9924c9e94a8dce","src/lock/rank.rs":"238e6a97c58ee1a804863c8011bb257864301170344d18596bdaab09f3f74b54","src/lock/ranked.rs":"a95d6bf7f2ef510047a4c33687076beccf38a0148aac3261bd29fa7555e3f488","src/lock/vanilla.rs":"ca8156d4c981473d437db1056487a44c714760d685819eaff8cf82fb0098a608","src/pipeline.rs":"b7aae46522bc6843b0f47dac7e73e33197c76e9724cfb4be3b949bfa27a99fb1","src/pipeline_cache.rs":"f6a82de6cf362be50335d26e8eed983b53812a8444dff9c8c988a075f3325f8f","src/pool.rs":"e11bfdc73a66321d26715465fa74657dcd26a9b856b80b8369b4aac2132a4295","src/present.rs":"bf0c6c47e58496199955013170f41cbf10755c1572583d5af4b88686c28ffb66","src/ray_tracing.rs":"a4261ccd978e8fab1fef48a168d2d33f8a9f2dae89f285ecd9ec8a6d0894fa3b","src/registry.rs":"ecd457e8956e065050bb9c63ca404505e56ffed6d540b3f14f745d7c4010b205","src/resource.rs":"942a362cc4ef05876870d3bcb0f0db8d2a513be5acacf257c202ee2c0c83a908","src/scratch.rs":"ea5c40e4d18a12f09cc1038f2dcdddb69b13e99275ac987d826658229a39b326","src/snatch.rs":"bf422810afd952894e365cd397763d42d6365ce3c5a5b4c1170566432f462939","src/storage.rs":"29427dea035d03abc8b8abdebecc5591378f1366088d1468ab2beb8536e7d675","src/timestamp_normalization/common.wgsl":"9f65aef0526ff9dde945fae70cef064ad961b0aee4291759ae82974cd2ead0a7","src/timestamp_normalization/mod.rs":"89444ad79900c12c2dc44780f1525cd0554d6ed1d9038938dd0075e8173ae59d","src/timestamp_normalization/timestamp_normalization.wgsl":"4b2202b965e4c67482d03a546ac38c72a602d79ed9a60e6f7217393c49afad49","src/track/blas.rs":"18c7b5b89a60ab49bbc0f4f8b85a24502c1d968714ef4c586095e119848d902a","src/track/buffer.rs":"c64e14aba25291064b1a095c875f94cd053b1d7d3744691c041285328e99f7ac","src/track/metadata.rs":"00b754c2c23b6fbfc11a03aecf0528a38fbfec0ff54f4d9eeaed4043e54884a5","src/track/mod.rs":"67e6fd7c6538c7e3cdd1655e85400320adac559f6c257477985081994edbf5d3","src/track/range.rs":"2688b05a0c6e8510ff6ba3a9623e8b83f433a05ba743129928c56c93d9a9c233","src/track/stateless.rs":"3db699f5f48a319fa07fb16cdf51e1623d6ecac7a476467ee366e014ea665b89","src/track/texture.rs":"3f3295bbc1b41415fceac700e6b494b26c3c673ebc5aa1fe31803197e53b68ea","src/validation.rs":"a4f661cd65a621e1aebf2d5c5aa3d726373647d6cbab36ed8ebdcb42bbecf416","src/weak_vec.rs":"a4193add5912b91226a3155cc613365b7fafdf2e7929d21d68bc19d149696e85"},"package":null} +\ No newline at end of file diff --git a/third_party/rust/wgpu-core/src/pipeline_cache.rs b/third_party/rust/wgpu-core/src/pipeline_cache.rs @@ -319,6 +319,7 @@ mod tests { vendor: 0x0002_FEED, device: 0xFEFE_FEFE, device_type: wgt::DeviceType::Other, + device_pci_bus_id: String::new(), driver: String::new(), driver_info: String::new(), backend: wgt::Backend::Vulkan, diff --git a/third_party/rust/wgpu-hal/.cargo-checksum.json b/third_party/rust/wgpu-hal/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"089eb6c21f85ad53819ed0c356b6328520684e9d7b0cd0c464c3f24f46c61247","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","README.md":"cf9e84804a635e4a8a9fefc596be9da6bf7354dde0d105e27d56a12cb20dd8e3","build.rs":"e720cf033fecfdc7e4f34010af2a86340c99b8aaabf69559d32391521e25de6c","examples/halmark/main.rs":"4861eedb91ca024ede5b18e6db5a861b03f21108de9566bcc4d71bb5720df62a","examples/halmark/shader.wgsl":"26c256ec36d6f0e9a1647431ca772766bee4382d64eaa718ba7b488dcfb6bcca","examples/raw-gles.em.html":"70fbe68394a1a4522192de1dcfaf7d399f60d7bdf5de70b708f9bb0417427546","examples/raw-gles.rs":"5f4cfa893e99dfec559803bc513457793dcc549154c604385fb287f99a3ea675","examples/ray-traced-triangle/main.rs":"8cbfdf3e4cd29d23e2c9fd543a36976d849a7161670e094baeda390db9306b57","examples/ray-traced-triangle/shader.wgsl":"cc10caf92746724a71f6dd0dbc3a71e57b37c7d1d83278556805a535c0728a9d","src/auxil/dxgi/conv.rs":"3ca856c93916c0be714924ff077aa1f366be5557cc164210154d252e7e49fb77","src/auxil/dxgi/exception.rs":"7138831914a59dc7cbb71512068e9134144b9bc8f43312682edccb0b3ee24a48","src/auxil/dxgi/factory.rs":"81e479e550a09127384d8080e43d5f5bae8e8dda6082fe41a87bea8f872eb0f1","src/auxil/dxgi/mod.rs":"e6c5cc3b73bb97742135d6f35308c42f0822304764978fb8dabb0e848863352a","src/auxil/dxgi/name.rs":"ff942da0da1a497ee4d2be21604f7ba9fae963588105b3d1f63aae1a0c536e82","src/auxil/dxgi/result.rs":"e7a9dfb48d8ef8cbe58b28b1ace5caf7818ee50505ba3220bb0509e66ae469b7","src/auxil/dxgi/time.rs":"b6911800be3873cbe277b2534b3839c6f005f3d9a09341aace4752e207d584a2","src/auxil/mod.rs":"540b9250d9f0e0af709245ce1e284eaca15b27d47550b0ebba2a512da1666c48","src/auxil/renderdoc.rs":"94898f747476e269b2910d42e769f2bbb6be0cb466ad92f9d381f55799d2756e","src/dx12/adapter.rs":"cb365ea13f2ef8ed19d0f9724058be365adacf8d7b42d84909566442edf81a12","src/dx12/command.rs":"9aa909aaa12ab9bf09e73f26b7197eee620fe6e9b742b3df90dc352e612d874d","src/dx12/conv.rs":"a320fca45fd1990762ff10dad1d8bbb29833d9b693b0887bf2898021a737612c","src/dx12/dcomp.rs":"53bde57557d80e571257f76933d66475a765e063d8b635675f9dd2563039a4c5","src/dx12/descriptor.rs":"ccd4feb6bd3e0a0ffc26142f8a81fca26180d0f50146b6eb2f670cbc89ea7064","src/dx12/device.rs":"592d9336e807e5bbafe204923e6546547160eb660ade038f5707cbd3cb9306fe","src/dx12/instance.rs":"75bddc3807756c691ede3ff944915e443a8bb2b5ac6d0d99babd4ed50d1e3fb9","src/dx12/mod.rs":"592a110924259e8754a919bfbc3efda1292f7416a447d585fe56fe910e6225d0","src/dx12/sampler.rs":"d18d243efe4fa667dbab5b75b5b91d47de94d441976d9f44a46a2b49ba38473d","src/dx12/shader_compilation.rs":"c901a797c69e08c8c0ec93ea37c5f31084eb21c26c7d703d7031f987f2243509","src/dx12/suballocation.rs":"014e9ec4a94519b877ad3adc2ea5d182aa6cdf502248009d28dc5833a9edb93c","src/dx12/types.rs":"3fc7619fc09303eb3c936d4ded6889f94ce9e8b9aa62742ce900baa1b1e1cca7","src/dx12/view.rs":"79b3f7331d9795e60f9b53023cbf0df46c3a05b1e8bd5c7bcca8acdd235b124f","src/dynamic/adapter.rs":"e93f7d082a3950c9e8ccff8a631d251c7598b4b25dda9fe6347dadfa3ba07829","src/dynamic/command.rs":"9635dea15d8a885011d2b8b6b9cc5ffe2126cc3f141f47f7aaf46e1f201abea9","src/dynamic/device.rs":"f77c2406f2c42fed77fce29d731b490ac615dae2c5ddb9e01fee4f8ece1b3a34","src/dynamic/instance.rs":"7b515c201e1ca24f24439544dbfa1d19ea1412a4f89bd803e009aed13b021e55","src/dynamic/mod.rs":"2577d3aef6441f5b42b427d80ba3cf7fee2a97b2fc12335a1fba383e8a79a9b2","src/dynamic/queue.rs":"d76abb4797e90253386d24584f186dbe1909e772560156b2e891fa043cfefbdc","src/dynamic/surface.rs":"4328c2fe86931f50aa00ac3d6982d0879b774eebf7a507903d1b1898c891fb4d","src/gles/adapter.rs":"1508d5a6eb1d616e085613c6136b97841b64a12b1a4fc4ccf07fd5bf113cbe2e","src/gles/command.rs":"c13d50eeb1a4aaab367a3b4a7fe6c25c8c73377e68d0d8cc43791d1a7202d23b","src/gles/conv.rs":"6ffb8688de38c2fdd956571dd549535259e2811225adc1df02509e8e642ee775","src/gles/device.rs":"7a8679a4e990bb237cab961b0a2dbdbf5414c57b943048f63f7ddb189932db58","src/gles/egl.rs":"2509e5a5c422e213a3050d852d70a13dfc06737c829a8fc169f45791d8e27fed","src/gles/emscripten.rs":"316d2bb6f2a4bb126dbe68a223f7393399080d116b61c39504454acdf4f9cfaf","src/gles/fence.rs":"a2e7b6abd2fd4a438de90b9f58452c64cd8bba83999c90fd6390e3db128b9c6c","src/gles/mod.rs":"b6d80623eaf58719bafac26875fd0f75f8546b02c58b96a75d703e3a350e31df","src/gles/queue.rs":"5152f5698a2998a55125d13f04788b960726fd4b49ae4d2ec8f9642c8825c7fd","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":"ed0cee8844447b461ed5340f81eb55bb051ceaac67a5768985318ceac133cbe4","src/lib.rs":"b5354488fbffb0ae575700c8f4addec0d8466a402df4eb4ab338a41aae9b683b","src/metal/adapter.rs":"75ddf04c2005238d69e4eed5ac86ea43644089eccf23b39a77ab94753e85f61c","src/metal/command.rs":"20bf613b67ccc043de6e8ad3f3d332bbb678cc06c1593cf1880083de090574ba","src/metal/conv.rs":"85e8168be334ba24d109575a0a7e91b2ad3459403173e99e5cdd5d977cc5c18f","src/metal/device.rs":"a293d260b5618b8b8fcb0137c51302989a7982f3db06ca051b5fe898266776f7","src/metal/layer_observer.rs":"8370a6e443d01739b951b8538ee719a03b69fc0cbac92c748db418fbcc8837b5","src/metal/mod.rs":"e30c545106732670d9733090d4de543021b38638cf0ee89ba2ba9d8246ea218a","src/metal/surface.rs":"22dc6da86ac74b044b6498764920f0467bb5060f4dffb156b6c1e260db0c48b7","src/metal/time.rs":"c32d69f30e846dfcc0e39e01097fb80df63b2bebb6586143bb62494999850246","src/noop/buffer.rs":"b5edc5e2c52287dfbd4f619e36097ac233041eb9ab287b889b6ee477d740fa09","src/noop/command.rs":"3de99a1a260cfea2e6ca2e76797c1923cc26b069b08362c38798ce27cdc75543","src/noop/mod.rs":"47b663d15f1ceb6d77a16e91549bc9634dfd2cfaf58c9b945639fb36c364f77e","src/validation_canary.rs":"2e8f84e5f85671b3e55ddd410476171c762e34cbea315b37921cbb6ff18bfb4f","src/vulkan/adapter.rs":"6a3de2f25d3e8397b30d6de15db4c9e92b18181eb33f31bf520a4c12fd1cc355","src/vulkan/command.rs":"22fd05428c141ce58000c8f3541d39195023ffdfb72c4b00379a5c50a3ecea82","src/vulkan/conv.rs":"03eb28b81d3e41ccfcb2b3f7f029cd671ccdf9556594c6d8b6cc2b22144ec4f2","src/vulkan/device.rs":"c76cf97b620c12b2e3039012f44ea0423ad30d5e6e52e40ec3bfc87cbc92cf86","src/vulkan/drm.rs":"45f7bf1dd854688a65261e4674d80f90c997b193a162fd2ae658acf4e2003552","src/vulkan/instance.rs":"37868aea22e6d7a986301581194142cd14d7d3bc8d9ba0e0c5a9e58db1eb1cdf","src/vulkan/mod.rs":"8b9f4c97046703cf3f7d279f5c196df7e0b158c850c8f37e3c5c459569430b3a","src/vulkan/sampler.rs":"f65729d6df5cce681b7756b3e48074017f0c7f42da69ca55e26cc723cd14ad59","src/vulkan/semaphore_list.rs":"102266d8e1b9f2ec1decf681bcc9e1a4cbff29533a258f2699fb6c573c434771"},"package":null} -\ No newline at end of file +{"files":{"Cargo.toml":"c9fb3a416136835a876f6d44bcc350f57d666f20f50f88cd704b33432bf7fa80","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","README.md":"cf9e84804a635e4a8a9fefc596be9da6bf7354dde0d105e27d56a12cb20dd8e3","build.rs":"e720cf033fecfdc7e4f34010af2a86340c99b8aaabf69559d32391521e25de6c","examples/halmark/main.rs":"4861eedb91ca024ede5b18e6db5a861b03f21108de9566bcc4d71bb5720df62a","examples/halmark/shader.wgsl":"26c256ec36d6f0e9a1647431ca772766bee4382d64eaa718ba7b488dcfb6bcca","examples/raw-gles.em.html":"70fbe68394a1a4522192de1dcfaf7d399f60d7bdf5de70b708f9bb0417427546","examples/raw-gles.rs":"5f4cfa893e99dfec559803bc513457793dcc549154c604385fb287f99a3ea675","examples/ray-traced-triangle/main.rs":"8cbfdf3e4cd29d23e2c9fd543a36976d849a7161670e094baeda390db9306b57","examples/ray-traced-triangle/shader.wgsl":"cc10caf92746724a71f6dd0dbc3a71e57b37c7d1d83278556805a535c0728a9d","src/auxil/dxgi/conv.rs":"3ca856c93916c0be714924ff077aa1f366be5557cc164210154d252e7e49fb77","src/auxil/dxgi/exception.rs":"7138831914a59dc7cbb71512068e9134144b9bc8f43312682edccb0b3ee24a48","src/auxil/dxgi/factory.rs":"81e479e550a09127384d8080e43d5f5bae8e8dda6082fe41a87bea8f872eb0f1","src/auxil/dxgi/mod.rs":"e6c5cc3b73bb97742135d6f35308c42f0822304764978fb8dabb0e848863352a","src/auxil/dxgi/name.rs":"ff942da0da1a497ee4d2be21604f7ba9fae963588105b3d1f63aae1a0c536e82","src/auxil/dxgi/result.rs":"e7a9dfb48d8ef8cbe58b28b1ace5caf7818ee50505ba3220bb0509e66ae469b7","src/auxil/dxgi/time.rs":"b6911800be3873cbe277b2534b3839c6f005f3d9a09341aace4752e207d584a2","src/auxil/mod.rs":"540b9250d9f0e0af709245ce1e284eaca15b27d47550b0ebba2a512da1666c48","src/auxil/renderdoc.rs":"94898f747476e269b2910d42e769f2bbb6be0cb466ad92f9d381f55799d2756e","src/dx12/adapter.rs":"7c9cd88b5a20d0daad5c09c3b6a9cab0e1289db229be3839f05c9ea67de2a19f","src/dx12/command.rs":"9aa909aaa12ab9bf09e73f26b7197eee620fe6e9b742b3df90dc352e612d874d","src/dx12/conv.rs":"a320fca45fd1990762ff10dad1d8bbb29833d9b693b0887bf2898021a737612c","src/dx12/dcomp.rs":"53bde57557d80e571257f76933d66475a765e063d8b635675f9dd2563039a4c5","src/dx12/descriptor.rs":"ccd4feb6bd3e0a0ffc26142f8a81fca26180d0f50146b6eb2f670cbc89ea7064","src/dx12/device.rs":"592d9336e807e5bbafe204923e6546547160eb660ade038f5707cbd3cb9306fe","src/dx12/instance.rs":"75bddc3807756c691ede3ff944915e443a8bb2b5ac6d0d99babd4ed50d1e3fb9","src/dx12/mod.rs":"592a110924259e8754a919bfbc3efda1292f7416a447d585fe56fe910e6225d0","src/dx12/sampler.rs":"d18d243efe4fa667dbab5b75b5b91d47de94d441976d9f44a46a2b49ba38473d","src/dx12/shader_compilation.rs":"c901a797c69e08c8c0ec93ea37c5f31084eb21c26c7d703d7031f987f2243509","src/dx12/suballocation.rs":"014e9ec4a94519b877ad3adc2ea5d182aa6cdf502248009d28dc5833a9edb93c","src/dx12/types.rs":"3fc7619fc09303eb3c936d4ded6889f94ce9e8b9aa62742ce900baa1b1e1cca7","src/dx12/view.rs":"79b3f7331d9795e60f9b53023cbf0df46c3a05b1e8bd5c7bcca8acdd235b124f","src/dynamic/adapter.rs":"e93f7d082a3950c9e8ccff8a631d251c7598b4b25dda9fe6347dadfa3ba07829","src/dynamic/command.rs":"9635dea15d8a885011d2b8b6b9cc5ffe2126cc3f141f47f7aaf46e1f201abea9","src/dynamic/device.rs":"f77c2406f2c42fed77fce29d731b490ac615dae2c5ddb9e01fee4f8ece1b3a34","src/dynamic/instance.rs":"7b515c201e1ca24f24439544dbfa1d19ea1412a4f89bd803e009aed13b021e55","src/dynamic/mod.rs":"2577d3aef6441f5b42b427d80ba3cf7fee2a97b2fc12335a1fba383e8a79a9b2","src/dynamic/queue.rs":"d76abb4797e90253386d24584f186dbe1909e772560156b2e891fa043cfefbdc","src/dynamic/surface.rs":"4328c2fe86931f50aa00ac3d6982d0879b774eebf7a507903d1b1898c891fb4d","src/gles/adapter.rs":"2a3348204f7489e856d6c37c7e39f92adfbb65308eaeb684c0296e68dc6d76e2","src/gles/command.rs":"c13d50eeb1a4aaab367a3b4a7fe6c25c8c73377e68d0d8cc43791d1a7202d23b","src/gles/conv.rs":"6ffb8688de38c2fdd956571dd549535259e2811225adc1df02509e8e642ee775","src/gles/device.rs":"7a8679a4e990bb237cab961b0a2dbdbf5414c57b943048f63f7ddb189932db58","src/gles/egl.rs":"2509e5a5c422e213a3050d852d70a13dfc06737c829a8fc169f45791d8e27fed","src/gles/emscripten.rs":"316d2bb6f2a4bb126dbe68a223f7393399080d116b61c39504454acdf4f9cfaf","src/gles/fence.rs":"a2e7b6abd2fd4a438de90b9f58452c64cd8bba83999c90fd6390e3db128b9c6c","src/gles/mod.rs":"b6d80623eaf58719bafac26875fd0f75f8546b02c58b96a75d703e3a350e31df","src/gles/queue.rs":"5152f5698a2998a55125d13f04788b960726fd4b49ae4d2ec8f9642c8825c7fd","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":"ed0cee8844447b461ed5340f81eb55bb051ceaac67a5768985318ceac133cbe4","src/lib.rs":"b5354488fbffb0ae575700c8f4addec0d8466a402df4eb4ab338a41aae9b683b","src/metal/adapter.rs":"75ddf04c2005238d69e4eed5ac86ea43644089eccf23b39a77ab94753e85f61c","src/metal/command.rs":"20bf613b67ccc043de6e8ad3f3d332bbb678cc06c1593cf1880083de090574ba","src/metal/conv.rs":"85e8168be334ba24d109575a0a7e91b2ad3459403173e99e5cdd5d977cc5c18f","src/metal/device.rs":"a293d260b5618b8b8fcb0137c51302989a7982f3db06ca051b5fe898266776f7","src/metal/layer_observer.rs":"8370a6e443d01739b951b8538ee719a03b69fc0cbac92c748db418fbcc8837b5","src/metal/mod.rs":"1bbd3f19d1e518cae6f388da7327279495410e9e50446e1d4bead300855045a5","src/metal/surface.rs":"22dc6da86ac74b044b6498764920f0467bb5060f4dffb156b6c1e260db0c48b7","src/metal/time.rs":"c32d69f30e846dfcc0e39e01097fb80df63b2bebb6586143bb62494999850246","src/noop/buffer.rs":"b5edc5e2c52287dfbd4f619e36097ac233041eb9ab287b889b6ee477d740fa09","src/noop/command.rs":"3de99a1a260cfea2e6ca2e76797c1923cc26b069b08362c38798ce27cdc75543","src/noop/mod.rs":"619eb69530736fdcc9fc076eca30191d8d1227abb9cefcf54d717ea93cc4b1a9","src/validation_canary.rs":"2e8f84e5f85671b3e55ddd410476171c762e34cbea315b37921cbb6ff18bfb4f","src/vulkan/adapter.rs":"6bdc81c83dbb651e71bb16dba0d028dd51a415271f086a903784b9c49b4bf717","src/vulkan/command.rs":"22fd05428c141ce58000c8f3541d39195023ffdfb72c4b00379a5c50a3ecea82","src/vulkan/conv.rs":"03eb28b81d3e41ccfcb2b3f7f029cd671ccdf9556594c6d8b6cc2b22144ec4f2","src/vulkan/device.rs":"e034e43f9f344695a44d11186505411549dd1397027977645cbfd56950096289","src/vulkan/drm.rs":"45f7bf1dd854688a65261e4674d80f90c997b193a162fd2ae658acf4e2003552","src/vulkan/instance.rs":"435fb4f22c3c39463f1a33f1a946180656cc7177eeb97035c0458f5d97a1591f","src/vulkan/mod.rs":"d8e724879230eca5a09bf166b103a66a2f1d7a2a8a382bdb1fd1e2c6abc5fdcd","src/vulkan/sampler.rs":"f65729d6df5cce681b7756b3e48074017f0c7f42da69ca55e26cc723cd14ad59","src/vulkan/semaphore_list.rs":"6e548d810d75daf5ed31b6e520ece32c8ef97e4b66926c17f0d4317f355802e5","src/vulkan/swapchain/mod.rs":"1baef6ef36d005fe03b27ea15a91d1c5c7114eb7f777a50e67ca5f448a53291b","src/vulkan/swapchain/native.rs":"6d9aadeeb1d6774afe070e0f5d995576c1d5c1097dfc471d914b2e16782a4d69"},"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 @@ -65,6 +65,8 @@ dx12 = [ "dep:range-alloc", "dep:windows-core", "dep:gpu-allocator", + "gpu-allocator/d3d12", + "windows/Win32_Devices_DeviceAndDriverInstallation", "windows/Win32_Graphics_Direct3D_Fxc", "windows/Win32_Graphics_Direct3D_Dxc", "windows/Win32_Graphics_Direct3D", diff --git a/third_party/rust/wgpu-hal/src/dx12/adapter.rs b/third_party/rust/wgpu-hal/src/dx12/adapter.rs @@ -6,6 +6,12 @@ use parking_lot::Mutex; use windows::{ core::Interface as _, Win32::{ + Devices::DeviceAndDriverInstallation::{ + SetupDiDestroyDeviceInfoList, SetupDiEnumDeviceInfo, SetupDiGetClassDevsW, + SetupDiGetDeviceRegistryPropertyW, DIGCF_PRESENT, GUID_DEVCLASS_DISPLAY, HDEVINFO, + SPDRP_ADDRESS, SPDRP_BUSNUMBER, SPDRP_HARDWAREID, SP_DEVINFO_DATA, + }, + Foundation::{GetLastError, ERROR_NO_MORE_ITEMS}, Graphics::{Direct3D, Direct3D12, Dxgi}, UI::WindowsAndMessaging, }, @@ -127,6 +133,7 @@ impl super::Adapter { } else { wgt::DeviceType::DiscreteGpu }, + device_pci_bus_id: get_adapter_pci_info(desc.VendorId, desc.DeviceId), driver: { if let Ok(i) = unsafe { adapter.CheckInterfaceSupport(&Dxgi::IDXGIDevice::IID) } { const MASK: i64 = 0xFFFF; @@ -1024,3 +1031,147 @@ impl crate::Adapter for super::Adapter { wgt::PresentationTimestamp(self.presentation_timer.get_timestamp_ns()) } } + +fn get_adapter_pci_info(vendor_id: u32, device_id: u32) -> String { + // SAFETY: SetupDiGetClassDevsW is called with valid parameters + let device_info_set = unsafe { + match SetupDiGetClassDevsW(Some(&GUID_DEVCLASS_DISPLAY), None, None, DIGCF_PRESENT) { + Ok(set) => set, + Err(_) => return String::new(), + } + }; + + struct DeviceInfoSetGuard(HDEVINFO); + impl Drop for DeviceInfoSetGuard { + fn drop(&mut self) { + // SAFETY: device_info_set is a valid HDEVINFO and is only dropped once via this guard + unsafe { + let _ = SetupDiDestroyDeviceInfoList(self.0); + } + } + } + let _guard = DeviceInfoSetGuard(device_info_set); + + let mut device_index = 0u32; + loop { + let mut device_info_data = SP_DEVINFO_DATA { + cbSize: size_of::<SP_DEVINFO_DATA>() as u32, + ..Default::default() + }; + + // SAFETY: device_info_set is a valid HDEVINFO, device_index starts at 0 and + // device_info_data is properly initialized above + unsafe { + if SetupDiEnumDeviceInfo(device_info_set, device_index, &mut device_info_data).is_err() + { + if GetLastError() == ERROR_NO_MORE_ITEMS { + break; + } + device_index += 1; + continue; + } + } + + let mut hardware_id_size = 0u32; + // SAFETY: device_info_set and device_info_data are valid + unsafe { + let _ = SetupDiGetDeviceRegistryPropertyW( + device_info_set, + &device_info_data, + SPDRP_HARDWAREID, + None, + None, + Some(&mut hardware_id_size), + ); + } + + if hardware_id_size == 0 { + device_index += 1; + continue; + } + + let mut hardware_id_buffer = vec![0u8; hardware_id_size as usize]; + // SAFETY: device_info_set and device_info_data are valid + unsafe { + if SetupDiGetDeviceRegistryPropertyW( + device_info_set, + &device_info_data, + SPDRP_HARDWAREID, + None, + Some(&mut hardware_id_buffer), + Some(&mut hardware_id_size), + ) + .is_err() + { + device_index += 1; + continue; + } + } + + let hardware_id_u16: Vec<u16> = hardware_id_buffer + .chunks_exact(2) + .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) + .collect(); + let hardware_ids: Vec<String> = hardware_id_u16 + .split(|&c| c == 0) + .filter(|s| !s.is_empty()) + .map(|s| String::from_utf16_lossy(s).to_uppercase()) + .collect(); + + // https://learn.microsoft.com/en-us/windows-hardware/drivers/install/identifiers-for-pci-devices + let expected_id = format!("PCI\\VEN_{vendor_id:04X}&DEV_{device_id:04X}"); + if !hardware_ids.iter().any(|id| id.contains(&expected_id)) { + device_index += 1; + continue; + } + + let mut bus_buffer = [0u8; 4]; + let mut data_size = bus_buffer.len() as u32; + // SAFETY: device_info_set and device_info_data are valid + let bus_number = unsafe { + if SetupDiGetDeviceRegistryPropertyW( + device_info_set, + &device_info_data, + SPDRP_BUSNUMBER, + None, + Some(&mut bus_buffer), + Some(&mut data_size), + ) + .is_err() + { + device_index += 1; + continue; + } + u32::from_le_bytes(bus_buffer) + }; + + let mut addr_buffer = [0u8; 4]; + let mut addr_size = addr_buffer.len() as u32; + // SAFETY: device_info_set and device_info_data are valid + unsafe { + if SetupDiGetDeviceRegistryPropertyW( + device_info_set, + &device_info_data, + SPDRP_ADDRESS, + None, + Some(&mut addr_buffer), + Some(&mut addr_size), + ) + .is_err() + { + device_index += 1; + continue; + } + } + let address = u32::from_le_bytes(addr_buffer); + + // https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/obtaining-device-configuration-information-at-irql---dispatch-level + let device = (address >> 16) & 0x0000FFFF; + let function = address & 0x0000FFFF; + + // domain:bus:device.function + return format!("{:04x}:{:02x}:{:02x}.{:x}", 0, bus_number, device, function); + } + + String::new() +} diff --git a/third_party/rust/wgpu-hal/src/gles/adapter.rs b/third_party/rust/wgpu-hal/src/gles/adapter.rs @@ -187,6 +187,7 @@ impl super::Adapter { device: 0, device_type: inferred_device_type, driver: "".to_owned(), + device_pci_bus_id: String::new(), driver_info: version, backend: wgt::Backend::Gl, transient_saves_memory: false, diff --git a/third_party/rust/wgpu-hal/src/metal/mod.rs b/third_party/rust/wgpu-hal/src/metal/mod.rs @@ -156,6 +156,7 @@ impl crate::Instance for Instance { vendor: 0, device: 0, device_type: shared.private_caps.device_type(), + device_pci_bus_id: String::new(), driver: String::new(), driver_info: String::new(), backend: wgt::Backend::Metal, diff --git a/third_party/rust/wgpu-hal/src/noop/mod.rs b/third_party/rust/wgpu-hal/src/noop/mod.rs @@ -137,6 +137,7 @@ pub fn adapter_info() -> wgt::AdapterInfo { vendor: 0, device: 0, device_type: wgt::DeviceType::Cpu, + device_pci_bus_id: String::new(), driver: String::from("wgpu"), driver_info: String::new(), backend: wgt::Backend::Noop, diff --git a/third_party/rust/wgpu-hal/src/vulkan/adapter.rs b/third_party/rust/wgpu-hal/src/vulkan/adapter.rs @@ -4,7 +4,9 @@ use core::{ffi::CStr, marker::PhantomData}; use ash::{ext, google, khr, vk}; use parking_lot::Mutex; -use super::conv; +use crate::vulkan::semaphore_list::SemaphoreList; + +use super::semaphore_list::SemaphoreListMode; fn depth_stencil_required_flags() -> vk::FormatFeatureFlags { vk::FormatFeatureFlags::SAMPLED_IMAGE | vk::FormatFeatureFlags::DEPTH_STENCIL_ATTACHMENT @@ -962,6 +964,10 @@ pub struct PhysicalDeviceProperties { /// `VK_EXT_mesh_shader` extension. mesh_shader: Option<vk::PhysicalDeviceMeshShaderPropertiesEXT<'static>>, + /// Additional `vk::PhysicalDevice` properties from the + /// `VK_EXT_pci_bus_info` extension. + pci_bus_info: Option<vk::PhysicalDevicePCIBusInfoPropertiesEXT<'static>>, + /// The device API version. /// /// Which is the version of Vulkan supported for device-level functionality. @@ -1392,6 +1398,8 @@ impl super::InstanceShared { >= vk::API_VERSION_1_3 || capabilities.supports_extension(ext::subgroup_size_control::NAME); let supports_robustness2 = capabilities.supports_extension(ext::robustness2::NAME); + let supports_pci_bus_info = + capabilities.supports_extension(ext::pci_bus_info::NAME); let supports_acceleration_structure = capabilities.supports_extension(khr::acceleration_structure::NAME); @@ -1448,6 +1456,13 @@ impl super::InstanceShared { properties2 = properties2.push_next(next); } + if supports_pci_bus_info { + let next = capabilities + .pci_bus_info + .insert(vk::PhysicalDevicePCIBusInfoPropertiesEXT::default()); + properties2 = properties2.push_next(next); + } + if supports_mesh_shader { let next = capabilities .mesh_shader @@ -1672,6 +1687,16 @@ impl super::Instance { vk::PhysicalDeviceType::CPU => wgt::DeviceType::Cpu, _ => wgt::DeviceType::Other, }, + device_pci_bus_id: phd_capabilities + .pci_bus_info + .filter(|info| info.pci_bus != 0 || info.pci_device != 0) + .map(|info| { + format!( + "{:04x}:{:02x}:{:02x}.{}", + info.pci_domain, info.pci_bus, info.pci_device, info.pci_function + ) + }) + .unwrap_or_default(), driver: { phd_capabilities .driver @@ -1967,8 +1992,6 @@ impl super::Adapter { } }); - let swapchain_fn = khr::swapchain::Device::new(&self.instance.raw, &raw_device); - // Note that VK_EXT_debug_utils is an instance extension (enabled at the instance // level) but contains a few functions that can be loaded directly on the Device for a // dispatch-table-less pointer. @@ -2248,11 +2271,10 @@ impl super::Adapter { let queue = super::Queue { raw: raw_queue, - swapchain_fn, device: Arc::clone(&shared), family_index, relay_semaphores: Mutex::new(relay_semaphores), - signal_semaphores: Default::default(), + signal_semaphores: Mutex::new(SemaphoreList::new(SemaphoreListMode::Signal)), }; let mem_allocator = { @@ -2574,113 +2596,7 @@ impl crate::Adapter for super::Adapter { &self, surface: &super::Surface, ) -> Option<crate::SurfaceCapabilities> { - if !self.private_caps.can_present { - return None; - } - let queue_family_index = 0; //TODO - { - profiling::scope!("vkGetPhysicalDeviceSurfaceSupportKHR"); - match unsafe { - surface.functor.get_physical_device_surface_support( - self.raw, - queue_family_index, - surface.raw, - ) - } { - Ok(true) => (), - Ok(false) => return None, - Err(e) => { - log::error!("get_physical_device_surface_support: {e}"); - return None; - } - } - } - - let caps = { - profiling::scope!("vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); - match unsafe { - surface - .functor - .get_physical_device_surface_capabilities(self.raw, surface.raw) - } { - Ok(caps) => caps, - Err(e) => { - log::error!("get_physical_device_surface_capabilities: {e}"); - return None; - } - } - }; - - // If image count is 0, the support number of images is unlimited. - let max_image_count = if caps.max_image_count == 0 { - !0 - } else { - caps.max_image_count - }; - - // `0xFFFFFFFF` indicates that the extent depends on the created swapchain. - let current_extent = if caps.current_extent.width != !0 && caps.current_extent.height != !0 - { - Some(wgt::Extent3d { - width: caps.current_extent.width, - height: caps.current_extent.height, - depth_or_array_layers: 1, - }) - } else { - None - }; - - let raw_present_modes = { - profiling::scope!("vkGetPhysicalDeviceSurfacePresentModesKHR"); - match unsafe { - surface - .functor - .get_physical_device_surface_present_modes(self.raw, surface.raw) - } { - Ok(present_modes) => present_modes, - Err(e) => { - log::error!("get_physical_device_surface_present_modes: {e}"); - // Per definition of `SurfaceCapabilities`, there must be at least one present mode. - return None; - } - } - }; - - let raw_surface_formats = { - profiling::scope!("vkGetPhysicalDeviceSurfaceFormatsKHR"); - match unsafe { - surface - .functor - .get_physical_device_surface_formats(self.raw, surface.raw) - } { - Ok(formats) => formats, - Err(e) => { - log::error!("get_physical_device_surface_formats: {e}"); - // Per definition of `SurfaceCapabilities`, there must be at least one present format. - return None; - } - } - }; - - let formats = raw_surface_formats - .into_iter() - .filter_map(conv::map_vk_surface_formats) - .collect(); - Some(crate::SurfaceCapabilities { - formats, - // TODO: Right now we're always trunkating the swap chain - // (presumably - we're actually setting the min image count which isn't necessarily the swap chain size) - // Instead, we should use extensions when available to wait in present. - // See https://github.com/gfx-rs/wgpu/issues/2869 - maximum_frame_latency: (caps.min_image_count - 1)..=(max_image_count - 1), // Note this can't underflow since both `min_image_count` is at least one and we already patched `max_image_count`. - current_extent, - usage: conv::map_vk_image_usage(caps.supported_usage_flags), - present_modes: raw_present_modes - .into_iter() - .flat_map(conv::map_vk_present_mode) - .collect(), - composite_alpha_modes: conv::map_vk_composite_alpha(caps.supported_composite_alpha), - }) + surface.inner.surface_capabilities(self) } unsafe fn get_presentation_timestamp(&self) -> wgt::PresentationTimestamp { diff --git a/third_party/rust/wgpu-hal/src/vulkan/device.rs b/third_party/rust/wgpu-hal/src/vulkan/device.rs @@ -8,7 +8,7 @@ use core::{ }; use arrayvec::ArrayVec; -use ash::{ext, khr, vk}; +use ash::{ext, vk}; use hashbrown::hash_map::Entry; use parking_lot::Mutex; @@ -489,130 +489,6 @@ struct CompiledStage { } impl super::Device { - pub(super) unsafe fn create_swapchain( - &self, - surface: &super::Surface, - config: &crate::SurfaceConfiguration, - provided_old_swapchain: Option<super::Swapchain>, - ) -> Result<super::Swapchain, crate::SurfaceError> { - profiling::scope!("Device::create_swapchain"); - let functor = khr::swapchain::Device::new(&surface.instance.raw, &self.shared.raw); - - let old_swapchain = match provided_old_swapchain { - Some(osc) => osc.raw, - None => vk::SwapchainKHR::null(), - }; - - let color_space = if config.format == wgt::TextureFormat::Rgba16Float { - // Enable wide color gamut mode - // Vulkan swapchain for Android only supports DISPLAY_P3_NONLINEAR_EXT and EXTENDED_SRGB_LINEAR_EXT - vk::ColorSpaceKHR::EXTENDED_SRGB_LINEAR_EXT - } else { - vk::ColorSpaceKHR::SRGB_NONLINEAR - }; - - let original_format = self.shared.private_caps.map_texture_format(config.format); - let mut raw_flags = vk::SwapchainCreateFlagsKHR::empty(); - let mut raw_view_formats: Vec<vk::Format> = vec![]; - if !config.view_formats.is_empty() { - raw_flags |= vk::SwapchainCreateFlagsKHR::MUTABLE_FORMAT; - raw_view_formats = config - .view_formats - .iter() - .map(|f| self.shared.private_caps.map_texture_format(*f)) - .collect(); - raw_view_formats.push(original_format); - } - - let mut info = vk::SwapchainCreateInfoKHR::default() - .flags(raw_flags) - .surface(surface.raw) - .min_image_count(config.maximum_frame_latency + 1) // TODO: https://github.com/gfx-rs/wgpu/issues/2869 - .image_format(original_format) - .image_color_space(color_space) - .image_extent(vk::Extent2D { - width: config.extent.width, - height: config.extent.height, - }) - .image_array_layers(config.extent.depth_or_array_layers) - .image_usage(conv::map_texture_usage(config.usage)) - .image_sharing_mode(vk::SharingMode::EXCLUSIVE) - .pre_transform(vk::SurfaceTransformFlagsKHR::IDENTITY) - .composite_alpha(conv::map_composite_alpha_mode(config.composite_alpha_mode)) - .present_mode(conv::map_present_mode(config.present_mode)) - .clipped(true) - .old_swapchain(old_swapchain); - - let mut format_list_info = vk::ImageFormatListCreateInfo::default(); - if !raw_view_formats.is_empty() { - format_list_info = format_list_info.view_formats(&raw_view_formats); - info = info.push_next(&mut format_list_info); - } - - let result = { - profiling::scope!("vkCreateSwapchainKHR"); - unsafe { functor.create_swapchain(&info, None) } - }; - - // doing this before bailing out with error - if old_swapchain != vk::SwapchainKHR::null() { - unsafe { functor.destroy_swapchain(old_swapchain, None) } - } - - let raw = match result { - Ok(swapchain) => swapchain, - Err(error) => { - return Err(match error { - vk::Result::ERROR_SURFACE_LOST_KHR - | vk::Result::ERROR_INITIALIZATION_FAILED => crate::SurfaceError::Lost, - vk::Result::ERROR_NATIVE_WINDOW_IN_USE_KHR => { - crate::SurfaceError::Other("Native window is in use") - } - // We don't use VK_EXT_image_compression_control - // VK_ERROR_COMPRESSION_EXHAUSTED_EXT - other => super::map_host_device_oom_and_lost_err(other).into(), - }); - } - }; - - let images = - unsafe { functor.get_swapchain_images(raw) }.map_err(super::map_host_device_oom_err)?; - - let fence = unsafe { - self.shared - .raw - .create_fence(&vk::FenceCreateInfo::default(), None) - .map_err(super::map_host_device_oom_err)? - }; - - // NOTE: It's important that we define the same number of acquire/present semaphores - // as we will need to index into them with the image index. - let acquire_semaphores = (0..=images.len()) - .map(|i| { - super::SwapchainAcquireSemaphore::new(&self.shared, i) - .map(Mutex::new) - .map(Arc::new) - }) - .collect::<Result<Vec<_>, _>>()?; - - let present_semaphores = (0..=images.len()) - .map(|i| Arc::new(Mutex::new(super::SwapchainPresentSemaphores::new(i)))) - .collect::<Vec<_>>(); - - Ok(super::Swapchain { - raw, - functor, - device: Arc::clone(&self.shared), - images, - fence, - config: config.clone(), - acquire_semaphores, - next_acquire_index: 0, - present_semaphores, - next_present_time: None, - }) - } - /// # Safety /// /// - `vk_image` must be created respecting `desc` diff --git a/third_party/rust/wgpu-hal/src/vulkan/instance.rs b/third_party/rust/wgpu-hal/src/vulkan/instance.rs @@ -2,6 +2,7 @@ use alloc::{borrow::ToOwned as _, boxed::Box, ffi::CString, string::String, sync use core::{ ffi::{c_void, CStr}, marker::PhantomData, + mem::ManuallyDrop, slice, str::FromStr, }; @@ -170,48 +171,6 @@ impl super::DebugUtilsCreateInfo { } } -impl super::Swapchain { - /// # Safety - /// - /// - The device must have been made idle before calling this function. - unsafe fn release_resources(mut self, device: &ash::Device) -> Self { - profiling::scope!("Swapchain::release_resources"); - { - profiling::scope!("vkDeviceWaitIdle"); - // We need to also wait until all presentation work is done. Because there is no way to portably wait until - // the presentation work is done, we are forced to wait until the device is idle. - let _ = unsafe { - device - .device_wait_idle() - .map_err(super::map_host_device_oom_and_lost_err) - }; - }; - - unsafe { device.destroy_fence(self.fence, None) } - - // We cannot take this by value, as the function returns `self`. - for semaphore in self.acquire_semaphores.drain(..) { - let arc_removed = Arc::into_inner(semaphore).expect( - "Trying to destroy a SurfaceAcquireSemaphores that is still in use by a SurfaceTexture", - ); - let mutex_removed = arc_removed.into_inner(); - - unsafe { mutex_removed.destroy(device) }; - } - - for semaphore in self.present_semaphores.drain(..) { - let arc_removed = Arc::into_inner(semaphore).expect( - "Trying to destroy a SurfacePresentSemaphores that is still in use by a SurfaceTexture", - ); - let mutex_removed = arc_removed.into_inner(); - - unsafe { mutex_removed.destroy(device) }; - } - - self - } -} - impl super::InstanceShared { pub fn entry(&self) -> &ash::Entry { &self.entry @@ -589,11 +548,11 @@ impl super::Instance { &self, surface: vk::SurfaceKHR, ) -> super::Surface { - let functor = khr::surface::Instance::new(&self.shared.entry, &self.shared.raw); + let native_surface = + crate::vulkan::swapchain::NativeSurface::from_vk_surface_khr(self, surface); + super::Surface { - raw: surface, - functor, - instance: Arc::clone(&self.shared), + inner: ManuallyDrop::new(Box::new(native_surface)), swapchain: RwLock::new(None), } } @@ -1027,7 +986,7 @@ impl crate::Instance for super::Instance { impl Drop for super::Surface { fn drop(&mut self) { - unsafe { self.functor.destroy_surface(self.raw, None) }; + unsafe { ManuallyDrop::take(&mut self.inner).delete_surface() }; } } @@ -1041,21 +1000,23 @@ impl crate::Surface for super::Surface { ) -> Result<(), crate::SurfaceError> { // SAFETY: `configure`'s contract guarantees there are no resources derived from the swapchain in use. let mut swap_chain = self.swapchain.write(); - let old = swap_chain - .take() - .map(|sc| unsafe { sc.release_resources(&device.shared.raw) }); - let swapchain = unsafe { device.create_swapchain(self, config, old)? }; + let mut old = swap_chain.take(); + if let Some(ref mut old) = old { + unsafe { old.release_resources(device) }; + } + + let swapchain = unsafe { self.inner.create_swapchain(device, config, old)? }; *swap_chain = Some(swapchain); Ok(()) } unsafe fn unconfigure(&self, device: &super::Device) { - if let Some(sc) = self.swapchain.write().take() { + if let Some(mut sc) = self.swapchain.write().take() { // SAFETY: `unconfigure`'s contract guarantees there are no resources derived from the swapchain in use. - let swapchain = unsafe { sc.release_resources(&device.shared.raw) }; - unsafe { swapchain.functor.destroy_swapchain(swapchain.raw, None) }; + unsafe { sc.release_resources(device) }; + unsafe { sc.delete_swapchain() }; } } @@ -1067,140 +1028,17 @@ impl crate::Surface for super::Surface { let mut swapchain = self.swapchain.write(); let swapchain = swapchain.as_mut().unwrap(); - let mut timeout_ns = match timeout { - Some(duration) => duration.as_nanos() as u64, - None => u64::MAX, - }; - - // AcquireNextImageKHR on Android (prior to Android 11) doesn't support timeouts - // and will also log verbose warnings if tying to use a timeout. - // - // Android 10 implementation for reference: - // https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-10.0.0_r13/vulkan/libvulkan/swapchain.cpp#1426 - // Android 11 implementation for reference: - // https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-11.0.0_r45/vulkan/libvulkan/swapchain.cpp#1438 - // - // Android 11 corresponds to an SDK_INT/ro.build.version.sdk of 30 - if cfg!(target_os = "android") && self.instance.android_sdk_version < 30 { - timeout_ns = u64::MAX; - } - - let acquire_semaphore_arc = swapchain.get_acquire_semaphore(); - // Nothing should be using this, so we don't block, but panic if we fail to lock. - let acquire_semaphore_guard = acquire_semaphore_arc - .try_lock() - .expect("Failed to lock a SwapchainSemaphores."); - - // Wait for all commands writing to the previously acquired image to - // complete. - // - // Almost all the steps in the usual acquire-draw-present flow are - // asynchronous: they get something started on the presentation engine - // or the GPU, but on the CPU, control returns immediately. Without some - // sort of intervention, the CPU could crank out frames much faster than - // the presentation engine can display them. - // - // This is the intervention: if any submissions drew on this image, and - // thus waited for `locked_swapchain_semaphores.acquire`, wait for all - // of them to finish, thus ensuring that it's okay to pass `acquire` to - // `vkAcquireNextImageKHR` again. - swapchain.device.wait_for_fence( - fence, - acquire_semaphore_guard.previously_used_submission_index, - timeout_ns, - )?; - - // will block if no image is available - let (index, suboptimal) = match unsafe { - profiling::scope!("vkAcquireNextImageKHR"); - swapchain.functor.acquire_next_image( - swapchain.raw, - timeout_ns, - acquire_semaphore_guard.acquire, - swapchain.fence, - ) - } { - // We treat `VK_SUBOPTIMAL_KHR` as `VK_SUCCESS` on Android. - // See the comment in `Queue::present`. - #[cfg(target_os = "android")] - Ok((index, _)) => (index, false), - #[cfg(not(target_os = "android"))] - Ok(pair) => pair, - Err(error) => { - return match error { - vk::Result::TIMEOUT => Ok(None), - vk::Result::NOT_READY | vk::Result::ERROR_OUT_OF_DATE_KHR => { - Err(crate::SurfaceError::Outdated) - } - vk::Result::ERROR_SURFACE_LOST_KHR => Err(crate::SurfaceError::Lost), - // We don't use VK_EXT_full_screen_exclusive - // VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT - other => Err(super::map_host_device_oom_and_lost_err(other).into()), - }; - } - }; + unsafe { swapchain.acquire(timeout, fence) } + } - // Wait for the image was acquired to be fully ready to be rendered too. - // - // This wait is very important on Windows to avoid bad frame pacing on - // Windows where the Vulkan driver is using a DXGI swapchain. See - // https://github.com/gfx-rs/wgpu/issues/8310 and - // https://github.com/gfx-rs/wgpu/issues/8354 for more details. - // - // On other platforms, this wait may serve to slightly decrease frame - // latency, depending on how the platform implements waiting within - // acquire. + unsafe fn discard_texture(&self, texture: super::SurfaceTexture) { unsafe { - swapchain - .device - .raw - .wait_for_fences(&[swapchain.fence], false, timeout_ns) - .map_err(super::map_host_device_oom_and_lost_err)?; - - swapchain - .device - .raw - .reset_fences(&[swapchain.fence]) - .map_err(super::map_host_device_oom_and_lost_err)?; - } - - drop(acquire_semaphore_guard); - // We only advance the surface semaphores if we successfully acquired an image, otherwise - // we should try to re-acquire using the same semaphores. - swapchain.advance_acquire_semaphore(); - - let present_semaphore_arc = swapchain.get_present_semaphores(index); - - // special case for Intel Vulkan returning bizarre values (ugh) - if swapchain.device.vendor_id == crate::auxil::db::intel::VENDOR && index > 0x100 { - return Err(crate::SurfaceError::Outdated); - } - - let identity = swapchain.device.texture_identity_factory.next(); - - let texture = super::SurfaceTexture { - index, - texture: super::Texture { - raw: swapchain.images[index as usize], - drop_guard: None, - block: None, - external_memory: None, - format: swapchain.config.format, - copy_size: crate::CopyExtent { - width: swapchain.config.extent.width, - height: swapchain.config.extent.height, - depth: 1, - }, - identity, - }, - acquire_semaphores: acquire_semaphore_arc, - present_semaphores: present_semaphore_arc, + self.swapchain + .write() + .as_mut() + .unwrap() + .discard_texture(texture) + .unwrap() }; - Ok(Some(crate::AcquiredSurfaceTexture { - texture, - suboptimal, - })) } - - unsafe fn discard_texture(&self, _texture: super::SurfaceTexture) {} } diff --git a/third_party/rust/wgpu-hal/src/vulkan/mod.rs b/third_party/rust/wgpu-hal/src/vulkan/mod.rs @@ -32,11 +32,19 @@ mod drm; mod instance; mod sampler; mod semaphore_list; +mod swapchain; pub use adapter::PhysicalDeviceFeatures; use alloc::{boxed::Box, ffi::CString, sync::Arc, vec::Vec}; -use core::{borrow::Borrow, ffi::CStr, fmt, marker::PhantomData, mem, num::NonZeroU32}; +use core::{ + borrow::Borrow, + ffi::CStr, + fmt, + marker::PhantomData, + mem::{self, ManuallyDrop}, + num::NonZeroU32, +}; use arrayvec::ArrayVec; use ash::{ext, khr, vk}; @@ -49,6 +57,8 @@ use wgt::InternalCounter; use semaphore_list::SemaphoreList; +use crate::vulkan::semaphore_list::{SemaphoreListMode, SemaphoreType}; + const MAX_TOTAL_ATTACHMENTS: usize = crate::MAX_COLOR_ATTACHMENTS * 2 + 1; #[derive(Clone, Debug)] @@ -180,302 +190,36 @@ pub struct Instance { shared: Arc<InstanceShared>, } -/// Semaphore used to acquire a swapchain image. -#[derive(Debug)] -struct SwapchainAcquireSemaphore { - /// A semaphore that is signaled when this image is safe for us to modify. - /// - /// When [`vkAcquireNextImageKHR`] returns the index of the next swapchain - /// image that we should use, that image may actually still be in use by the - /// presentation engine, and is not yet safe to modify. However, that - /// function does accept a semaphore that it will signal when the image is - /// indeed safe to begin messing with. - /// - /// This semaphore is: - /// - /// - waited for by the first queue submission to operate on this image - /// since it was acquired, and - /// - /// - signaled by [`vkAcquireNextImageKHR`] when the acquired image is ready - /// for us to use. - /// - /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR - acquire: vk::Semaphore, - - /// True if the next command submission operating on this image should wait - /// for [`acquire`]. - /// - /// We must wait for `acquire` before drawing to this swapchain image, but - /// because `wgpu-hal` queue submissions are always strongly ordered, only - /// the first submission that works with a swapchain image actually needs to - /// wait. We set this flag when this image is acquired, and clear it the - /// first time it's passed to [`Queue::submit`] as a surface texture. - /// - /// Additionally, semaphores can only be waited on once, so we need to ensure - /// that we only actually pass this semaphore to the first submission that - /// uses that image. - /// - /// [`acquire`]: SwapchainAcquireSemaphore::acquire - /// [`Queue::submit`]: crate::Queue::submit - should_wait_for_acquire: bool, - - /// The fence value of the last command submission that wrote to this image. - /// - /// The next time we try to acquire this image, we'll block until - /// this submission finishes, proving that [`acquire`] is ready to - /// pass to `vkAcquireNextImageKHR` again. - /// - /// [`acquire`]: SwapchainAcquireSemaphore::acquire - previously_used_submission_index: crate::FenceValue, -} - -impl SwapchainAcquireSemaphore { - fn new(device: &DeviceShared, index: usize) -> Result<Self, crate::DeviceError> { - Ok(Self { - acquire: device - .new_binary_semaphore(&format!("SwapchainImageSemaphore: Index {index} acquire"))?, - should_wait_for_acquire: true, - previously_used_submission_index: 0, - }) - } - - /// Sets the fence value which the next acquire will wait for. This prevents - /// the semaphore from being used while the previous submission is still in flight. - fn set_used_fence_value(&mut self, value: crate::FenceValue) { - self.previously_used_submission_index = value; - } - - /// Return the semaphore that commands drawing to this image should wait for, if any. - /// - /// This only returns `Some` once per acquisition; see - /// [`SwapchainAcquireSemaphore::should_wait_for_acquire`] for details. - fn get_acquire_wait_semaphore(&mut self) -> Option<vk::Semaphore> { - if self.should_wait_for_acquire { - self.should_wait_for_acquire = false; - Some(self.acquire) - } else { - None - } - } - - /// Indicates the cpu-side usage of this semaphore has finished for the frame, - /// so reset internal state to be ready for the next frame. - fn end_semaphore_usage(&mut self) { - // Reset the acquire semaphore, so that the next time we acquire this - // image, we can wait for it again. - self.should_wait_for_acquire = true; - } - - unsafe fn destroy(&self, device: &ash::Device) { - unsafe { - device.destroy_semaphore(self.acquire, None); - } - } -} - -#[derive(Debug)] -struct SwapchainPresentSemaphores { - /// A pool of semaphores for ordering presentation after drawing. - /// - /// The first [`present_index`] semaphores in this vector are: - /// - /// - all waited on by the call to [`vkQueuePresentKHR`] that presents this - /// image, and - /// - /// - each signaled by some [`vkQueueSubmit`] queue submission that draws to - /// this image, when the submission finishes execution. - /// - /// This vector accumulates one semaphore per submission that writes to this - /// image. This is awkward, but hard to avoid: [`vkQueuePresentKHR`] - /// requires a semaphore to order it with respect to drawing commands, and - /// we can't attach new completion semaphores to a command submission after - /// it's been submitted. This means that, at submission time, we must create - /// the semaphore we might need if the caller's next action is to enqueue a - /// presentation of this image. - /// - /// An alternative strategy would be for presentation to enqueue an empty - /// submit, ordered relative to other submits in the usual way, and - /// signaling a single presentation semaphore. But we suspect that submits - /// are usually expensive enough, and semaphores usually cheap enough, that - /// performance-sensitive users will avoid making many submits, so that the - /// cost of accumulated semaphores will usually be less than the cost of an - /// additional submit. - /// - /// Only the first [`present_index`] semaphores in the vector are actually - /// going to be signalled by submitted commands, and need to be waited for - /// by the next present call. Any semaphores beyond that index were created - /// for prior presents and are simply being retained for recycling. - /// - /// [`present_index`]: SwapchainPresentSemaphores::present_index - /// [`vkQueuePresentKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueuePresentKHR - /// [`vkQueueSubmit`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueueSubmit - present: Vec<vk::Semaphore>, - - /// The number of semaphores in [`present`] to be signalled for this submission. - /// - /// [`present`]: SwapchainPresentSemaphores::present - present_index: usize, - - /// Which image this semaphore set is used for. - frame_index: usize, -} - -impl SwapchainPresentSemaphores { - pub fn new(frame_index: usize) -> Self { - Self { - present: Vec::new(), - present_index: 0, - frame_index, - } - } - - /// Return the semaphore that the next submission that writes to this image should - /// signal when it's done. - /// - /// See [`SwapchainPresentSemaphores::present`] for details. - fn get_submit_signal_semaphore( - &mut self, - device: &DeviceShared, - ) -> Result<vk::Semaphore, crate::DeviceError> { - // Try to recycle a semaphore we created for a previous presentation. - let sem = match self.present.get(self.present_index) { - Some(sem) => *sem, - None => { - let sem = device.new_binary_semaphore(&format!( - "SwapchainImageSemaphore: Image {} present semaphore {}", - self.frame_index, self.present_index - ))?; - self.present.push(sem); - sem - } - }; - - self.present_index += 1; - - Ok(sem) - } - - /// Indicates the cpu-side usage of this semaphore has finished for the frame, - /// so reset internal state to be ready for the next frame. - fn end_semaphore_usage(&mut self) { - // Reset the index to 0, so that the next time we get a semaphore, we - // start from the beginning of the list. - self.present_index = 0; - } - - /// Return the semaphores that a presentation of this image should wait on. - /// - /// Return a slice of semaphores that the call to [`vkQueueSubmit`] that - /// ends this image's acquisition should wait for. See - /// [`SwapchainPresentSemaphores::present`] for details. - /// - /// Reset `self` to be ready for the next acquisition cycle. - /// - /// [`vkQueueSubmit`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueueSubmit - fn get_present_wait_semaphores(&mut self) -> Vec<vk::Semaphore> { - self.present[0..self.present_index].to_vec() - } - - unsafe fn destroy(&self, device: &ash::Device) { - unsafe { - for sem in &self.present { - device.destroy_semaphore(*sem, None); - } - } - } -} - -struct Swapchain { - raw: vk::SwapchainKHR, - functor: khr::swapchain::Device, - device: Arc<DeviceShared>, - images: Vec<vk::Image>, - /// Fence used to wait on the acquired image. - fence: vk::Fence, - config: crate::SurfaceConfiguration, - - /// Semaphores used between image acquisition and the first submission - /// that uses that image. This is indexed using [`next_acquire_index`]. - /// - /// Because we need to provide this to [`vkAcquireNextImageKHR`], we haven't - /// received the swapchain image index for the frame yet, so we cannot use - /// that to index it. - /// - /// Before we pass this to [`vkAcquireNextImageKHR`], we ensure that we wait on - /// the submission indicated by [`previously_used_submission_index`]. This enusres - /// the semaphore is no longer in use before we use it. - /// - /// [`next_acquire_index`]: Swapchain::next_acquire_index - /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR - /// [`previously_used_submission_index`]: SwapchainAcquireSemaphore::previously_used_submission_index - acquire_semaphores: Vec<Arc<Mutex<SwapchainAcquireSemaphore>>>, - /// The index of the next acquire semaphore to use. - /// - /// This is incremented each time we acquire a new image, and wraps around - /// to 0 when it reaches the end of [`acquire_semaphores`]. - /// - /// [`acquire_semaphores`]: Swapchain::acquire_semaphores - next_acquire_index: usize, - - /// Semaphore sets used between all submissions that write to an image and - /// the presentation of that image. - /// - /// This is indexed by the swapchain image index returned by - /// [`vkAcquireNextImageKHR`]. - /// - /// We know it is safe to use these semaphores because use them - /// _after_ the acquire semaphore. Because the acquire semaphore - /// has been signaled, the previous presentation using that image - /// is known-finished, so this semaphore is no longer in use. - /// - /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR - present_semaphores: Vec<Arc<Mutex<SwapchainPresentSemaphores>>>, - - /// The present timing information which will be set in the next call to [`present()`](crate::Queue::present()). - /// - /// # Safety - /// - /// This must only be set if [`wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING`] is enabled, and - /// so the VK_GOOGLE_display_timing extension is present. - next_present_time: Option<vk::PresentTimeGOOGLE>, -} - -impl Swapchain { - /// Mark the current frame finished, advancing to the next acquire semaphore. - fn advance_acquire_semaphore(&mut self) { - let semaphore_count = self.acquire_semaphores.len(); - self.next_acquire_index = (self.next_acquire_index + 1) % semaphore_count; - } - - /// Get the next acquire semaphore that should be used with this swapchain. - fn get_acquire_semaphore(&self) -> Arc<Mutex<SwapchainAcquireSemaphore>> { - self.acquire_semaphores[self.next_acquire_index].clone() - } - - /// Get the set of present semaphores that should be used with the given image index. - fn get_present_semaphores(&self, index: u32) -> Arc<Mutex<SwapchainPresentSemaphores>> { - self.present_semaphores[index as usize].clone() - } -} - pub struct Surface { - raw: vk::SurfaceKHR, - functor: khr::surface::Instance, - instance: Arc<InstanceShared>, - swapchain: RwLock<Option<Swapchain>>, + inner: ManuallyDrop<Box<dyn swapchain::Surface>>, + swapchain: RwLock<Option<Box<dyn swapchain::Swapchain>>>, } impl Surface { - pub unsafe fn raw_handle(&self) -> vk::SurfaceKHR { - self.raw + /// Returns the raw Vulkan surface handle. + /// + /// Returns `None` if the surface is a DXGI surface. + pub unsafe fn raw_native_handle(&self) -> Option<vk::SurfaceKHR> { + Some( + self.inner + .as_any() + .downcast_ref::<swapchain::NativeSurface>()? + .as_raw(), + ) } /// Get the raw Vulkan swapchain associated with this surface. /// - /// Returns [`None`] if the surface is not configured. - pub fn raw_swapchain(&self) -> Option<vk::SwapchainKHR> { + /// Returns [`None`] if the surface is not configured or if the swapchain + /// is a DXGI swapchain. + pub fn raw_native_swapchain(&self) -> Option<vk::SwapchainKHR> { let read = self.swapchain.read(); - read.as_ref().map(|it| it.raw) + Some( + read.as_ref()? + .as_any() + .downcast_ref::<swapchain::NativeSwapchain>()? + .as_raw(), + ) } /// Set the present timing information which will be used for the next [presentation](crate::Queue::present()) of this surface, @@ -491,28 +235,20 @@ impl Surface { /// # Panics /// /// - If the surface hasn't been configured. + /// - If the surface has been configured for a DXGI swapchain. /// - If the device doesn't [support present timing](wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING). /// /// [VK_GOOGLE_display_timing]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_GOOGLE_display_timing.html #[track_caller] pub fn set_next_present_time(&self, present_timing: vk::PresentTimeGOOGLE) { let mut swapchain = self.swapchain.write(); - let swapchain = swapchain + swapchain .as_mut() - .expect("Surface should have been configured"); - let features = wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING; - if swapchain.device.features.contains(features) { - swapchain.next_present_time = Some(present_timing); - } else { - // Ideally we'd use something like `device.required_features` here, but that's in `wgpu-core`, which we are a dependency of - panic!( - concat!( - "Tried to set display timing properties ", - "without the corresponding feature ({:?}) enabled." - ), - features - ); - } + .expect("Surface should have been configured") + .as_any_mut() + .downcast_mut::<swapchain::NativeSwapchain>() + .expect("Surface should have a native Vulkan swapchain") + .set_next_present_time(present_timing); } } @@ -520,8 +256,7 @@ impl Surface { pub struct SurfaceTexture { index: u32, texture: Texture, - acquire_semaphores: Arc<Mutex<SwapchainAcquireSemaphore>>, - present_semaphores: Arc<Mutex<SwapchainPresentSemaphores>>, + metadata: Box<dyn swapchain::SurfaceTextureMetadata>, } impl crate::DynSurfaceTexture for SurfaceTexture {} @@ -854,7 +589,6 @@ impl RelaySemaphores { pub struct Queue { raw: vk::Queue, - swapchain_fn: khr::swapchain::Device, device: Arc<DeviceShared>, family_index: u32, relay_semaphores: Mutex<RelaySemaphores>, @@ -1472,56 +1206,43 @@ impl crate::Queue for Queue { ) -> Result<(), crate::DeviceError> { let mut fence_raw = vk::Fence::null(); - let mut wait_stage_masks = Vec::new(); - let mut wait_semaphores = Vec::new(); - let mut signal_semaphores = SemaphoreList::default(); + let mut wait_semaphores = SemaphoreList::new(SemaphoreListMode::Wait); + let mut signal_semaphores = SemaphoreList::new(SemaphoreListMode::Signal); // Double check that the same swapchain image isn't being given to us multiple times, // as that will deadlock when we try to lock them all. debug_assert!( { let mut check = HashSet::with_capacity(surface_textures.len()); - // We compare the Arcs by pointer, as Eq isn't well defined for SurfaceSemaphores. + // We compare the Box by pointer, as Eq isn't well defined for SurfaceSemaphores. for st in surface_textures { - check.insert(Arc::as_ptr(&st.acquire_semaphores) as usize); - check.insert(Arc::as_ptr(&st.present_semaphores) as usize); + let ptr: *const () = <*const _>::cast(&*st.metadata); + check.insert(ptr as usize); } - check.len() == surface_textures.len() * 2 + check.len() == surface_textures.len() }, "More than one surface texture is being used from the same swapchain. This will cause a deadlock in release." ); let locked_swapchain_semaphores = surface_textures .iter() - .map(|st| { - let acquire = st - .acquire_semaphores - .try_lock() - .expect("Failed to lock surface acquire semaphore"); - let present = st - .present_semaphores - .try_lock() - .expect("Failed to lock surface present semaphore"); - - (acquire, present) - }) + .map(|st| st.metadata.get_semaphore_guard()) .collect::<Vec<_>>(); - for (mut acquire_semaphore, mut present_semaphores) in locked_swapchain_semaphores { - acquire_semaphore.set_used_fence_value(signal_value); + for mut semaphores in locked_swapchain_semaphores { + semaphores.set_used_fence_value(signal_value); // If we're the first submission to operate on this image, wait on // its acquire semaphore, to make sure the presentation engine is // done with it. - if let Some(sem) = acquire_semaphore.get_acquire_wait_semaphore() { - wait_stage_masks.push(vk::PipelineStageFlags::TOP_OF_PIPE); - wait_semaphores.push(sem); + if let Some(sem) = semaphores.get_acquire_wait_semaphore() { + wait_semaphores.push_wait(sem, vk::PipelineStageFlags::TOP_OF_PIPE); } // Get a semaphore to signal when we're done writing to this surface // image. Presentation of this image will wait for this. - let signal_semaphore = present_semaphores.get_submit_signal_semaphore(&self.device)?; - signal_semaphores.push_binary(signal_semaphore); + let signal_semaphore = semaphores.get_submit_signal_semaphore(&self.device)?; + signal_semaphores.push_signal(signal_semaphore); } let mut guard = self.signal_semaphores.lock(); @@ -1534,17 +1255,19 @@ impl crate::Queue for Queue { let semaphore_state = self.relay_semaphores.lock().advance(&self.device)?; if let Some(sem) = semaphore_state.wait { - wait_stage_masks.push(vk::PipelineStageFlags::TOP_OF_PIPE); - wait_semaphores.push(sem); + wait_semaphores.push_wait( + SemaphoreType::Binary(sem), + vk::PipelineStageFlags::TOP_OF_PIPE, + ); } - signal_semaphores.push_binary(semaphore_state.signal); + signal_semaphores.push_signal(SemaphoreType::Binary(semaphore_state.signal)); // We need to signal our wgpu::Fence if we have one, this adds it to the signal list. signal_fence.maintain(&self.device.raw)?; match *signal_fence { Fence::TimelineSemaphore(raw) => { - signal_semaphores.push_timeline(raw, signal_value); + signal_semaphores.push_signal(SemaphoreType::Timeline(raw, signal_value)); } Fence::FencePool { ref mut active, @@ -1570,13 +1293,13 @@ impl crate::Queue for Queue { .collect::<Vec<_>>(); let mut vk_info = vk::SubmitInfo::default().command_buffers(&vk_cmd_buffers); - - vk_info = vk_info - .wait_semaphores(&wait_semaphores) - .wait_dst_stage_mask(&wait_stage_masks); - let mut vk_timeline_info = mem::MaybeUninit::uninit(); - vk_info = signal_semaphores.add_to_submit(vk_info, &mut vk_timeline_info); + vk_info = SemaphoreList::add_to_submit( + &mut wait_semaphores, + &mut signal_semaphores, + vk_info, + &mut vk_timeline_info, + ); profiling::scope!("vkQueueSubmit"); unsafe { @@ -1594,68 +1317,8 @@ impl crate::Queue for Queue { texture: SurfaceTexture, ) -> Result<(), crate::SurfaceError> { let mut swapchain = surface.swapchain.write(); - let ssc = swapchain.as_mut().unwrap(); - let mut acquire_semaphore = texture.acquire_semaphores.lock(); - let mut present_semaphores = texture.present_semaphores.lock(); - - let wait_semaphores = present_semaphores.get_present_wait_semaphores(); - - // Reset the acquire and present semaphores internal state - // to be ready for the next frame. - // - // We do this before the actual call to present to ensure that - // even if this method errors and early outs, we have reset - // the state for next frame. - acquire_semaphore.end_semaphore_usage(); - present_semaphores.end_semaphore_usage(); - - drop(acquire_semaphore); - - let swapchains = [ssc.raw]; - let image_indices = [texture.index]; - let vk_info = vk::PresentInfoKHR::default() - .swapchains(&swapchains) - .image_indices(&image_indices) - .wait_semaphores(&wait_semaphores); - - let mut display_timing; - let present_times; - let vk_info = if let Some(present_time) = ssc.next_present_time.take() { - debug_assert!( - ssc.device - .features - .contains(wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING), - "`next_present_time` should only be set if `VULKAN_GOOGLE_DISPLAY_TIMING` is enabled" - ); - present_times = [present_time]; - display_timing = vk::PresentTimesInfoGOOGLE::default().times(&present_times); - // SAFETY: We know that VK_GOOGLE_display_timing is present because of the safety contract on `next_present_time`. - vk_info.push_next(&mut display_timing) - } else { - vk_info - }; - let suboptimal = { - profiling::scope!("vkQueuePresentKHR"); - unsafe { self.swapchain_fn.queue_present(self.raw, &vk_info) }.map_err(|error| { - match error { - vk::Result::ERROR_OUT_OF_DATE_KHR => crate::SurfaceError::Outdated, - vk::Result::ERROR_SURFACE_LOST_KHR => crate::SurfaceError::Lost, - // We don't use VK_EXT_full_screen_exclusive - // VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT - _ => map_host_device_oom_and_lost_err(error).into(), - } - })? - }; - if suboptimal { - // We treat `VK_SUBOPTIMAL_KHR` as `VK_SUCCESS` on Android. - // On Android 10+, libvulkan's `vkQueuePresentKHR` implementation returns `VK_SUBOPTIMAL_KHR` if not doing pre-rotation - // (i.e `VkSwapchainCreateInfoKHR::preTransform` not being equal to the current device orientation). - // This is always the case when the device orientation is anything other than the identity one, as we unconditionally use `VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR`. - #[cfg(not(target_os = "android"))] - log::warn!("Suboptimal present of frame {}", texture.index); - } - Ok(()) + unsafe { swapchain.as_mut().unwrap().present(self, texture) } } unsafe fn get_timestamp_period(&self) -> f32 { @@ -1671,9 +1334,9 @@ impl Queue { pub fn add_signal_semaphore(&self, semaphore: vk::Semaphore, semaphore_value: Option<u64>) { let mut guard = self.signal_semaphores.lock(); if let Some(value) = semaphore_value { - guard.push_timeline(semaphore, value); + guard.push_signal(SemaphoreType::Timeline(semaphore, value)); } else { - guard.push_binary(semaphore); + guard.push_signal(SemaphoreType::Binary(semaphore)); } } } diff --git a/third_party/rust/wgpu-hal/src/vulkan/semaphore_list.rs b/third_party/rust/wgpu-hal/src/vulkan/semaphore_list.rs @@ -4,10 +4,17 @@ use alloc::vec::Vec; use ash::vk; use core::mem::MaybeUninit; -/// A list of Vulkan semaphores to signal. +#[derive(Debug, PartialEq)] +pub enum SemaphoreListMode { + Wait, + Signal, +} + +/// A list of Vulkan semaphores to wait for or signal. /// /// This represents a list of binary or timeline semaphores, together -/// with values for the timeline semaphores. +/// with values for the timeline semaphores, and stage masks, if these +/// are used for waiting. /// /// This type ensures that the array of semaphores to be signaled /// stays aligned with the array of values for timeline semaphores @@ -16,14 +23,17 @@ use core::mem::MaybeUninit; /// actually have. /// /// [`add_to_submit`]: SemaphoreList::add_to_submit -#[derive(Debug, Default)] +#[derive(Debug)] pub struct SemaphoreList { - /// Semaphores to signal. + /// Mode of the semaphore list. Used for validation. + mode: SemaphoreListMode, + + /// Semaphores to use. /// /// This can be a mix of binary and timeline semaphores. semaphores: Vec<vk::Semaphore>, - /// Values for timeline semaphores. + /// Values for the timeline semaphores. /// /// If no timeline semaphores are present in [`semaphores`], this /// is empty. If any timeline semaphores are present, then this @@ -33,9 +43,23 @@ pub struct SemaphoreList { /// /// [`semaphores`]: Self::semaphores values: Vec<u64>, + + /// Stage masks for wait semaphores. + /// + /// This is only used if `mode` is `Wait`. + pub stage_masks: Vec<vk::PipelineStageFlags>, } impl SemaphoreList { + pub fn new(mode: SemaphoreListMode) -> Self { + Self { + mode, + semaphores: Vec::new(), + values: Vec::new(), + stage_masks: Vec::new(), + } + } + pub fn is_empty(&self) -> bool { self.semaphores.is_empty() } @@ -50,43 +74,83 @@ impl SemaphoreList { /// list's values, and add it to `submit_info`s extension chain. /// /// Return the revised `submit_info` value. - pub fn add_to_submit<'i, 's: 'i>( - &'s self, - submit_info: vk::SubmitInfo<'i>, - timeline_info: &'i mut MaybeUninit<vk::TimelineSemaphoreSubmitInfo<'i>>, - ) -> vk::SubmitInfo<'i> { - self.check(); - let mut submit_info = submit_info.signal_semaphores(&self.semaphores); - if !self.values.is_empty() { - let timeline_info = timeline_info.write( - vk::TimelineSemaphoreSubmitInfo::default().signal_semaphore_values(&self.values), - ); + pub fn add_to_submit<'info, 'semaphores: 'info>( + wait_semaphores: &'semaphores mut Self, + signal_semaphores: &'semaphores mut Self, + submit_info: vk::SubmitInfo<'info>, + timeline_info: &'info mut MaybeUninit<vk::TimelineSemaphoreSubmitInfo<'info>>, + ) -> vk::SubmitInfo<'info> { + wait_semaphores.check(); + signal_semaphores.check(); + + assert!(matches!(wait_semaphores.mode, SemaphoreListMode::Wait)); + assert!(matches!(signal_semaphores.mode, SemaphoreListMode::Signal)); + + let timeline_info = timeline_info.write(vk::TimelineSemaphoreSubmitInfo::default()); + + let mut uses_timeline = false; + + if !wait_semaphores.values.is_empty() { + *timeline_info = timeline_info.wait_semaphore_values(&wait_semaphores.values); + uses_timeline = true; + } + + if !signal_semaphores.values.is_empty() { + *timeline_info = timeline_info.signal_semaphore_values(&signal_semaphores.values); + uses_timeline = true; + } + + let mut submit_info = submit_info + .wait_semaphores(&wait_semaphores.semaphores) + .wait_dst_stage_mask(&wait_semaphores.stage_masks) + .signal_semaphores(&signal_semaphores.semaphores); + + if uses_timeline { submit_info = submit_info.push_next(timeline_info); } + submit_info } - /// Add a binary semaphore to this list. - pub fn push_binary(&mut self, semaphore: vk::Semaphore) { - self.semaphores.push(semaphore); - // Push a dummy value if necessary. - if !self.values.is_empty() { - self.values.push(!0); - } - self.check(); + /// Add a semaphore to be signaled. Panics if this is a list of semaphores to wait. + pub fn push_signal(&mut self, semaphore: SemaphoreType) { + assert!(matches!(self.mode, SemaphoreListMode::Signal)); + self.push_inner(semaphore); + } + + /// Add a semaphore to be waited for. Panics if this is a list of semaphores to signal. + pub fn push_wait(&mut self, semaphore: SemaphoreType, stage: vk::PipelineStageFlags) { + assert!(matches!(self.mode, SemaphoreListMode::Wait)); + + self.stage_masks.push(stage); + self.push_inner(semaphore); } - /// Add a timeline semaphore to this list, to be signalled with - /// `value`. - pub fn push_timeline(&mut self, semaphore: vk::Semaphore, value: u64) { - self.pad_values(); - self.semaphores.push(semaphore); - self.values.push(value); + fn push_inner(&mut self, semaphore: SemaphoreType) { + match semaphore { + SemaphoreType::Binary(semaphore) => { + self.semaphores.push(semaphore); + // Push a dummy value if necessary. + if !self.values.is_empty() { + self.values.push(!0); + } + } + SemaphoreType::Timeline(semaphore, value) => { + // We may be the first timeline semaphore, ensure that the values + // array is filled with dummy values for existing binary semaphores. + self.pad_values(); + self.semaphores.push(semaphore); + self.values.push(value); + } + } + self.check(); } /// Append `other` to `self`, leaving `other` empty. pub fn append(&mut self, other: &mut Self) { + assert_eq!(self.mode, other.mode); + // If we're about to receive values, ensure we're aligned first. if !other.values.is_empty() { self.pad_values(); @@ -97,6 +161,7 @@ impl SemaphoreList { if !self.values.is_empty() { self.pad_values(); } + self.stage_masks.append(&mut other.stage_masks); self.check(); } @@ -111,5 +176,20 @@ impl SemaphoreList { #[track_caller] fn check(&self) { debug_assert!(self.values.is_empty() || self.values.len() == self.semaphores.len()); + match self.mode { + SemaphoreListMode::Wait => { + debug_assert!( + self.stage_masks.is_empty() || self.stage_masks.len() == self.semaphores.len() + ); + } + SemaphoreListMode::Signal => { + debug_assert!(self.stage_masks.is_empty()); + } + } } } + +pub enum SemaphoreType { + Binary(vk::Semaphore), + Timeline(vk::Semaphore, u64), +} diff --git a/third_party/rust/wgpu-hal/src/vulkan/swapchain/mod.rs b/third_party/rust/wgpu-hal/src/vulkan/swapchain/mod.rs @@ -0,0 +1,107 @@ +use alloc::boxed::Box; +use core::{any::Any, fmt::Debug, time::Duration}; + +use crate::vulkan::{semaphore_list::SemaphoreType, DeviceShared}; + +pub(super) use native::*; + +mod native; + +pub(super) trait Surface: Send + Sync + 'static { + /// Deletes the surface and associated resources. + /// + /// The surface must not be in use when it is deleted. + unsafe fn delete_surface(self: Box<Self>); + + /// Returns the surface capabilities for the given adapter. + /// + /// Returns `None` if the surface is not compatible with the adapter. + fn surface_capabilities(&self, adapter: &super::Adapter) -> Option<crate::SurfaceCapabilities>; + + /// Creates a swapchain for the surface with the given configuration. + /// + /// If this is not the first swapchain created for the surface, the old swapchain + /// must be provided. [`Swapchain::release_resources`] must be called on the old swapchain + /// before calling this method. + unsafe fn create_swapchain( + &self, + device: &super::Device, + config: &crate::SurfaceConfiguration, + provided_old_swapchain: Option<Box<dyn Swapchain>>, + ) -> Result<Box<dyn Swapchain>, crate::SurfaceError>; + + /// Allows downcasting to the concrete type. + fn as_any(&self) -> &dyn Any; +} + +pub(super) trait Swapchain: Send + Sync + 'static { + /// Releases all resources associated with the swapchain, without + /// destroying the swapchain itself. Must be called before calling + /// either [`Surface::create_swapchain`] or [`Swapchain::delete_swapchain`]. + /// + /// The swapchain must not be in use when this is called. + unsafe fn release_resources(&mut self, device: &super::Device); + + /// Deletes the swapchain. + /// + /// The swapchain must not be in use when it is deleted and + /// [`Swapchain::release_resources`] must have been called first. + unsafe fn delete_swapchain(self: Box<Self>); + + /// Acquires the next available surface texture for rendering. + /// + /// `timeout` specifies the maximum time to wait for an image to become available. + /// If `None` is specified, this function will wait indefinitely. + /// + /// Returns `Ok(None)` if the timeout elapsed before an image became available. + unsafe fn acquire( + &mut self, + timeout: Option<Duration>, + fence: &super::Fence, + ) -> Result<Option<crate::AcquiredSurfaceTexture<crate::api::Vulkan>>, crate::SurfaceError>; + + /// Tries to discard the acquired texture without presenting it. + /// + /// In practice, this doesn't really work in the current implementations. + unsafe fn discard_texture( + &mut self, + texture: super::SurfaceTexture, + ) -> Result<(), crate::SurfaceError>; + + /// Presents the given surface texture using the queue. + unsafe fn present( + &mut self, + queue: &super::Queue, + texture: crate::vulkan::SurfaceTexture, + ) -> Result<(), crate::SurfaceError>; + + /// Allows downcasting to the concrete type. + fn as_any(&self) -> &dyn Any; + + /// Allows downcasting to the concrete type mutably. + fn as_any_mut(&mut self) -> &mut dyn Any; +} + +/// Swapchain specific metadata associated with a surface texture. +pub(super) trait SurfaceTextureMetadata: Debug + Send + Sync + 'static { + /// Returns a guard which can yield the semaphores needed for submission using this swapchain texture. + fn get_semaphore_guard(&self) -> Box<dyn SwapchainSubmissionSemaphoreGuard + '_>; + + /// Allows downcasting to the concrete type. + fn as_any(&self) -> &dyn Any; +} + +/// Guard type for managing swapchain submission semaphores. +pub(super) trait SwapchainSubmissionSemaphoreGuard { + /// Sets the Fence value for this submission. + fn set_used_fence_value(&mut self, value: u64); + + /// Gets semaphores to wait on before doing GPU work for this swapchain texture. + fn get_acquire_wait_semaphore(&mut self) -> Option<SemaphoreType>; + + /// Gets the semaphore to signal when GPU work for this swapchain texture is complete. + fn get_submit_signal_semaphore( + &mut self, + device: &DeviceShared, + ) -> Result<SemaphoreType, crate::DeviceError>; +} diff --git a/third_party/rust/wgpu-hal/src/vulkan/swapchain/native.rs b/third_party/rust/wgpu-hal/src/vulkan/swapchain/native.rs @@ -0,0 +1,904 @@ +//! Vulkan Surface and Swapchain implementation using native Vulkan surfaces. + +use alloc::{boxed::Box, sync::Arc, vec::Vec}; +use core::any::Any; + +use ash::{khr, vk}; +use parking_lot::{Mutex, MutexGuard}; + +use crate::vulkan::{ + conv, map_host_device_oom_and_lost_err, + semaphore_list::SemaphoreType, + swapchain::{Surface, SurfaceTextureMetadata, Swapchain, SwapchainSubmissionSemaphoreGuard}, + DeviceShared, InstanceShared, +}; + +pub(crate) struct NativeSurface { + raw: vk::SurfaceKHR, + functor: khr::surface::Instance, + instance: Arc<InstanceShared>, +} + +impl NativeSurface { + pub fn from_vk_surface_khr(instance: &crate::vulkan::Instance, raw: vk::SurfaceKHR) -> Self { + let functor = khr::surface::Instance::new(&instance.shared.entry, &instance.shared.raw); + Self { + raw, + functor, + instance: Arc::clone(&instance.shared), + } + } + + pub fn as_raw(&self) -> vk::SurfaceKHR { + self.raw + } +} + +impl Surface for NativeSurface { + unsafe fn delete_surface(self: Box<Self>) { + unsafe { + self.functor.destroy_surface(self.raw, None); + } + } + + fn surface_capabilities( + &self, + adapter: &crate::vulkan::Adapter, + ) -> Option<crate::SurfaceCapabilities> { + if !adapter.private_caps.can_present { + return None; + } + let queue_family_index = 0; //TODO + { + profiling::scope!("vkGetPhysicalDeviceSurfaceSupportKHR"); + match unsafe { + self.functor.get_physical_device_surface_support( + adapter.raw, + queue_family_index, + self.raw, + ) + } { + Ok(true) => (), + Ok(false) => return None, + Err(e) => { + log::error!("get_physical_device_surface_support: {e}"); + return None; + } + } + } + + let caps = { + profiling::scope!("vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); + match unsafe { + self.functor + .get_physical_device_surface_capabilities(adapter.raw, self.raw) + } { + Ok(caps) => caps, + Err(e) => { + log::error!("get_physical_device_surface_capabilities: {e}"); + return None; + } + } + }; + + // If image count is 0, the support number of images is unlimited. + let max_image_count = if caps.max_image_count == 0 { + !0 + } else { + caps.max_image_count + }; + + // `0xFFFFFFFF` indicates that the extent depends on the created swapchain. + let current_extent = if caps.current_extent.width != !0 && caps.current_extent.height != !0 + { + Some(wgt::Extent3d { + width: caps.current_extent.width, + height: caps.current_extent.height, + depth_or_array_layers: 1, + }) + } else { + None + }; + + let raw_present_modes = { + profiling::scope!("vkGetPhysicalDeviceSurfacePresentModesKHR"); + match unsafe { + self.functor + .get_physical_device_surface_present_modes(adapter.raw, self.raw) + } { + Ok(present_modes) => present_modes, + Err(e) => { + log::error!("get_physical_device_surface_present_modes: {e}"); + // Per definition of `SurfaceCapabilities`, there must be at least one present mode. + return None; + } + } + }; + + let raw_surface_formats = { + profiling::scope!("vkGetPhysicalDeviceSurfaceFormatsKHR"); + match unsafe { + self.functor + .get_physical_device_surface_formats(adapter.raw, self.raw) + } { + Ok(formats) => formats, + Err(e) => { + log::error!("get_physical_device_surface_formats: {e}"); + // Per definition of `SurfaceCapabilities`, there must be at least one present format. + return None; + } + } + }; + + let formats = raw_surface_formats + .into_iter() + .filter_map(conv::map_vk_surface_formats) + .collect(); + Some(crate::SurfaceCapabilities { + formats, + // TODO: Right now we're always truncating the swap chain + // (presumably - we're actually setting the min image count which isn't necessarily the swap chain size) + // Instead, we should use extensions when available to wait in present. + // See https://github.com/gfx-rs/wgpu/issues/2869 + maximum_frame_latency: (caps.min_image_count - 1)..=(max_image_count - 1), // Note this can't underflow since both `min_image_count` is at least one and we already patched `max_image_count`. + current_extent, + usage: conv::map_vk_image_usage(caps.supported_usage_flags), + present_modes: raw_present_modes + .into_iter() + .flat_map(conv::map_vk_present_mode) + .collect(), + composite_alpha_modes: conv::map_vk_composite_alpha(caps.supported_composite_alpha), + }) + } + + unsafe fn create_swapchain( + &self, + device: &crate::vulkan::Device, + config: &crate::SurfaceConfiguration, + provided_old_swapchain: Option<Box<dyn Swapchain>>, + ) -> Result<Box<dyn Swapchain>, crate::SurfaceError> { + profiling::scope!("Device::create_swapchain"); + let functor = khr::swapchain::Device::new(&self.instance.raw, &device.shared.raw); + + let old_swapchain = match provided_old_swapchain { + Some(osc) => osc.as_any().downcast_ref::<NativeSwapchain>().unwrap().raw, + None => vk::SwapchainKHR::null(), + }; + + let color_space = if config.format == wgt::TextureFormat::Rgba16Float { + // Enable wide color gamut mode + // Vulkan swapchain for Android only supports DISPLAY_P3_NONLINEAR_EXT and EXTENDED_SRGB_LINEAR_EXT + vk::ColorSpaceKHR::EXTENDED_SRGB_LINEAR_EXT + } else { + vk::ColorSpaceKHR::SRGB_NONLINEAR + }; + + let original_format = device.shared.private_caps.map_texture_format(config.format); + let mut raw_flags = vk::SwapchainCreateFlagsKHR::empty(); + let mut raw_view_formats: Vec<vk::Format> = vec![]; + if !config.view_formats.is_empty() { + raw_flags |= vk::SwapchainCreateFlagsKHR::MUTABLE_FORMAT; + raw_view_formats = config + .view_formats + .iter() + .map(|f| device.shared.private_caps.map_texture_format(*f)) + .collect(); + raw_view_formats.push(original_format); + } + + let mut info = vk::SwapchainCreateInfoKHR::default() + .flags(raw_flags) + .surface(self.raw) + .min_image_count(config.maximum_frame_latency + 1) // TODO: https://github.com/gfx-rs/wgpu/issues/2869 + .image_format(original_format) + .image_color_space(color_space) + .image_extent(vk::Extent2D { + width: config.extent.width, + height: config.extent.height, + }) + .image_array_layers(config.extent.depth_or_array_layers) + .image_usage(conv::map_texture_usage(config.usage)) + .image_sharing_mode(vk::SharingMode::EXCLUSIVE) + .pre_transform(vk::SurfaceTransformFlagsKHR::IDENTITY) + .composite_alpha(conv::map_composite_alpha_mode(config.composite_alpha_mode)) + .present_mode(conv::map_present_mode(config.present_mode)) + .clipped(true) + .old_swapchain(old_swapchain); + + let mut format_list_info = vk::ImageFormatListCreateInfo::default(); + if !raw_view_formats.is_empty() { + format_list_info = format_list_info.view_formats(&raw_view_formats); + info = info.push_next(&mut format_list_info); + } + + let result = { + profiling::scope!("vkCreateSwapchainKHR"); + unsafe { functor.create_swapchain(&info, None) } + }; + + // doing this before bailing out with error + if old_swapchain != vk::SwapchainKHR::null() { + unsafe { functor.destroy_swapchain(old_swapchain, None) } + } + + let raw = match result { + Ok(swapchain) => swapchain, + Err(error) => { + return Err(match error { + vk::Result::ERROR_SURFACE_LOST_KHR + | vk::Result::ERROR_INITIALIZATION_FAILED => crate::SurfaceError::Lost, + vk::Result::ERROR_NATIVE_WINDOW_IN_USE_KHR => { + crate::SurfaceError::Other("Native window is in use") + } + // We don't use VK_EXT_image_compression_control + // VK_ERROR_COMPRESSION_EXHAUSTED_EXT + other => map_host_device_oom_and_lost_err(other).into(), + }); + } + }; + + let images = unsafe { functor.get_swapchain_images(raw) } + .map_err(crate::vulkan::map_host_device_oom_err)?; + + let fence = unsafe { + device + .shared + .raw + .create_fence(&vk::FenceCreateInfo::default(), None) + .map_err(crate::vulkan::map_host_device_oom_err)? + }; + + // NOTE: It's important that we define the same number of acquire/present semaphores + // as we will need to index into them with the image index. + let acquire_semaphores = (0..images.len()) + .map(|i| { + SwapchainAcquireSemaphore::new(&device.shared, i) + .map(Mutex::new) + .map(Arc::new) + }) + .collect::<Result<Vec<_>, _>>()?; + + let present_semaphores = (0..images.len()) + .map(|i| Arc::new(Mutex::new(SwapchainPresentSemaphores::new(i)))) + .collect::<Vec<_>>(); + + Ok(Box::new(NativeSwapchain { + raw, + functor, + device: Arc::clone(&device.shared), + images, + fence, + config: config.clone(), + acquire_semaphores, + next_acquire_index: 0, + present_semaphores, + next_present_time: None, + })) + } + + fn as_any(&self) -> &dyn Any { + self + } +} + +pub(crate) struct NativeSwapchain { + raw: vk::SwapchainKHR, + functor: khr::swapchain::Device, + device: Arc<DeviceShared>, + images: Vec<vk::Image>, + /// Fence used to wait on the acquired image. + fence: vk::Fence, + config: crate::SurfaceConfiguration, + + /// Semaphores used between image acquisition and the first submission + /// that uses that image. This is indexed using [`next_acquire_index`]. + /// + /// Because we need to provide this to [`vkAcquireNextImageKHR`], we haven't + /// received the swapchain image index for the frame yet, so we cannot use + /// that to index it. + /// + /// Before we pass this to [`vkAcquireNextImageKHR`], we ensure that we wait on + /// the submission indicated by [`previously_used_submission_index`]. This ensures + /// the semaphore is no longer in use before we use it. + /// + /// [`next_acquire_index`]: NativeSwapchain::next_acquire_index + /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR + /// [`previously_used_submission_index`]: SwapchainAcquireSemaphore::previously_used_submission_index + acquire_semaphores: Vec<Arc<Mutex<SwapchainAcquireSemaphore>>>, + /// The index of the next acquire semaphore to use. + /// + /// This is incremented each time we acquire a new image, and wraps around + /// to 0 when it reaches the end of [`acquire_semaphores`]. + /// + /// [`acquire_semaphores`]: NativeSwapchain::acquire_semaphores + next_acquire_index: usize, + + /// Semaphore sets used between all submissions that write to an image and + /// the presentation of that image. + /// + /// This is indexed by the swapchain image index returned by + /// [`vkAcquireNextImageKHR`]. + /// + /// We know it is safe to use these semaphores because use them + /// _after_ the acquire semaphore. Because the acquire semaphore + /// has been signaled, the previous presentation using that image + /// is known-finished, so this semaphore is no longer in use. + /// + /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR + present_semaphores: Vec<Arc<Mutex<SwapchainPresentSemaphores>>>, + + /// The present timing information which will be set in the next call to [`present()`](crate::Queue::present()). + /// + /// # Safety + /// + /// This must only be set if [`wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING`] is enabled, and + /// so the VK_GOOGLE_display_timing extension is present. + next_present_time: Option<vk::PresentTimeGOOGLE>, +} + +impl Swapchain for NativeSwapchain { + unsafe fn release_resources(&mut self, device: &crate::vulkan::Device) { + profiling::scope!("Swapchain::release_resources"); + { + profiling::scope!("vkDeviceWaitIdle"); + // We need to also wait until all presentation work is done. Because there is no way to portably wait until + // the presentation work is done, we are forced to wait until the device is idle. + let _ = unsafe { + device + .shared + .raw + .device_wait_idle() + .map_err(map_host_device_oom_and_lost_err) + }; + }; + + unsafe { device.shared.raw.destroy_fence(self.fence, None) } + + // We cannot take this by value, as the function returns `self`. + for semaphore in self.acquire_semaphores.drain(..) { + let arc_removed = Arc::into_inner(semaphore).expect( + "Trying to destroy a SwapchainAcquireSemaphore that is still in use by a SurfaceTexture", + ); + let mutex_removed = arc_removed.into_inner(); + + unsafe { mutex_removed.destroy(&device.shared.raw) }; + } + + for semaphore in self.present_semaphores.drain(..) { + let arc_removed = Arc::into_inner(semaphore).expect( + "Trying to destroy a SwapchainPresentSemaphores that is still in use by a SurfaceTexture", + ); + let mutex_removed = arc_removed.into_inner(); + + unsafe { mutex_removed.destroy(&device.shared.raw) }; + } + } + + unsafe fn delete_swapchain(self: Box<Self>) { + unsafe { self.functor.destroy_swapchain(self.raw, None) }; + } + + unsafe fn acquire( + &mut self, + timeout: Option<core::time::Duration>, + fence: &crate::vulkan::Fence, + ) -> Result<Option<crate::AcquiredSurfaceTexture<crate::api::Vulkan>>, crate::SurfaceError> + { + let mut timeout_ns = match timeout { + Some(duration) => duration.as_nanos() as u64, + None => u64::MAX, + }; + + // AcquireNextImageKHR on Android (prior to Android 11) doesn't support timeouts + // and will also log verbose warnings if tying to use a timeout. + // + // Android 10 implementation for reference: + // https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-10.0.0_r13/vulkan/libvulkan/swapchain.cpp#1426 + // Android 11 implementation for reference: + // https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-11.0.0_r45/vulkan/libvulkan/swapchain.cpp#1438 + // + // Android 11 corresponds to an SDK_INT/ro.build.version.sdk of 30 + if cfg!(target_os = "android") && self.device.instance.android_sdk_version < 30 { + timeout_ns = u64::MAX; + } + + let acquire_semaphore_arc = self.get_acquire_semaphore(); + // Nothing should be using this, so we don't block, but panic if we fail to lock. + let acquire_semaphore_guard = acquire_semaphore_arc + .try_lock() + .expect("Failed to lock a SwapchainSemaphores."); + + // Wait for all commands writing to the previously acquired image to + // complete. + // + // Almost all the steps in the usual acquire-draw-present flow are + // asynchronous: they get something started on the presentation engine + // or the GPU, but on the CPU, control returns immediately. Without some + // sort of intervention, the CPU could crank out frames much faster than + // the presentation engine can display them. + // + // This is the intervention: if any submissions drew on this image, and + // thus waited for `locked_swapchain_semaphores.acquire`, wait for all + // of them to finish, thus ensuring that it's okay to pass `acquire` to + // `vkAcquireNextImageKHR` again. + self.device.wait_for_fence( + fence, + acquire_semaphore_guard.previously_used_submission_index, + timeout_ns, + )?; + + // will block if no image is available + let (index, suboptimal) = match unsafe { + profiling::scope!("vkAcquireNextImageKHR"); + self.functor.acquire_next_image( + self.raw, + timeout_ns, + acquire_semaphore_guard.acquire, + self.fence, + ) + } { + // We treat `VK_SUBOPTIMAL_KHR` as `VK_SUCCESS` on Android. + // See the comment in `Queue::present`. + #[cfg(target_os = "android")] + Ok((index, _)) => (index, false), + #[cfg(not(target_os = "android"))] + Ok(pair) => pair, + Err(error) => { + return match error { + vk::Result::TIMEOUT => Ok(None), + vk::Result::NOT_READY | vk::Result::ERROR_OUT_OF_DATE_KHR => { + Err(crate::SurfaceError::Outdated) + } + vk::Result::ERROR_SURFACE_LOST_KHR => Err(crate::SurfaceError::Lost), + // We don't use VK_EXT_full_screen_exclusive + // VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT + other => Err(map_host_device_oom_and_lost_err(other).into()), + }; + } + }; + + // Wait for the image was acquired to be fully ready to be rendered too. + // + // This wait is very important on Windows to avoid bad frame pacing on + // Windows where the Vulkan driver is using a DXGI swapchain. See + // https://github.com/gfx-rs/wgpu/issues/8310 and + // https://github.com/gfx-rs/wgpu/issues/8354 for more details. + // + // On other platforms, this wait may serve to slightly decrease frame + // latency, depending on how the platform implements waiting within + // acquire. + unsafe { + self.device + .raw + .wait_for_fences(&[self.fence], false, timeout_ns) + .map_err(map_host_device_oom_and_lost_err)?; + + self.device + .raw + .reset_fences(&[self.fence]) + .map_err(map_host_device_oom_and_lost_err)?; + } + + drop(acquire_semaphore_guard); + // We only advance the surface semaphores if we successfully acquired an image, otherwise + // we should try to re-acquire using the same semaphores. + self.advance_acquire_semaphore(); + + let present_semaphore_arc = self.get_present_semaphores(index); + + // special case for Intel Vulkan returning bizarre values (ugh) + if self.device.vendor_id == crate::auxil::db::intel::VENDOR && index > 0x100 { + return Err(crate::SurfaceError::Outdated); + } + + let identity = self.device.texture_identity_factory.next(); + + let texture = crate::vulkan::SurfaceTexture { + index, + texture: crate::vulkan::Texture { + raw: self.images[index as usize], + drop_guard: None, + block: None, + external_memory: None, + format: self.config.format, + copy_size: crate::CopyExtent { + width: self.config.extent.width, + height: self.config.extent.height, + depth: 1, + }, + identity, + }, + metadata: Box::new(NativeSurfaceTextureMetadata { + acquire_semaphores: acquire_semaphore_arc, + present_semaphores: present_semaphore_arc, + }), + }; + Ok(Some(crate::AcquiredSurfaceTexture { + texture, + suboptimal, + })) + } + + unsafe fn discard_texture( + &mut self, + _texture: crate::vulkan::SurfaceTexture, + ) -> Result<(), crate::SurfaceError> { + // TODO: Current implementation no-ops + Ok(()) + } + + unsafe fn present( + &mut self, + queue: &crate::vulkan::Queue, + texture: crate::vulkan::SurfaceTexture, + ) -> Result<(), crate::SurfaceError> { + let metadata = texture + .metadata + .as_any() + .downcast_ref::<NativeSurfaceTextureMetadata>() + .unwrap(); + let mut acquire_semaphore = metadata.acquire_semaphores.lock(); + let mut present_semaphores = metadata.present_semaphores.lock(); + + let wait_semaphores = present_semaphores.get_present_wait_semaphores(); + + // Reset the acquire and present semaphores internal state + // to be ready for the next frame. + // + // We do this before the actual call to present to ensure that + // even if this method errors and early outs, we have reset + // the state for next frame. + acquire_semaphore.end_semaphore_usage(); + present_semaphores.end_semaphore_usage(); + + drop(acquire_semaphore); + + let swapchains = [self.raw]; + let image_indices = [texture.index]; + let vk_info = vk::PresentInfoKHR::default() + .swapchains(&swapchains) + .image_indices(&image_indices) + .wait_semaphores(&wait_semaphores); + + let mut display_timing; + let present_times; + let vk_info = if let Some(present_time) = self.next_present_time.take() { + debug_assert!( + self.device + .features + .contains(wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING), + "`next_present_time` should only be set if `VULKAN_GOOGLE_DISPLAY_TIMING` is enabled" + ); + present_times = [present_time]; + display_timing = vk::PresentTimesInfoGOOGLE::default().times(&present_times); + // SAFETY: We know that VK_GOOGLE_display_timing is present because of the safety contract on `next_present_time`. + vk_info.push_next(&mut display_timing) + } else { + vk_info + }; + + let suboptimal = { + profiling::scope!("vkQueuePresentKHR"); + unsafe { self.functor.queue_present(queue.raw, &vk_info) }.map_err(|error| { + match error { + vk::Result::ERROR_OUT_OF_DATE_KHR => crate::SurfaceError::Outdated, + vk::Result::ERROR_SURFACE_LOST_KHR => crate::SurfaceError::Lost, + // We don't use VK_EXT_full_screen_exclusive + // VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT + _ => map_host_device_oom_and_lost_err(error).into(), + } + })? + }; + if suboptimal { + // We treat `VK_SUBOPTIMAL_KHR` as `VK_SUCCESS` on Android. + // On Android 10+, libvulkan's `vkQueuePresentKHR` implementation returns `VK_SUBOPTIMAL_KHR` if not doing pre-rotation + // (i.e `VkSwapchainCreateInfoKHR::preTransform` not being equal to the current device orientation). + // This is always the case when the device orientation is anything other than the identity one, as we unconditionally use `VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR`. + #[cfg(not(target_os = "android"))] + log::warn!("Suboptimal present of frame {}", texture.index); + } + Ok(()) + } + + fn as_any(&self) -> &dyn Any { + self + } + + fn as_any_mut(&mut self) -> &mut dyn Any { + self + } +} + +impl NativeSwapchain { + pub(crate) fn as_raw(&self) -> vk::SwapchainKHR { + self.raw + } + + pub fn set_next_present_time(&mut self, present_timing: vk::PresentTimeGOOGLE) { + let features = wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING; + if self.device.features.contains(features) { + self.next_present_time = Some(present_timing); + } else { + // Ideally we'd use something like `device.required_features` here, but that's in `wgpu-core`, which we are a dependency of + panic!( + concat!( + "Tried to set display timing properties ", + "without the corresponding feature ({:?}) enabled." + ), + features + ); + } + } + + /// Mark the current frame finished, advancing to the next acquire semaphore. + fn advance_acquire_semaphore(&mut self) { + let semaphore_count = self.acquire_semaphores.len(); + self.next_acquire_index = (self.next_acquire_index + 1) % semaphore_count; + } + + /// Get the next acquire semaphore that should be used with this swapchain. + fn get_acquire_semaphore(&self) -> Arc<Mutex<SwapchainAcquireSemaphore>> { + self.acquire_semaphores[self.next_acquire_index].clone() + } + + /// Get the set of present semaphores that should be used with the given image index. + fn get_present_semaphores(&self, index: u32) -> Arc<Mutex<SwapchainPresentSemaphores>> { + self.present_semaphores[index as usize].clone() + } +} + +/// Semaphore used to acquire a swapchain image. +#[derive(Debug)] +struct SwapchainAcquireSemaphore { + /// A semaphore that is signaled when this image is safe for us to modify. + /// + /// When [`vkAcquireNextImageKHR`] returns the index of the next swapchain + /// image that we should use, that image may actually still be in use by the + /// presentation engine, and is not yet safe to modify. However, that + /// function does accept a semaphore that it will signal when the image is + /// indeed safe to begin messing with. + /// + /// This semaphore is: + /// + /// - waited for by the first queue submission to operate on this image + /// since it was acquired, and + /// + /// - signaled by [`vkAcquireNextImageKHR`] when the acquired image is ready + /// for us to use. + /// + /// [`vkAcquireNextImageKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkAcquireNextImageKHR + acquire: vk::Semaphore, + + /// True if the next command submission operating on this image should wait + /// for [`acquire`]. + /// + /// We must wait for `acquire` before drawing to this swapchain image, but + /// because `wgpu-hal` queue submissions are always strongly ordered, only + /// the first submission that works with a swapchain image actually needs to + /// wait. We set this flag when this image is acquired, and clear it the + /// first time it's passed to [`Queue::submit`] as a surface texture. + /// + /// Additionally, semaphores can only be waited on once, so we need to ensure + /// that we only actually pass this semaphore to the first submission that + /// uses that image. + /// + /// [`acquire`]: SwapchainAcquireSemaphore::acquire + /// [`Queue::submit`]: crate::Queue::submit + should_wait_for_acquire: bool, + + /// The fence value of the last command submission that wrote to this image. + /// + /// The next time we try to acquire this image, we'll block until + /// this submission finishes, proving that [`acquire`] is ready to + /// pass to `vkAcquireNextImageKHR` again. + /// + /// [`acquire`]: SwapchainAcquireSemaphore::acquire + previously_used_submission_index: crate::FenceValue, +} + +impl SwapchainAcquireSemaphore { + fn new(device: &DeviceShared, index: usize) -> Result<Self, crate::DeviceError> { + Ok(Self { + acquire: device + .new_binary_semaphore(&format!("SwapchainImageSemaphore: Index {index} acquire"))?, + should_wait_for_acquire: true, + previously_used_submission_index: 0, + }) + } + + /// Sets the fence value which the next acquire will wait for. This prevents + /// the semaphore from being used while the previous submission is still in flight. + fn set_used_fence_value(&mut self, value: crate::FenceValue) { + self.previously_used_submission_index = value; + } + + /// Return the semaphore that commands drawing to this image should wait for, if any. + /// + /// This only returns `Some` once per acquisition; see + /// [`SwapchainAcquireSemaphore::should_wait_for_acquire`] for details. + fn get_acquire_wait_semaphore(&mut self) -> Option<vk::Semaphore> { + if self.should_wait_for_acquire { + self.should_wait_for_acquire = false; + Some(self.acquire) + } else { + None + } + } + + /// Indicates the cpu-side usage of this semaphore has finished for the frame, + /// so reset internal state to be ready for the next frame. + fn end_semaphore_usage(&mut self) { + // Reset the acquire semaphore, so that the next time we acquire this + // image, we can wait for it again. + self.should_wait_for_acquire = true; + } + + unsafe fn destroy(&self, device: &ash::Device) { + unsafe { + device.destroy_semaphore(self.acquire, None); + } + } +} + +#[derive(Debug)] +struct SwapchainPresentSemaphores { + /// A pool of semaphores for ordering presentation after drawing. + /// + /// The first [`present_index`] semaphores in this vector are: + /// + /// - all waited on by the call to [`vkQueuePresentKHR`] that presents this + /// image, and + /// + /// - each signaled by some [`vkQueueSubmit`] queue submission that draws to + /// this image, when the submission finishes execution. + /// + /// This vector accumulates one semaphore per submission that writes to this + /// image. This is awkward, but hard to avoid: [`vkQueuePresentKHR`] + /// requires a semaphore to order it with respect to drawing commands, and + /// we can't attach new completion semaphores to a command submission after + /// it's been submitted. This means that, at submission time, we must create + /// the semaphore we might need if the caller's next action is to enqueue a + /// presentation of this image. + /// + /// An alternative strategy would be for presentation to enqueue an empty + /// submit, ordered relative to other submits in the usual way, and + /// signaling a single presentation semaphore. But we suspect that submits + /// are usually expensive enough, and semaphores usually cheap enough, that + /// performance-sensitive users will avoid making many submits, so that the + /// cost of accumulated semaphores will usually be less than the cost of an + /// additional submit. + /// + /// Only the first [`present_index`] semaphores in the vector are actually + /// going to be signalled by submitted commands, and need to be waited for + /// by the next present call. Any semaphores beyond that index were created + /// for prior presents and are simply being retained for recycling. + /// + /// [`present_index`]: SwapchainPresentSemaphores::present_index + /// [`vkQueuePresentKHR`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueuePresentKHR + /// [`vkQueueSubmit`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueueSubmit + present: Vec<vk::Semaphore>, + + /// The number of semaphores in [`present`] to be signalled for this submission. + /// + /// [`present`]: SwapchainPresentSemaphores::present + present_index: usize, + + /// Which image this semaphore set is used for. + frame_index: usize, +} + +impl SwapchainPresentSemaphores { + pub fn new(frame_index: usize) -> Self { + Self { + present: Vec::new(), + present_index: 0, + frame_index, + } + } + + /// Return the semaphore that the next submission that writes to this image should + /// signal when it's done. + /// + /// See [`SwapchainPresentSemaphores::present`] for details. + fn get_submit_signal_semaphore( + &mut self, + device: &DeviceShared, + ) -> Result<vk::Semaphore, crate::DeviceError> { + // Try to recycle a semaphore we created for a previous presentation. + let sem = match self.present.get(self.present_index) { + Some(sem) => *sem, + None => { + let sem = device.new_binary_semaphore(&format!( + "SwapchainImageSemaphore: Image {} present semaphore {}", + self.frame_index, self.present_index + ))?; + self.present.push(sem); + sem + } + }; + + self.present_index += 1; + + Ok(sem) + } + + /// Indicates the cpu-side usage of this semaphore has finished for the frame, + /// so reset internal state to be ready for the next frame. + fn end_semaphore_usage(&mut self) { + // Reset the index to 0, so that the next time we get a semaphore, we + // start from the beginning of the list. + self.present_index = 0; + } + + /// Return the semaphores that a presentation of this image should wait on. + /// + /// Return a slice of semaphores that the call to [`vkQueueSubmit`] that + /// ends this image's acquisition should wait for. See + /// [`SwapchainPresentSemaphores::present`] for details. + /// + /// Reset `self` to be ready for the next acquisition cycle. + /// + /// [`vkQueueSubmit`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vkQueueSubmit + fn get_present_wait_semaphores(&mut self) -> Vec<vk::Semaphore> { + self.present[0..self.present_index].to_vec() + } + + unsafe fn destroy(&self, device: &ash::Device) { + unsafe { + for sem in &self.present { + device.destroy_semaphore(*sem, None); + } + } + } +} + +#[derive(Debug)] +struct NativeSurfaceTextureMetadata { + acquire_semaphores: Arc<Mutex<SwapchainAcquireSemaphore>>, + present_semaphores: Arc<Mutex<SwapchainPresentSemaphores>>, +} + +impl SurfaceTextureMetadata for NativeSurfaceTextureMetadata { + fn get_semaphore_guard(&self) -> Box<dyn SwapchainSubmissionSemaphoreGuard + '_> { + Box::new(NativeSwapchainSubmissionSemaphoreGuard { + acquire_semaphore_guard: self + .acquire_semaphores + .try_lock() + .expect("Failed to lock surface acquire semaphore"), + present_semaphores_guard: self + .present_semaphores + .try_lock() + .expect("Failed to lock surface present semaphores"), + }) + } + + fn as_any(&self) -> &dyn Any { + self + } +} + +struct NativeSwapchainSubmissionSemaphoreGuard<'a> { + acquire_semaphore_guard: MutexGuard<'a, SwapchainAcquireSemaphore>, + present_semaphores_guard: MutexGuard<'a, SwapchainPresentSemaphores>, +} + +impl<'a> SwapchainSubmissionSemaphoreGuard for NativeSwapchainSubmissionSemaphoreGuard<'a> { + fn set_used_fence_value(&mut self, value: u64) { + self.acquire_semaphore_guard.set_used_fence_value(value); + } + + fn get_acquire_wait_semaphore(&mut self) -> Option<SemaphoreType> { + self.acquire_semaphore_guard + .get_acquire_wait_semaphore() + .map(SemaphoreType::Binary) + } + + fn get_submit_signal_semaphore( + &mut self, + device: &DeviceShared, + ) -> Result<SemaphoreType, crate::DeviceError> { + self.present_semaphores_guard + .get_submit_signal_semaphore(device) + .map(SemaphoreType::Binary) + } +} diff --git a/third_party/rust/wgpu-types/.cargo-checksum.json b/third_party/rust/wgpu-types/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"7294fed45f6bf1bfbb8a32daf982744671a76cd966a67a610c95c06ac135547e","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","src/assertions.rs":"e4d2d40bc1e870a59637f4b9574743e19565a62f6dbcc21cb18a76b666b796eb","src/cast_utils.rs":"33f03a57ccbedef2699f2305bec584c623db1fd28bfdf584d1260da4fbecd529","src/counters.rs":"e2a1c69126bdb6a35f74d5062e89e242eb955014d95c2b9e6e1b03f7b4b5bd98","src/env.rs":"26ffc91867625784159bcf391881187aa92cf92b81b1f40959ce1b96ae6d554d","src/error.rs":"0109e6209cf152abbfd0cee85dd934fb24f2304bf6adad6fb684b77f151fb158","src/features.rs":"ab880ecf55be2a93244d1a03119d10ee15eddc076f100ae03d13b51eaa815b57","src/instance.rs":"deeb5ca694163baf46c386316a498cee011cf960d48b749d4cd01125e9fca57f","src/lib.rs":"361cdde9d1d5bae3584f36c695bf976765a550849388e4f78ecf53fdc2219c8e","src/math.rs":"3046121800bded318b7d219aea401907e7d3bba3b998df6745a71e76f0734de2","src/tokens.rs":"cdf192e0c9b4ea4f3cd4148d07be2e895f937f8154acbf52caf67f7fb4df11dc","src/transfers.rs":"25f47e9cbc5887f849f5eb4d8952d89de6377df40f480ebbea61c58d2e0e7fc6"},"package":null} -\ No newline at end of file +{"files":{"Cargo.toml":"7294fed45f6bf1bfbb8a32daf982744671a76cd966a67a610c95c06ac135547e","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"dc0d97139e8205818c703741c7be7cb3b96888bd5917b8d6fc6133731e403c21","src/assertions.rs":"e4d2d40bc1e870a59637f4b9574743e19565a62f6dbcc21cb18a76b666b796eb","src/cast_utils.rs":"33f03a57ccbedef2699f2305bec584c623db1fd28bfdf584d1260da4fbecd529","src/counters.rs":"e2a1c69126bdb6a35f74d5062e89e242eb955014d95c2b9e6e1b03f7b4b5bd98","src/env.rs":"26ffc91867625784159bcf391881187aa92cf92b81b1f40959ce1b96ae6d554d","src/error.rs":"0109e6209cf152abbfd0cee85dd934fb24f2304bf6adad6fb684b77f151fb158","src/features.rs":"ab880ecf55be2a93244d1a03119d10ee15eddc076f100ae03d13b51eaa815b57","src/instance.rs":"deeb5ca694163baf46c386316a498cee011cf960d48b749d4cd01125e9fca57f","src/lib.rs":"18a96688b43d81dc1537594f103716be27257a63249c1794d1c06e2c46b451b4","src/math.rs":"3046121800bded318b7d219aea401907e7d3bba3b998df6745a71e76f0734de2","src/tokens.rs":"cdf192e0c9b4ea4f3cd4148d07be2e895f937f8154acbf52caf67f7fb4df11dc","src/transfers.rs":"25f47e9cbc5887f849f5eb4d8952d89de6377df40f480ebbea61c58d2e0e7fc6"},"package":null} +\ No newline at end of file diff --git a/third_party/rust/wgpu-types/src/lib.rs b/third_party/rust/wgpu-types/src/lib.rs @@ -1409,6 +1409,13 @@ pub struct AdapterInfo { pub device: u32, /// Type of device pub device_type: DeviceType, + /// [`Backend`]-specific PCI bus ID of the adapter. + /// + /// * For [`Backend::Vulkan`], [`VkPhysicalDevicePCIBusInfoPropertiesEXT`] is used, + /// if available, in the form `bus:device.function`, e.g. `0000:01:00.0`. + /// + /// [`VkPhysicalDevicePCIBusInfoPropertiesEXT`]: https://registry.khronos.org/vulkan/specs/latest/man/html/VkPhysicalDevicePCIBusInfoPropertiesEXT.html + pub device_pci_bus_id: String, /// Driver name pub driver: String, /// Driver info