fix(vk): work around Maxwell BC4 pass device loss #2730

Merged
HumanBean merged 3 commits from russian.engineer/Longshot:fix/maxwell-bc4-pass-device-loss-pr into main 2026-11-28 19:14:40 +00:00
Contributor

Summary

Nightly nightly-805-6b928cb4 loses the Vulkan device on the title screen on a Quadro M2000M; the kernel reports NVIDIA Xid 31. The failing render sequence reaches program 0xdc5db6b9f2ab0da3 (the Deku Tree BC4 web draw). On non-Windows systems, this change detects NVIDIA's proprietary driver plus PCI device 0x13b0, ends the open render pass before that draw, and still issues the draw. It does not establish the underlying driver or application fault.

The policy is in gpu/vk/device_policy.h; the pass boundary is in gpu/vk/vk_draw.cpp; tests/test_device_policy.py covers the OS, hardware and driver match and the draw pass boundary. The test-only commit precedes the fix commit and fails on the current main behavior.

Testing

Tested: On the current ThinkPad P50 (Quadro M2000M, NVIDIA 580.178.04, Ubuntu 26.04.1), the branch rendered the 3D title screen, loaded the Kokiri Forest scene, and then reached the Deku Tree. The runtime log recorded the pass split before dc5db6b9f2ab0da3; no new Xid 31 appeared during that run. The user reports that without this workaround the same device loss occurs on two ThinkPad P50 systems under Windows and Linux.

The device-policy test passed before the added draw-boundary and Windows coverage; the updated test is pending. The changed test suite completed with 185 passed and 1 failure (test_pipeline_tour), reproduced on the unmodified main baseline. The full strict suite was not clean in this environment: 568 passed, 310 failed, 10 skipped; most failures require unavailable build/test tools such as clang, CMake, SPIR-V validation/headers, or Unicorn.

Still to test:

  • The second ThinkPad P50 on Linux with this branch: start from the title screen and load the 3D scene; expect no device loss/Xid 31 (by hand on that hardware). The workaround is disabled on Windows.
  • A valid paired performance measurement: create the missing logs/ folders in both runtimes and retry; the baseline is expected to lose the device before reaching the scene on this P50, so do not claim comparative FPS unless both runs complete (by hand on this P50).

Measurements

Verdict: No valid main-versus-branch performance comparison yet. The workaround adds one pass boundary for the matching draw only; the only baseline runs on this M2000M lost the Vulkan device before measurement.

Setup: ThinkPad P50, Quadro M2000M, NVIDIA 580.178.04, Ubuntu 26.04.1; dev.py ab --scene deku-tree --runs 2 --seconds 30 --warmup 5 --headless, default game settings.

Before: main @ 22d0d200 After: this PR @ b0c0138f
Startup / scene load Device lost at frame 350–489; kernel Xid 31 (GPCCLIENT_GCC, FAULT_PTE ACCESS_TYPE_READ) Reached Kokiri Forest and Deku Tree; policy hook logged before dc5db6b9f2ab0da3; no Xid during the run. The benchmark could not write its frame trace.

Risks

The extra pass boundary can add a small cost on the matching draw; no paired measurement is available yet. The rule is limited to non-Windows systems with NVIDIA's proprietary driver and device ID 0x13b0. The Xid 31 root cause remains unconfirmed. Reverting the fix commit disables the workaround. No player settings or save files change.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (changed-suite baseline failure and missing strict-suite tools are listed above).
  • Measured against main; main loses the GPU before the scene and the attempted runs have no frame trace.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: the updated game-free test has not yet been reported as passing here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths (Linux tested; Windows remains to test).
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Windows and second-P50 tests completed.
  • Approved in review and CI passes on the head.
## Summary Nightly `nightly-805-6b928cb4` loses the Vulkan device on the title screen on a Quadro M2000M; the kernel reports NVIDIA Xid 31. The failing render sequence reaches program `0xdc5db6b9f2ab0da3` (the Deku Tree BC4 web draw). On non-Windows systems, this change detects NVIDIA's proprietary driver plus PCI device `0x13b0`, ends the open render pass before that draw, and still issues the draw. It does not establish the underlying driver or application fault. The policy is in `gpu/vk/device_policy.h`; the pass boundary is in `gpu/vk/vk_draw.cpp`; `tests/test_device_policy.py` covers the OS, hardware and driver match and the draw pass boundary. The test-only commit precedes the fix commit and fails on the current main behavior. ## Testing **Tested:** On the current ThinkPad P50 (Quadro M2000M, NVIDIA 580.178.04, Ubuntu 26.04.1), the branch rendered the 3D title screen, loaded the Kokiri Forest scene, and then reached the Deku Tree. The runtime log recorded the pass split before `dc5db6b9f2ab0da3`; no new Xid 31 appeared during that run. The user reports that without this workaround the same device loss occurs on two ThinkPad P50 systems under Windows and Linux. The device-policy test passed before the added draw-boundary and Windows coverage; the updated test is pending. The changed test suite completed with 185 passed and 1 failure (`test_pipeline_tour`), reproduced on the unmodified main baseline. The full strict suite was not clean in this environment: 568 passed, 310 failed, 10 skipped; most failures require unavailable build/test tools such as clang, CMake, SPIR-V validation/headers, or Unicorn. **Still to test:** - The second ThinkPad P50 on Linux with this branch: start from the title screen and load the 3D scene; expect no device loss/Xid 31 (by hand on that hardware). The workaround is disabled on Windows. - A valid paired performance measurement: create the missing `logs/` folders in both runtimes and retry; the baseline is expected to lose the device before reaching the scene on this P50, so do not claim comparative FPS unless both runs complete (by hand on this P50). ## Measurements **Verdict:** No valid main-versus-branch performance comparison yet. The workaround adds one pass boundary for the matching draw only; the only baseline runs on this M2000M lost the Vulkan device before measurement. Setup: ThinkPad P50, Quadro M2000M, NVIDIA 580.178.04, Ubuntu 26.04.1; `dev.py ab --scene deku-tree --runs 2 --seconds 30 --warmup 5 --headless`, default game settings. | | Before: main @ 22d0d200 | After: this PR @ b0c0138f | |---|---|---| | Startup / scene load | Device lost at frame 350–489; kernel Xid 31 (`GPCCLIENT_GCC`, `FAULT_PTE ACCESS_TYPE_READ`) | Reached Kokiri Forest and Deku Tree; policy hook logged before `dc5db6b9f2ab0da3`; no Xid during the run. The benchmark could not write its frame trace. | ## Risks The extra pass boundary can add a small cost on the matching draw; no paired measurement is available yet. The rule is limited to non-Windows systems with NVIDIA's proprietary driver and device ID `0x13b0`. The Xid 31 root cause remains unconfirmed. Reverting the fix commit disables the workaround. No player settings or save files change. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (changed-suite baseline failure and missing strict-suite tools are listed above). - [ ] Measured against `main`; main loses the GPU before the scene and the attempted runs have no frame trace. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [ ] A fix: the updated game-free test has not yet been reported as passing here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths (Linux tested; Windows remains to test). - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Windows and second-P50 tests completed. - [ ] Approved in review and CI passes on the head.
Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
fix(vk): work around Maxwell BC4 pass device loss
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b0c0138ff5
Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
Author
Contributor

Tested in game: Agent test: ThinkPad P50, Quadro M2000M (10de:13b0), NVIDIA 580.178.04, Ubuntu 26.04.1: the 3D title background and Kokiri Forest/Deku Tree loaded; the log showed a pass split before dc5db6b9f2ab0da3; no new Xid 31 was recorded before normal exit. User reports the unpatched build loses the Vulkan device on two ThinkPad P50 systems under both Windows and Linux.

Tested in game: Agent test: ThinkPad P50, Quadro M2000M (10de:13b0), NVIDIA 580.178.04, Ubuntu 26.04.1: the 3D title background and Kokiri Forest/Deku Tree loaded; the log showed a pass split before dc5db6b9f2ab0da3; no new Xid 31 was recorded before normal exit. User reports the unpatched build loses the Vulkan device on two ThinkPad P50 systems under both Windows and Linux.
Member

Possibly related, for context:

  • PR #2293 WIP: fix(vk): a temporal upscaler's passes have device-lost checkpoints of their own — Open Vulkan device-loss diagnostic work in vk_draw.cpp, but different trigger/upscaler checkpoints
Possibly related, for context: - PR #2293 WIP: fix(vk): a temporal upscaler's passes have device-lost checkpoints of their own — Open Vulkan device-loss diagnostic work in vk_draw.cpp, but different trigger/upscaler checkpoints
Owner
@review
BeanBot left a comment

Recommendation: Approve. The workaround has been observed to let the affected Linux machine reach the scene, but its regression test does not cover the pass boundary that provides the fix. Windows behavior and the cost of the extra boundary also remain unmeasured. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change ends the current render pass before a particular BC4 draw on the Quadro M2000M with NVIDIA's proprietary driver. One reported Linux run reached the title screen and Deku Tree without another Xid 31; the cost and the underlying fault are unknown.

Should fix (1): not blocking, but worth doing before merging.

  • L1 tests/test_device_policy.py:429: The regression test checks only the hardware policy, not whether the matching draw actually ends the pass. (more on the line) Do: Add a game-free behavioral check that exercises an open pass and the matching and nonmatching draws, verifies the boundary before the retained draw, and fails when the boundary is removed.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 gpu/vk/device_policy.h:683: The policy also enables the workaround on Windows, where the branch has not been run on the affected GPU. (more on the line) Do: Run the branch on the M2000M under Windows through the title screen and Deku Tree, checking for device loss and correct rendering. (@fix does its part first: Limit the rule to the tested OS until the Windows run is available.)
  • L3 gpu/vk/vk_draw.cpp:9166: The extra pass boundary's cost has not been measured on the affected GPU. (more on the line) Do: Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene.

@fix can do L1 and L2.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes, for the reported Linux run: main lost the device at frames 350–489, while the branch reached Kokiri Forest and Deku Tree without a new Xid. This is a functional observation, not a valid paired performance comparison.

Other systems: The new policy is false for other device IDs and for NVK, so the new pass boundary is limited to the proprietary NVIDIA driver on device 0x13b0. Windows on that device remains untested; no evidence was provided for the boundary's frame-time cost.

Switches: None added, changed or removed. The automatic policy defaults on for NVIDIA proprietary driver and device 0x13b0, including Windows.

Reviewed: b0c0138ff5 against 22d0d20098: Read the repository rules and PR template, the complete diff and commit messages, and the changed draw site with pass end and restart paths. Inspected device-policy and test code around the changes; the large changed code files and test file were not read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No recorded runs, translations or generated files changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The diff contains no generated files, game-derived artifacts, API changes or new environment switches.
  • The pass restart uses load operations, and the existing end-pass path handles block-image stores.
  • The one-time log flag is atomic.

Testing: No commands from the project were run, as requested. The author reports the policy test passed and identifies baseline and missing-tool failures; CI is still running.

Overlaps and merge order: Unknown; network access was not used.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The workaround has been observed to let the affected Linux machine reach the scene, but its regression test does not cover the pass boundary that provides the fix. Windows behavior and the cost of the extra boundary also remain unmeasured. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change ends the current render pass before a particular BC4 draw on the Quadro M2000M with NVIDIA's proprietary driver. One reported Linux run reached the title screen and Deku Tree without another Xid 31; the cost and the underlying fault are unknown. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_device_policy.py:429`: The regression test checks only the hardware policy, not whether the matching draw actually ends the pass. (more on the line) **Do:** Add a game-free behavioral check that exercises an open pass and the matching and nonmatching draws, verifies the boundary before the retained draw, and fails when the boundary is removed. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/device_policy.h:683`: The policy also enables the workaround on Windows, where the branch has not been run on the affected GPU. (more on the line) **Do:** Run the branch on the M2000M under Windows through the title screen and Deku Tree, checking for device loss and correct rendering. *(`@fix` does its part first: Limit the rule to the tested OS until the Windows run is available.)* - **L3** `gpu/vk/vk_draw.cpp:9166`: The extra pass boundary's cost has not been measured on the affected GPU. (more on the line) **Do:** Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene. `@fix` can do L1 and L2. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes, for the reported Linux run: main lost the device at frames 350–489, while the branch reached Kokiri Forest and Deku Tree without a new Xid. This is a functional observation, not a valid paired performance comparison. **Other systems:** The new policy is false for other device IDs and for NVK, so the new pass boundary is limited to the proprietary NVIDIA driver on device 0x13b0. Windows on that device remains untested; no evidence was provided for the boundary's frame-time cost. **Switches:** None added, changed or removed. The automatic policy defaults on for NVIDIA proprietary driver and device 0x13b0, including Windows. **Reviewed:** b0c0138ff543 against 22d0d20098d6: Read the repository rules and PR template, the complete diff and commit messages, and the changed draw site with pass end and restart paths. Inspected device-policy and test code around the changes; the large changed code files and test file were not read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No recorded runs, translations or generated files changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The diff contains no generated files, game-derived artifacts, API changes or new environment switches. - The pass restart uses load operations, and the existing end-pass path handles block-image stores. - The one-time log flag is atomic. **Testing:** No commands from the project were run, as requested. The author reports the policy test passed and identifies baseline and missing-tool failures; CI is still running. **Overlaps and merge order:** Unknown; network access was not used. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -676,6 +680,7 @@ inline DevicePolicy device_policy(const DeviceFacts& f) {
p.compute_builds_serial = f.driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS;
p.pcache_fetch_lock = f.windows && f.intel();
p.split_before_draw = f.intel();
p.maxwell_bc4_pass_split = f.driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY && f.device_id == 0x13b0;
Member

L2 (should fix): The policy also enables the workaround on Windows, where the branch has not been run on the affected GPU.

When: A Windows player with device 0x13b0 takes this new pass-splitting path, but the reported successful run is on Linux.

Do: Run the branch on the M2000M under Windows through the title screen and Deku Tree, checking for device loss and correct rendering.

**L2** (should fix): The policy also enables the workaround on Windows, where the branch has not been run on the affected GPU. *When:* A Windows player with device 0x13b0 takes this new pass-splitting path, but the reported successful run is on Linux. **Do:** Run the branch on the M2000M under Windows through the title screen and Deku Tree, checking for device loss and correct rendering.
@ -9161,0 +9163,4 @@
if (!told.exchange(true, std::memory_order_relaxed))
logf("vk: Quadro M2000M: ending the pass before Deku Tree BC4 web draw %016llx",
(unsigned long long)cp->key);
end_pass(cmd);
Member

L3 (should fix): The extra pass boundary's cost has not been measured on the affected GPU.

When: Each matching draw can end a pass and cause a later restart, including attachment stores, reloads and barriers; the attempted benchmark produced no frame trace.

Do: Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene.

**L3** (should fix): The extra pass boundary's cost has not been measured on the affected GPU. *When:* Each matching draw can end a pass and cause a later restart, including attachment stores, reloads and barriers; the attempted benchmark produced no frame trace. **Do:** Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene.
@ -425,6 +426,8 @@ ENV = [
# The rules at their edges: the fixture's expression, and its value (sizes in whole MB; -1: no limit)
MB = "* policy_rule::kMB"
RULES = [
("([](const auto& f) { const auto p = device_policy(f); if constexpr (requires { p.maxwell_bc4_pass_split; }) return (long long)p.maxwell_bc4_pass_split; else return 0LL; }([] { DeviceFacts f{}; f.vendor_id = 0x10DE; f.device_id = 0x13b0; f.driver_id = VK_DRIVER_ID_NVIDIA_PROPRIETARY; return f; }()))", 1),
Member

L1 (should fix): The regression test checks only the hardware policy, not whether the matching draw actually ends the pass. It therefore does not protect the fix's essential behavior.

When: Removing end_pass(cmd), changing the program key, or removing the draw hook leaves both new policy cases passing, while the affected draw again runs without the workaround.

Do: Add a game-free behavioral check that exercises an open pass and the matching and nonmatching draws, verifies the boundary before the retained draw, and fails when the boundary is removed.

**L1** (should fix): The regression test checks only the hardware policy, not whether the matching draw actually ends the pass. It therefore does not protect the fix's essential behavior. *When:* Removing end_pass(cmd), changing the program key, or removing the draw hook leaves both new policy cases passing, while the affected draw again runs without the workaround. **Do:** Add a game-free behavioral check that exercises an open pass and the matching and nonmatching draws, verifies the boundary before the retained draw, and fails when the boundary is removed.
Owner
@fix
BeanBot force-pushed fix/maxwell-bc4-pass-device-loss-pr from b0c0138ff5
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 489b9891d1
Some checks failed
CI / What the change needs (pull_request) Successful in 15s
CI / Third-party parts and guide screenshots (pull_request) Failing after 22s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 24s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m22s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m24s
PR description / Title and description (pull_request_target) Failing after 8s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 6m10s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m47s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 28m40s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 39m33s
2026-11-28 19:01:16 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported Linux run shows the workaround getting past the device loss, but the cost of the added pass boundary on the affected GPU remains unmeasured. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is 489b9891d1. I rebased it onto main (0a124fb900). I edited its description to match the change.

Changed

  • Cover the draw pass boundary: Added a game-free fixture that exercises the actual hook with an open pass, checks matching and nonmatching draws, and verifies its position before the renderer's pass and draw in tests/test_device_policy.py:519 and tests/test_device_policy.py:857. Tests were not run as requested.

Changed in part (the rest is for the author)

  • Limit the Maxwell policy to the tested OS: Restricted the rule to Linux and added Windows and device-ID cases in gpu/vk/device_policy.h:683 and tests/test_device_policy.py:431. The author must run the branch on the affected Windows hardware and decide whether to extend the rule.

Nothing was built or run: the checks run again on the new head.

On a Quadro M2000M with NVIDIA's proprietary driver outside Windows, the change ends the current render pass before the matching Deku Tree draw. The reported Linux run reached the scene without a new Xid 31; the boundary's performance cost is unknown.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3 gpu/vk/vk_draw.cpp:9166: The extra pass boundary's cost has not been measured on the affected GPU. When: Each matching draw can end a pass and cause a later restart, including attachment stores, reloads and barriers; the attempted benchmark produced no frame trace. Do: Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (5; not asked for, not blocking)
  • The pull request description still says the policy applies to NVIDIA's proprietary driver and device ID without stating its new Linux restriction.
  • The reported Windows device loss remains without this workaround.
  • The workaround is disabled on Windows, where the unpatched device loss was also reported.
  • The updated device-policy test and Windows build remain unreported.
  • The base diff also contains changes to branding, audio and the Lens eye pass.
More: does it help, other systems, switches, what was read

Does it help: Yes for the reported Linux device-loss case: the baseline lost the device at frames 350–489, while the branch reached Kokiri Forest and the Deku Tree. There is no valid paired performance comparison.

Other systems: The policy excludes Windows, other device IDs and other drivers. Windows users with the reported device loss do not receive the workaround; the updated fixture covers the policy and draw hook but has not been reported as run.

Switches: None added, changed or removed.

Reviewed: 489b9891d1 against 0a124fb900: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the relevant policy and draw changes, the fix diff, and the device-policy fixture and callers. Skimmed the standards and the other changes included in the base diff; the large draw file and other changed files were not read in full.; nothing run (a code review).

Checked and fine:

  • The policy matches the reported Linux device and proprietary driver and excludes Windows and adjacent device IDs.
  • The draw hook retains the matching draw and the added fixture checks matching and nonmatching cases.

Testing: No commands from the project or tests were run. The reported Linux game run reached the affected scene; the updated fixture and CI have not yet been reported on this head.

Overlaps and merge order: Unknown; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The reported Linux run shows the workaround getting past the device loss, but the cost of the added pass boundary on the affected GPU remains unmeasured. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is 489b9891d1bc. I rebased it onto `main` (0a124fb90063). I edited its description to match the change. **Changed** - **Cover the draw pass boundary**: Added a game-free fixture that exercises the actual hook with an open pass, checks matching and nonmatching draws, and verifies its position before the renderer's pass and draw in tests/test_device_policy.py:519 and tests/test_device_policy.py:857. Tests were not run as requested. **Changed in part (the rest is for the author)** - **Limit the Maxwell policy to the tested OS**: Restricted the rule to Linux and added Windows and device-ID cases in gpu/vk/device_policy.h:683 and tests/test_device_policy.py:431. The author must run the branch on the affected Windows hardware and decide whether to extend the rule. Nothing was built or run: the checks run again on the new head. On a Quadro M2000M with NVIDIA's proprietary driver outside Windows, the change ends the current render pass before the matching Deku Tree draw. The reported Linux run reached the scene without a new Xid 31; the boundary's performance cost is unknown. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_draw.cpp:9166`: The extra pass boundary's cost has not been measured on the affected GPU. *When:* Each matching draw can end a pass and cause a later restart, including attachment stores, reloads and barriers; the attempted benchmark produced no frame trace. **Do:** Measure frame times and draw or pass counts on the affected machine in a reproducible scene, using a viable comparison or instrumentation if main cannot reach that scene. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (5; not asked for, not blocking)</summary> - The pull request description still says the policy applies to NVIDIA's proprietary driver and device ID without stating its new Linux restriction. - The reported Windows device loss remains without this workaround. - The workaround is disabled on Windows, where the unpatched device loss was also reported. - The updated device-policy test and Windows build remain unreported. - The base diff also contains changes to branding, audio and the Lens eye pass. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported Linux device-loss case: the baseline lost the device at frames 350–489, while the branch reached Kokiri Forest and the Deku Tree. There is no valid paired performance comparison. **Other systems:** The policy excludes Windows, other device IDs and other drivers. Windows users with the reported device loss do not receive the workaround; the updated fixture covers the policy and draw hook but has not been reported as run. **Switches:** None added, changed or removed. **Reviewed:** 489b9891d1bc against 0a124fb90063: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the relevant policy and draw changes, the fix diff, and the device-policy fixture and callers. Skimmed the standards and the other changes included in the base diff; the large draw file and other changed files were not read in full.; nothing run (a code review). **Checked and fine:** - The policy matches the reported Linux device and proprietary driver and excludes Windows and adjacent device IDs. - The draw hook retains the matching draw and the added fixture checks matching and nonmatching cases. **Testing:** No commands from the project or tests were run. The reported Linux game run reached the affected scene; the updated fixture and CI have not yet been reported on this head. **Overlaps and merge order:** Unknown; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: fix(vk): work around Maxwell BC4 pass device loss to fix(vk): work around Maxwell BC4 pass device loss 2026-11-28 19:14:25 +00:00
HumanBean deleted branch fix/maxwell-bc4-pass-device-loss-pr 2026-11-28 19:14:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2730
No description provided.