d3d12-gpu: prime a draw's tested depth before its picked textures are read #2965

Merged
aznohonza merged 2 commits from upstream-pr/2965 into main 2026-12-02 22:32:26 +00:00
aznohonza commented 2026-12-01 21:55:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T21:55:56Z.


Re-created from the original #2866. aznohonza/mandy-contrib was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, rebased on main at 913b88b90; current head c62d57344 (the two commits on top of main). The original review thread is at #2866.


State::bind brings the textures picked by index up to date at its start, and those views go through readable (heap_textures, and flush_for_bake before it). readable is what notes that a draw reads a view of the depth target it only tests: it sets TESTED_DEPTH's read bit, and a read-only depth target then keeps SHADER_RESOURCE in the state State::prepare_for gives it (DEPTH_READ | SHADER_RESOURCE).

TESTED_DEPTH was primed for the draw after that pass, so during it the cell still held the previous draw's target. A heap-indexed read of this draw's own depth target was therefore not marked, the pass left the target in SHADER_RESOURCE alone, and prepare_for then moved it to DEPTH_READ alone while the shader samples it.

This moves the priming before early_textures; the state decision in prepare_for and the states readable picks are unchanged. Reads found by the table walk later in bind were already covered, since that walk is after the priming.

Reported in #2570 by @zmasi (finding: read-only depth plus a heap-indexed read gets DEPTH_READ without SHADER_RESOURCE, pointing at this call).

Verification: rebased over main's draw.rs indirect-batch changes; cargo xwin test --target x86_64-pc-windows-msvc -p leonida-gpu --lib --no-run builds and the suite under Wine (no device here) gives 641 passed / 3 failed / 59 ignored. The three failures are watch::* tests that fail identically on unmodified main under Wine (ran those three from main to confirm). The pass itself could only be read-verified here; the d3d12 CI job builds and runs the workspace's tests. No game data, no new switches.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5595281765 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965). Originally posted by [aznohonza](https://github.com/aznohonza) on 2026-12-01T21:55:56Z. --- Re-created from the original #2866. `aznohonza/mandy-contrib` was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (`422 state cannot be changed`). Same branch, rebased on `main` at `913b88b90`; current head `c62d57344` (the two commits on top of main). The original review thread is at #2866. --- `State::bind` brings the textures picked by index up to date at its start, and those views go through `readable` (`heap_textures`, and `flush_for_bake` before it). `readable` is what notes that a draw reads a view of the depth target it only tests: it sets `TESTED_DEPTH`'s read bit, and a read-only depth target then keeps `SHADER_RESOURCE` in the state `State::prepare_for` gives it (`DEPTH_READ | SHADER_RESOURCE`). `TESTED_DEPTH` was primed for the draw after that pass, so during it the cell still held the previous draw's target. A heap-indexed read of this draw's own depth target was therefore not marked, the pass left the target in `SHADER_RESOURCE` alone, and `prepare_for` then moved it to `DEPTH_READ` alone while the shader samples it. This moves the priming before `early_textures`; the state decision in `prepare_for` and the states `readable` picks are unchanged. Reads found by the table walk later in `bind` were already covered, since that walk is after the priming. Reported in #2570 by @zmasi (`finding: read-only depth plus a heap-indexed read gets DEPTH_READ without SHADER_RESOURCE`, pointing at this call). **Verification:** rebased over main's `draw.rs` indirect-batch changes; `cargo xwin test --target x86_64-pc-windows-msvc -p leonida-gpu --lib --no-run` builds and the suite under Wine (no device here) gives 641 passed / 3 failed / 59 ignored. The three failures are `watch::*` tests that fail identically on unmodified `main` under Wine (ran those three from `main` to confirm). The pass itself could only be read-verified here; the `d3d12` CI job builds and runs the workspace's tests. No game data, no new switches. AI-assisted.
KelboLive commented 2026-12-01 22:19:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T22:19:25Z.

Review: COMMENTED


Identical to #2866 (31e64fcf0), which I reviewed: the depth-prime ordering is right and the suite is green, and merge-tree is clean. Two things from there still stand: there is still no regression test (reverting the ordering stays green), and the bake-path comment is missing. Main has since changed draw.rs (indirect batches), so a rebase plus a re-run of the lib suite is worth doing before merge.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6141172629 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#pullrequestreview-6141172629). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T22:19:25Z. **Review:** COMMENTED --- Identical to #2866 (`31e64fcf0`), which I reviewed: the depth-prime ordering is right and the suite is green, and `merge-tree` is clean. Two things from there still stand: there is still no regression test (reverting the ordering stays green), and the bake-path comment is missing. Main has since changed `draw.rs` (indirect batches), so a rebase plus a re-run of the lib suite is worth doing before merge.
aznohonza commented 2026-12-01 22:28:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T22:28:19Z.


Thanks — both points are accurate: the ordering is a state decision a GPU-less suite cannot see, so reverting it stays green, and the bake-path comment is missing. main has also moved draw.rs since this head, so a rebase and a lib run are needed before merge. I will leave the code as reviewed until the rebase, and add the seam test only if a device-free shape exists — a test that passes on the revert would prove nothing.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7327902534 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7327902534). Originally posted by [aznohonza](https://github.com/aznohonza) on 2026-12-01T22:28:19Z. --- Thanks — both points are accurate: the ordering is a state decision a GPU-less suite cannot see, so reverting it stays green, and the bake-path comment is missing. `main` has also moved `draw.rs` since this head, so a rebase and a lib run are needed before merge. I will leave the code as reviewed until the rebase, and add the seam test only if a device-free shape exists — a test that passes on the revert would prove nothing. AI-assisted.
aznohonza commented 2026-12-01 23:16:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T23:16:33Z.


Rebased on main (913b88b90), so it now sits over the indirect-batch changes in draw.rs; head is 4d637c357. cargo xwin test -p leonida-gpu --lib --no-run builds, and the suite under Wine here gives 641 passed / 3 failed / 59 ignored — the three are watch::* tests that fail identically on unmodified main under Wine (ran those from main).

On the regression test: there is no honest device-free seam. The ordering only matters inside State::bind → early_textures → heap_textures, and all of those need a live HostList (the transition goes through list.transition/ResourceBarrier); readable is already exercised only by device tests, and the failure also needs the early-textures budget and a heap-indexed read of the tested depth. A test that asserted the cell before calling any of that would pass with the ordering reverted too, so it would prove nothing. If you want a device-gated one that drives a real bind with the budget on, say so and I will write it; otherwise I would leave this as reviewed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7329143264 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7329143264). Originally posted by [aznohonza](https://github.com/aznohonza) on 2026-12-01T23:16:33Z. --- Rebased on `main` (`913b88b90`), so it now sits over the indirect-batch changes in `draw.rs`; head is `4d637c357`. `cargo xwin test -p leonida-gpu --lib --no-run` builds, and the suite under Wine here gives 641 passed / 3 failed / 59 ignored — the three are `watch::*` tests that fail identically on unmodified `main` under Wine (ran those from `main`). On the regression test: there is no honest device-free seam. The ordering only matters inside `State::bind` → `early_textures` → `heap_textures`, and all of those need a live `HostList` (the transition goes through `list.transition`/`ResourceBarrier`); `readable` is already exercised only by device tests, and the failure also needs the early-textures budget and a heap-indexed read of the tested depth. A test that asserted the cell before calling any of that would pass with the ordering reverted too, so it would prove nothing. If you want a device-gated one that drives a real bind with the budget on, say so and I will write it; otherwise I would leave this as reviewed.
imShangLi commented 2026-12-02 11:25:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T11:25:20Z.


VERIFY-2965 — Linux, Fedora 45, Rust 1.98.1, cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device (only a VMware SVGA virtual adapter; Wine's D3D12 sees only the llvmpipe CPU device and the runtime still makes no host device), no game files

Verdict: PASS. The depth target a draw only tests is now primed into TESTED_DEPTH before early_textures, so a heap-indexed read of that target by the draw's own shaders is recognised and the target keeps SHADER_RESOURCE in the state prepare_for gives it. The move is the whole fix, it is at the root cause (the priming was after the pass that needs it), the states readable picks and the prepare_for decision are unchanged, and the bake pass — which runs the same early_textures → heap_textures on its own list — now records the combined-state barrier too. No test in the crate regresses: 703 tests on each side, 0 regressions; the only red→green is a watch flake. The standing caveat, which the author and the reviewer both state, is that there is no regression test: the ordering is a state decision a device-free suite cannot see, so reverting the change stays green.

head c62d57344132b8e7511e8748464b4faa763ecc80 ("d3d12-gpu: the bake pass records the same combined-state barrier too" on "d3d12-gpu: prime a draw's tested depth before its picked textures are read"), base origin/main = a917c54d6aff8c9ef5dda2d8ebf938cb5c693902, merge base 913b88b9054de123a78fae0aea5ee24e10b7cb1d (134 commits behind main). One file, +15/−8: d3d12/crates/leonida-gpu/src/draw.rs.

1. What it changes

State::bind (draw.rs:3096) prepares a draw's host list. The draw's tested depth target is carried in the thread-local TESTED_DEPTH: Cell<(usize, bool)> (draw.rs:191-196) — the target the draw only tests (0: none or one it writes) and whether a view its shaders read is of that same texture. readable (draw.rs:7747) consults it: when a view's source is the tested target it sets the read bit and returns the combined state DEPTH_READ | SHADER_RESOURCE (draw.rs:7778-7781 and 7815-7818); otherwise SHADER_RESOURCE. After bind returns, prepare_for's depth block (draw.rs:3074-3084) reads the same cell: if read && tested == self.depth { DEPTH_READ | SHADER_RESOURCE } else { DEPTH_READ }.

The change moves the priming from after early_textures to before it (draw.rs:3123-3128 now, 3177 before):

// before:  early_textures  →  heaps  →  TESTED_DEPTH.set((tested, false))  →  table walk
// after:   TESTED_DEPTH.set((tested, false))  →  early_textures  →  heaps  →  table walk

The block itself is identical (let tested = if !compute && self.depth_state == DEPTH_READ { self.depth } else { 0 }; TESTED_DEPTH.set((tested, false));), and the second commit (c62d5734) only adds the bake-path comment at draw.rs:3119-3122.

2. The claims, checked

  • "State::bind brings the textures picked by index up to date at its start, and those views go through readable." — Confirmed. bind calls early_textures at draw.rs:3130, which calls heap_textures (draw.rs:4126) and reaches readable for the views it brings up to date.
  • "readable is what notes that a draw reads a view of the depth target it only tests: it sets TESTED_DEPTH's read bit." — Confirmed. draw.rs:7778-7781 (the aliased-cast arm) and 7815-7818 (the placed/host-copy arm) both do TESTED_DEPTH.set((tested, true)) when tested == *resource, and return DEPTH_READ | SHADER_RESOURCE.
  • "TESTED_DEPTH was primed for the draw after that pass, so during it the cell still held the previous draw's target." — Confirmed. In the merge-base code the priming was at draw.rs:3177, and early_textures ran at 3115 — before it. So during early_textures, TESTED_DEPTH held the previous draw's (tested, read). The merge-base depth block (draw.rs:3074-3084, which runs after bind) then read that stale pair: tested == self.depth was false for the new draw, so it gave DEPTH_READ alone.
  • "A heap-indexed read of this draw's own depth target was therefore not marked, the pass left the target in SHADER_RESOURCE alone, and prepare_for then moved it to DEPTH_READ alone while the shader samples it." — Confirmed by the same trace. readable for a view of the draw's own target returned SHADER_RESOURCE (it did not match the stale tested), and prepare_for's depth block then called ensure_state(list, self.depth, DEPTH_READ) (draw.rs:3084) — so the target ended in DEPTH_READ alone, with SHADER_RESOURCE removed, while a shader of this draw samples it. That is the wrong barrier state for a shader read.
  • "The state decision in prepare_for and the states readable picks are unchanged." — Confirmed. The move changes only when the priming runs, not the tested expression or either state choice.
  • "Reads found by the table walk later in bind were already covered, since that walk is after the priming." — Confirmed. The table walk is the for stage in &p.stages loop (draw.rs:3213), and in the merge base it was at 3206 — after the priming at 3177. So only early_textures (before the old priming) was uncovered, and the move covers it. The fix is exactly scoped.
  • "The bake list runs that same pass (early_textures → heap_textures on bake_list), so it can now record the combined-state barrier for this target too." — Confirmed. early_textures runs heap_textures(bake_list, ...) at draw.rs:3941 when a BakeList is in use, on the same thread, so with the priming before early_textures the bake pass's readable calls see this draw's tested and record the combined state on the bake list as well. This is the second commit's point, and it is a consequence of the same move, not a separate code change.

3. What the tests do here

I cross-compiled leonida-gpu for x86_64-pc-windows-gnu and ran the test binaries under Wine with python3 tools/wine_red_green.py 2965 --crate leonida-gpu (from /home/shangli/oc-workspace/gta6). The pull request changes only source, so the verifier's red side is the merge base and the green side is the head.

side commit tests regressions
red 913b88b90 (merge base) 703 —
green c62d5734 (PR head) 703 0

The tool printed "red then green", but its 1 red→green is a watch flake: watch::tests::a_block_just_written_rests failed on the base and passed on the head. The PR touches only draw.rs; watch is a different module, and the same three watch tests fail on the base and the head (holes_are_known_until_the_runtime_tells, no_mapping_is_lost_between_askers, what_is_left_alone_is_no_known_hole). So the real result is 0 regressions; the "red then green" verdict is the flaky watch guard-page machinery under Wine without a real GPU. 640 tests pass on both sides, 59 are ignored, and every draw:: test is ok on both sides.

  • The change is not exercised by any test that runs here. State::bind/prepare_for need a live HostList and HostPipeline, i.e. a host device. On this machine host() is None (Wine's D3D12 finds only the llvmpipe CPU device — Found device: llvmpipe (LLVM 23.1.5, 256 bits) — but Host::create() still fails, so the ignored dump_buffer_view_descriptor_bytes probe panics with "an active D3D12 device" and depth_bounds_pipeline_loads_and_filters_draws returns at its host() guard). The replay integration tests that would drive State::bind end-to-end are #![cfg(all(windows, feature = "diagnostics"))] (tests/replay.rs:8) and the verifier runs without --features diagnostics, so they are not compiled. So the wine_red_green run confirms only that the reordering does not regress the device-free suite, not that it fixes the state decision. The reviewers and the author say the same ("the ordering is a state decision a GPU-less suite cannot see, so reverting it stays green").

4. Any failure I saw and why it is not this PR

  • The 3 watch failures (§3) fail on the merge base too and are environment failures of the guard-page/exception machinery under Wine without a real GPU; the PR touches none of watch.rs. The 1 red→green flake is the same class (a different watch test than in the #2823 run, so the flakiness is not a fixed set).

5. One thing worth the author's attention (not a defect, already on record)

  • No regression test. KelboLive's review and the author's reply both state it: reverting the ordering stays green, and there is "no honest device-free seam" — the ordering only matters inside State::bind → early_textures → heap_textures, which need a live HostList (the transition goes through list.transition/ResourceBarrier). The author plans a seam test "only if a device-free shape exists". So the fix rests on the ordering analysis and the reviewers' agreement, not on a test. This is the one substantive caveat; it does not change the verdict, but it means the change would not be caught if the ordering were re-broken.

6. What I did not check

  • No GPU, no D3D12 adapter, no title: the whole point is a state decision made while a draw's textures are prepared on a real device. I could not run a draw that only tests its depth and reads it through a heap-indexed view, so the fix is verified by tracing the code (readable, prepare_for, the old and new priming positions) and by the reviewers' read, not by a run.
  • The bake list: I confirmed early_textures → heap_textures on bake_list (draw.rs:3913-3975) and that the same thread runs it, but did not observe a bake pass record the combined barrier.
  • The 134-commit gap: the PR is based on 913b88b90, 134 commits behind today's main (a917c54d). The red/green run is against the merge base; I did not check the change still applies to main (the author rebased on 913b88b90 and reports the indirect-batch changes are covered).
  • No Windows build, no MSVC: everything is cargo test --target x86_64-pc-windows-gnu under Wine 11.21 on Fedora 45; a real Windows driver/ABI is not exercised.
  • The replay integration tests (--features diagnostics) were not run — they need the diagnostics feature (and a device), and the verifier passes neither.
  • The other crates (leonida-hle, leonida-loader) and the repository's Python suite were not run; the change is confined to leonida-gpu.
  • The original review thread at #2866 (this PR is a re-creation of it): I read the current PR's review and comments but not #2866's thread.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7343897468 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7343897468). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-02T11:25:20Z. --- ## VERIFY-2965 — Linux, Fedora 45, Rust 1.98.1, cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device (only a VMware SVGA virtual adapter; Wine's D3D12 sees only the llvmpipe CPU device and the runtime still makes no host device), no game files **Verdict: PASS.** The depth target a draw only tests is now primed into `TESTED_DEPTH` *before* `early_textures`, so a heap-indexed read of that target by the draw's own shaders is recognised and the target keeps `SHADER_RESOURCE` in the state `prepare_for` gives it. The move is the whole fix, it is at the root cause (the priming was after the pass that needs it), the states `readable` picks and the `prepare_for` decision are unchanged, and the bake pass — which runs the same `early_textures` → `heap_textures` on its own list — now records the combined-state barrier too. No test in the crate regresses: 703 tests on each side, 0 regressions; the only red→green is a `watch` flake. The standing caveat, which the author and the reviewer both state, is that there is **no regression test**: the ordering is a state decision a device-free suite cannot see, so reverting the change stays green. head `c62d57344132b8e7511e8748464b4faa763ecc80` ("d3d12-gpu: the bake pass records the same combined-state barrier too" on "d3d12-gpu: prime a draw's tested depth before its picked textures are read"), base `origin/main` = `a917c54d6aff8c9ef5dda2d8ebf938cb5c693902`, merge base `913b88b9054de123a78fae0aea5ee24e10b7cb1d` (134 commits behind `main`). One file, +15/−8: `d3d12/crates/leonida-gpu/src/draw.rs`. ### 1. What it changes `State::bind` (draw.rs:3096) prepares a draw's host list. The draw's tested depth target is carried in the thread-local `TESTED_DEPTH: Cell<(usize, bool)>` (draw.rs:191-196) — the target the draw only tests (0: none or one it writes) and whether a view its shaders read is of that same texture. `readable` (draw.rs:7747) consults it: when a view's source is the tested target it sets the read bit and returns the combined state `DEPTH_READ | SHADER_RESOURCE` (draw.rs:7778-7781 and 7815-7818); otherwise `SHADER_RESOURCE`. After `bind` returns, `prepare_for`'s depth block (draw.rs:3074-3084) reads the same cell: `if read && tested == self.depth { DEPTH_READ | SHADER_RESOURCE } else { DEPTH_READ }`. The change moves the priming from after `early_textures` to before it (draw.rs:3123-3128 now, 3177 before): ```rust // before: early_textures → heaps → TESTED_DEPTH.set((tested, false)) → table walk // after: TESTED_DEPTH.set((tested, false)) → early_textures → heaps → table walk ``` The block itself is identical (`let tested = if !compute && self.depth_state == DEPTH_READ { self.depth } else { 0 }; TESTED_DEPTH.set((tested, false));`), and the second commit (`c62d5734`) only adds the bake-path comment at draw.rs:3119-3122. ### 2. The claims, checked - **"`State::bind` brings the textures picked by index up to date at its start, and those views go through `readable`."** — Confirmed. `bind` calls `early_textures` at draw.rs:3130, which calls `heap_textures` (draw.rs:4126) and reaches `readable` for the views it brings up to date. - **"`readable` is what notes that a draw reads a view of the depth target it only tests: it sets `TESTED_DEPTH`'s read bit."** — Confirmed. draw.rs:7778-7781 (the aliased-cast arm) and 7815-7818 (the placed/host-copy arm) both do `TESTED_DEPTH.set((tested, true))` when `tested == *resource`, and return `DEPTH_READ | SHADER_RESOURCE`. - **"`TESTED_DEPTH` was primed for the draw after that pass, so during it the cell still held the previous draw's target."** — Confirmed. In the merge-base code the priming was at draw.rs:3177, and `early_textures` ran at 3115 — before it. So during `early_textures`, `TESTED_DEPTH` held the previous draw's `(tested, read)`. The merge-base depth block (draw.rs:3074-3084, which runs after `bind`) then read that stale pair: `tested == self.depth` was false for the new draw, so it gave `DEPTH_READ` alone. - **"A heap-indexed read of this draw's own depth target was therefore not marked, the pass left the target in `SHADER_RESOURCE` alone, and `prepare_for` then moved it to `DEPTH_READ` alone while the shader samples it."** — Confirmed by the same trace. `readable` for a view of the draw's own target returned `SHADER_RESOURCE` (it did not match the stale `tested`), and `prepare_for`'s depth block then called `ensure_state(list, self.depth, DEPTH_READ)` (draw.rs:3084) — so the target ended in `DEPTH_READ` alone, with `SHADER_RESOURCE` removed, while a shader of this draw samples it. That is the wrong barrier state for a shader read. - **"The state decision in `prepare_for` and the states `readable` picks are unchanged."** — Confirmed. The move changes only *when* the priming runs, not the `tested` expression or either state choice. - **"Reads found by the table walk later in `bind` were already covered, since that walk is after the priming."** — Confirmed. The table walk is the `for stage in &p.stages` loop (draw.rs:3213), and in the merge base it was at 3206 — after the priming at 3177. So only `early_textures` (before the old priming) was uncovered, and the move covers it. The fix is exactly scoped. - **"The bake list runs that same pass (`early_textures` → `heap_textures` on `bake_list`), so it can now record the combined-state barrier for this target too."** — Confirmed. `early_textures` runs `heap_textures(bake_list, ...)` at draw.rs:3941 when a `BakeList` is in use, on the same thread, so with the priming before `early_textures` the bake pass's `readable` calls see this draw's `tested` and record the combined state on the bake list as well. This is the second commit's point, and it is a consequence of the same move, not a separate code change. ### 3. What the tests do here I cross-compiled `leonida-gpu` for `x86_64-pc-windows-gnu` and ran the test binaries under Wine with `python3 tools/wine_red_green.py 2965 --crate leonida-gpu` (from `/home/shangli/oc-workspace/gta6`). The pull request changes only source, so the verifier's red side is the merge base and the green side is the head. | side | commit | tests | regressions | |---|---|---|---| | red | `913b88b90` (merge base) | 703 | — | | green | `c62d5734` (PR head) | 703 | **0** | The tool printed "red then green", but its 1 red→green is a `watch` flake: `watch::tests::a_block_just_written_rests` failed on the base and passed on the head. The PR touches only `draw.rs`; `watch` is a different module, and the same three `watch` tests fail on the base and the head (`holes_are_known_until_the_runtime_tells`, `no_mapping_is_lost_between_askers`, `what_is_left_alone_is_no_known_hole`). So the real result is **0 regressions**; the "red then green" verdict is the flaky `watch` guard-page machinery under Wine without a real GPU. 640 tests pass on both sides, 59 are `ignored`, and every `draw::` test is `ok` on both sides. - **The change is not exercised by any test that runs here.** `State::bind`/`prepare_for` need a live `HostList` and `HostPipeline`, i.e. a host device. On this machine `host()` is `None` (Wine's D3D12 finds only the llvmpipe CPU device — `Found device: llvmpipe (LLVM 23.1.5, 256 bits)` — but `Host::create()` still fails, so the ignored `dump_buffer_view_descriptor_bytes` probe panics with "an active D3D12 device" and `depth_bounds_pipeline_loads_and_filters_draws` returns at its `host()` guard). The `replay` integration tests that would drive `State::bind` end-to-end are `#![cfg(all(windows, feature = "diagnostics"))]` (`tests/replay.rs:8`) and the verifier runs without `--features diagnostics`, so they are not compiled. So the wine_red_green run confirms only that the reordering does not regress the device-free suite, not that it fixes the state decision. The reviewers and the author say the same ("the ordering is a state decision a GPU-less suite cannot see, so reverting it stays green"). ### 4. Any failure I saw and why it is not this PR - The 3 `watch` failures (§3) fail on the merge base too and are environment failures of the guard-page/exception machinery under Wine without a real GPU; the PR touches none of `watch.rs`. The 1 red→green flake is the same class (a different `watch` test than in the #2823 run, so the flakiness is not a fixed set). ### 5. One thing worth the author's attention (not a defect, already on record) - **No regression test.** KelboLive's review and the author's reply both state it: reverting the ordering stays green, and there is "no honest device-free seam" — the ordering only matters inside `State::bind` → `early_textures` → `heap_textures`, which need a live `HostList` (the transition goes through `list.transition`/`ResourceBarrier`). The author plans a seam test "only if a device-free shape exists". So the fix rests on the ordering analysis and the reviewers' agreement, not on a test. This is the one substantive caveat; it does not change the verdict, but it means the change would not be caught if the ordering were re-broken. ### 6. What I did not check - **No GPU, no D3D12 adapter, no title**: the whole point is a state decision made while a draw's textures are prepared on a real device. I could not run a draw that only tests its depth and reads it through a heap-indexed view, so the fix is verified by tracing the code (readable, prepare_for, the old and new priming positions) and by the reviewers' read, not by a run. - **The bake list**: I confirmed `early_textures` → `heap_textures` on `bake_list` (draw.rs:3913-3975) and that the same thread runs it, but did not observe a bake pass record the combined barrier. - **The 134-commit gap**: the PR is based on `913b88b90`, 134 commits behind today's `main` (`a917c54d`). The red/green run is against the merge base; I did not check the change still applies to `main` (the author rebased on `913b88b90` and reports the indirect-batch changes are covered). - **No Windows build, no MSVC**: everything is `cargo test --target x86_64-pc-windows-gnu` under Wine 11.21 on Fedora 45; a real Windows driver/ABI is not exercised. - **The `replay` integration tests** (`--features diagnostics`) were not run — they need the diagnostics feature (and a device), and the verifier passes neither. - **The other crates** (`leonida-hle`, `leonida-loader`) and the repository's Python suite were not run; the change is confined to `leonida-gpu`. - **The original review thread at #2866** (this PR is a re-creation of it): I read the current PR's review and comments but not #2866's thread.
MoonEyes commented 2026-12-02 12:33:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:33:12Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345511397 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7345511397). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:33:12Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:09:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:09:16Z.


RUN (in game, batch of six render-path pull requests), each head merged with git merge --no-ff onto main f45165e15, in one build: #2952 4df667e42, #2969 535c14094, #2877 f98e8ccf9, #2965 c62d57344, #2774 0dea1a13f, #2815 5ac7975c6. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 14.9, mean 14.2
Rendered fps, last 120 s median 14.6

For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7349821392 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7349821392). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:09:16Z. --- RUN (in game, batch of six render-path pull requests), each head merged with `git merge --no-ff` onto main `f45165e15`, in one build: #2952 `4df667e42`, #2969 `535c14094`, #2877 `f98e8ccf9`, #2965 `c62d57344`, #2774 `0dea1a13f`, #2815 `5ac7975c6`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 14.9, mean 14.2 | | Rendered fps, last 120 s | median 14.6 | For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:56:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:56:50Z.


RUN (independent run on Windows, #2965 head c62d57344, merged locally into main f45165e15 with git merge --no-ff, as part of a batch of six)

The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files).

Red: the PR adds no test, and none fails when it is removed.

  • Reverting the merge (priming of TESTED_DEPTH back after early_textures): leonida-gpu lib 690 passed plus one of the intermittent failures listed below.
  • Second mutation, never prime it (if false && !compute && ... at draw.rs:3123): same 690 / 1.
    Nothing in the suite reads the state prepare_for picks after a heap-indexed read of a read-only depth target.

Green (whole batch, one tree, Windows 11, debug profile as d3d12.yml runs it):

  • cargo test --workspace --exclude xtask --locked: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36).
  • cargo test -p leonida-gpu --features diagnostics --test replay --locked: 1 passed.
  • cargo test -p xtask --locked: 7 passed.
  • Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers, watch::tests::a_write_opens_the_view_it_goes_through, pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once); each passes alone, a later full run was 691/0, and main f45165e15 alone failed the alias_cast test in 2 of 3 runs.

Mutations: revert of the move, not killed; tested always 0, not killed. Only a test with a depth target tested by a draw and read through a heap index would kill them.

Review: the move reads as safe.

  • self.depth and self.depth_state are only written in the set-target code (draw.rs:2668-2673), never between the old and the new place, so tested has the same value.
  • TESTED_DEPTH is a thread_local! Cell<(usize, bool)> with const init and no destructor, so the thread_local destructor trap of gta6rt.exe does not apply (and this is leonida-gpu).
  • It is still reset once per bind, before the pass, so the read bit early_textures now sets reaches prepare_for (draw.rs:3075) and the next bind clears it.
  • To watch: the early pass for a bake draw runs on bake_list and can now record the combined-state barrier for the tested target there. The new comment says so and states are tracked per list, but this can only be judged on a device. With early_budgets() at zero the pass returns at once, so default behaviour is unchanged.

Not covered: the state transition itself (needs a device and a draw with such a read), and the bake-list barrier.

Verdict: PARTIAL. The code reads correct and the in-game run is the only evidence; no test pins it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351193450 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7351193450). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:56:50Z. --- RUN (independent run on Windows, #2965 head c62d57344, merged locally into `main` f45165e15 with `git merge --no-ff`, as part of a batch of six) The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files). **Red:** the PR adds no test, and none fails when it is removed. - Reverting the merge (priming of `TESTED_DEPTH` back after `early_textures`): leonida-gpu lib 690 passed plus one of the intermittent failures listed below. - Second mutation, never prime it (`if false && !compute && ...` at `draw.rs:3123`): same 690 / 1. Nothing in the suite reads the state `prepare_for` picks after a heap-indexed read of a read-only depth target. **Green** (whole batch, one tree, Windows 11, debug profile as `d3d12.yml` runs it): - `cargo test --workspace --exclude xtask --locked`: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36). - `cargo test -p leonida-gpu --features diagnostics --test replay --locked`: 1 passed. - `cargo test -p xtask --locked`: 7 passed. - Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: `texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers`, `watch::tests::a_write_opens_the_view_it_goes_through`, `pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once`); each passes alone, a later full run was 691/0, and `main` f45165e15 alone failed the alias_cast test in 2 of 3 runs. **Mutations:** revert of the move, not killed; `tested` always 0, not killed. Only a test with a depth target tested by a draw and read through a heap index would kill them. **Review:** the move reads as safe. - `self.depth` and `self.depth_state` are only written in the set-target code (`draw.rs:2668-2673`), never between the old and the new place, so `tested` has the same value. - `TESTED_DEPTH` is a `thread_local!` `Cell<(usize, bool)>` with `const` init and no destructor, so the `thread_local` destructor trap of `gta6rt.exe` does not apply (and this is leonida-gpu). - It is still reset once per `bind`, before the pass, so the read bit `early_textures` now sets reaches `prepare_for` (`draw.rs:3075`) and the next bind clears it. - To watch: the early pass for a bake draw runs on `bake_list` and can now record the combined-state barrier for the tested target there. The new comment says so and states are tracked per list, but this can only be judged on a device. With `early_budgets()` at zero the pass returns at once, so default behaviour is unchanged. **Not covered:** the state transition itself (needs a device and a draw with such a read), and the bake-list barrier. **Verdict: PARTIAL.** The code reads correct and the in-game run is the only evidence; no test pins it. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:02:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:45Z.


Code review only, not built (Windows-only leonida-gpu). Ready.

  • Head: c62d57344, merge base 913b88b90, 313 behind current main 45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.
  • Already verified on this head, with no commits since:
    • imShangLi: PASS.
    • MoonEyes in-game batch (15:09): 0 device lost, PASS.
    • MoonEyes independent run (15:56): PARTIAL, because no unit test pins the move.

Review of d3d12/crates/leonida-gpu/src/draw.rs:

  • The whole change moves TESTED_DEPTH.set(..) from after the root-signature and heap block to before self.early_textures(list, p, compute). early_textures reaches heap_textures, which reads a picked view of the tested depth target through readable. Priming it first is the root-cause fix: otherwise that pass sees 0 and leaves the target out of SHADER_RESOURCE.
  • The value computed (!compute && depth_state == DEPTH_READ) is unchanged, and nothing between the old and new positions changes self.depth or self.depth_state. So the only behaviour change is that the early pass now sees it.
  • The bake-list path runs the same early_textures, so it now records the combined-state barrier for this target too. The new comment states this.
  • Agreed with MoonEyes: a draw-state unit test that asserts TESTED_DEPTH is set when early_textures runs would pin it. It is not required for the fix.

Verdict: ready.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353890033 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7353890033). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:02:45Z. --- **Code review only, not built (Windows-only `leonida-gpu`). Ready.** - Head: `c62d57344`, merge base `913b88b90`, 313 behind current `main` `45dc41f95`. A trial merge is clean. CI on the head: all 6 checks pass. - Already verified on this head, with no commits since: - imShangLi: PASS. - MoonEyes in-game batch (15:09): 0 device lost, PASS. - MoonEyes independent run (15:56): PARTIAL, because no unit test pins the move. **Review of `d3d12/crates/leonida-gpu/src/draw.rs`:** - The whole change moves `TESTED_DEPTH.set(..)` from after the root-signature and heap block to before `self.early_textures(list, p, compute)`. `early_textures` reaches `heap_textures`, which reads a picked view of the tested depth target through `readable`. Priming it first is the root-cause fix: otherwise that pass sees `0` and leaves the target out of `SHADER_RESOURCE`. - The value computed (`!compute && depth_state == DEPTH_READ`) is unchanged, and nothing between the old and new positions changes `self.depth` or `self.depth_state`. So the only behaviour change is that the early pass now sees it. - The bake-list path runs the same `early_textures`, so it now records the combined-state barrier for this target too. The new comment states this. - Agreed with MoonEyes: a draw-state unit test that asserts `TESTED_DEPTH` is set when `early_textures` runs would pin it. It is not required for the fix. Verdict: **ready**. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
MoonEyes commented 2026-12-02 21:35:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T21:35:06Z.


RUN (independent run on Windows, head c62d57344132b8e7511e8748464b4faa763ecc80, merged into main 8877be372bac025153488fc56c2b6122f98ec44d with git merge --no-ff)

The merge is clean (auto-merge of d3d12/crates/leonida-gpu/src/draw.rs, no conflict). The PR is one file, +15/-8. This is the test side and a code read only: no game data, no game files, no GPU run.

Green (Windows 11, release profile, CARGO_TARGET_DIR outside the checkout):

  • cargo test -p leonida-gpu --release --locked --lib on the merged tree: 703 passed, 0 failed, 59 ignored.
  • --features diagnostics --lib not run: the PR touches no diagnostics code. No Python test is touched.
  • The three intermittent leonida-gpu failures MoonEyes saw on an earlier batch did not show up in this run.

Red: the PR adds no test, so I mutated the new code instead. All three survive (703 passed, 0 failed each time):

  1. The changed file taken back from main (priming of TESTED_DEPTH after early_textures, i.e. the pre-PR order): survives.
  2. tested forced to 0 (if false && ...): survives.
  3. The !compute guard dropped from the tested expression: survives.

So nothing in the suite reads the state prepare_for picks after a heap-indexed read of a read-only depth target. This matches the author's and KelboLive's remark that there is no device-free seam, and the earlier red run of MoonEyes.

Review:

  • Ordering: the block that sets TESTED_DEPTH moves from after the root-signature/heap block to before self.early_textures(list, p, compute). The expression is unchanged. In the diff nothing between the old and the new place writes self.depth or self.depth_state, so the value is the same and the early pass now sees this draw's target instead of the previous draw's. The table walk is still after the priming. Reads as correct.
  • Default-off: no switch is added. docs/switches.md does not need to be regenerated. The early pass only acts when the early-texture budget is on, so default behaviour is not expected to change.
  • Lifetimes: TESTED_DEPTH is a plain Cell thread-local and is still reset once per bind, so no stale read bit survives into the next draw. No new thread_local with a destructor.
  • Fences and lists: no fence or submit code touched. The only open point is the bake list: the early pass for a bake draw runs on bake_list and can now record the combined DEPTH_READ | SHADER_RESOURCE barrier for the tested target there. The new comment says states are tracked per list; this can only be judged on a device.
  • Claim: the body points to #2570 (finding: read-only depth plus a heap-indexed read ...) and re-creates the closed #2866. It names no item ID from the coordination issue and no issues/14 or 1608 link; the #2570 link is the claim.
  • Open reviewer questions: KelboLive's two points (no regression test, bake-path comment) are answered (comment added in the second commit; test declined by the author as not honestly possible without a device). The author offered a device-gated test if asked; nobody has asked.
  • Overlap: other open PRs that touch leonida-gpu/src/draw.rs: #3164, #3128, #2958, #2915, #2834, #2801, #2661, #2580. None of them is about the depth priming. Textual overlap with bind was not checked beyond this PR merging cleanly into current main.
  • In-game runs on this exact head: yes, MoonEyes posted a batch run on c62d57344 (RTX 4060, 330 s in the world, 0 device lost, median 14.9 fps, as part of a batch of six on main f45165e15). That main is not the current one (8877be372), and the head has not changed since.

Not covered:

  • The state transition itself (a draw that only tests its depth target and reads it through a heap index): needs a device.
  • The combined-state barrier on the bake list.
  • --features diagnostics replay test, the other crates, the Python suite.
  • Visual correctness; the in-game run is a stability check only.

Verdict: PARTIAL. Tests are green on the merge and the move reads as the right root-cause fix, but no test pins it (three mutations survive). The in-game gate is already posted on this head (batch run on an older main), so no new in-game run is strictly required unless the head changes; a device-gated test would close the gap.

AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7359487773 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7359487773). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T21:35:06Z. --- RUN (independent run on Windows, head `c62d57344132b8e7511e8748464b4faa763ecc80`, merged into `main` `8877be372bac025153488fc56c2b6122f98ec44d` with `git merge --no-ff`) The merge is clean (auto-merge of `d3d12/crates/leonida-gpu/src/draw.rs`, no conflict). The PR is one file, +15/-8. This is the test side and a code read only: no game data, no game files, no GPU run. **Green** (Windows 11, release profile, `CARGO_TARGET_DIR` outside the checkout): - `cargo test -p leonida-gpu --release --locked --lib` on the merged tree: 703 passed, 0 failed, 59 ignored. - `--features diagnostics --lib` not run: the PR touches no diagnostics code. No Python test is touched. - The three intermittent `leonida-gpu` failures MoonEyes saw on an earlier batch did not show up in this run. **Red:** the PR adds no test, so I mutated the new code instead. All three survive (703 passed, 0 failed each time): 1. The changed file taken back from `main` (priming of `TESTED_DEPTH` after `early_textures`, i.e. the pre-PR order): survives. 2. `tested` forced to 0 (`if false && ...`): survives. 3. The `!compute` guard dropped from the `tested` expression: survives. So nothing in the suite reads the state `prepare_for` picks after a heap-indexed read of a read-only depth target. This matches the author's and KelboLive's remark that there is no device-free seam, and the earlier red run of MoonEyes. **Review:** - Ordering: the block that sets `TESTED_DEPTH` moves from after the root-signature/heap block to before `self.early_textures(list, p, compute)`. The expression is unchanged. In the diff nothing between the old and the new place writes `self.depth` or `self.depth_state`, so the value is the same and the early pass now sees this draw's target instead of the previous draw's. The table walk is still after the priming. Reads as correct. - Default-off: no switch is added. `docs/switches.md` does not need to be regenerated. The early pass only acts when the early-texture budget is on, so default behaviour is not expected to change. - Lifetimes: `TESTED_DEPTH` is a plain `Cell` thread-local and is still reset once per `bind`, so no stale read bit survives into the next draw. No new `thread_local` with a destructor. - Fences and lists: no fence or submit code touched. The only open point is the bake list: the early pass for a bake draw runs on `bake_list` and can now record the combined `DEPTH_READ | SHADER_RESOURCE` barrier for the tested target there. The new comment says states are tracked per list; this can only be judged on a device. - Claim: the body points to #2570 (`finding: read-only depth plus a heap-indexed read ...`) and re-creates the closed #2866. It names no item ID from the coordination issue and no `issues/14` or 1608 link; the #2570 link is the claim. - Open reviewer questions: KelboLive's two points (no regression test, bake-path comment) are answered (comment added in the second commit; test declined by the author as not honestly possible without a device). The author offered a device-gated test if asked; nobody has asked. - Overlap: other open PRs that touch `leonida-gpu/src/draw.rs`: #3164, #3128, #2958, #2915, #2834, #2801, #2661, #2580. None of them is about the depth priming. Textual overlap with `bind` was not checked beyond this PR merging cleanly into current `main`. - In-game runs on this exact head: yes, MoonEyes posted a batch run on `c62d57344` (RTX 4060, 330 s in the world, 0 device lost, median 14.9 fps, as part of a batch of six on `main` `f45165e15`). That `main` is not the current one (`8877be372`), and the head has not changed since. **Not covered:** - The state transition itself (a draw that only tests its depth target and reads it through a heap index): needs a device. - The combined-state barrier on the bake list. - `--features diagnostics` replay test, the other crates, the Python suite. - Visual correctness; the in-game run is a stability check only. **Verdict: PARTIAL.** Tests are green on the merge and the move reads as the right root-cause fix, but no test pins it (three mutations survive). The in-game gate is already posted on this head (batch run on an older `main`), so no new in-game run is strictly required unless the head changes; a device-gated test would close the gap. AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
MoonEyes commented 2026-12-02 22:17:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T22:17:45Z.


Merging. Head c62d57344 merges cleanly with main f3865cae8 and does not force a rebase of #2566. In-game run on this head by MoonEyes (RTX 4060 8 GB, driver 610.88, Windows 11, 330 s in the world, 0 device lost: https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7349821392) and an independent red/green on this head, both checked by a separate judge. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360495893 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7360495893). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T22:17:45Z. --- Merging. Head `c62d57344` merges cleanly with `main` `f3865cae8` and does not force a rebase of #2566. In-game run on this head by MoonEyes (RTX 4060 8 GB, driver 610.88, Windows 11, 330 s in the world, 0 device lost: https://github.com/ProjectLeonida/mandy/pull/2965#issuecomment-7349821392) and an independent red/green on this head, both checked by a separate judge. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2965
No description provided.