NVIDIA places: the check also looks through a drawn pipeline (D3D12-PLACES-CHECK-GRAPHICS) #2919

Open
Christopher-Sundeby wants to merge 4 commits from upstream-pr/2919 into main
Christopher-Sundeby commented 2026-12-01 18:22:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-01T18:22:25Z.


Claimed in the coordination issue as: D3D12-PLACES-CHECK-GRAPHICS (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7320510381)

What and why

Places::check (d3d12/crates/leonida-gpu/src/pipeline/places.rs) decides whether pipelines with static samplers may come from the pipeline library on NVIDIA. It loads a small stored pipeline for each listed place and compares what it samples with the same pipeline made now. Until now it used compute pipelines only.

On an RTX 5090 with driver 621.40, a graphics pipeline loaded from the library samples through whatever now sits at its stored places, in every run. Loaded compute pipelines mostly sample through their own samplers wherever those now are. So when static samplers were made before the host's list (the case the check exists for), the check answered same and graphics pipelines were loaded through the wrong samplers. In pipelines_with_static_samplers_come_from_the_library, at step make=50,51;host;..., this happened 3 of 3 times on main: places: "same", and pipe g was loaded with read [2, 3], wrong 2. Measurements are in #2887 (comments from 2026-12-01).

The change probes each place twice: with the compute pipeline as before, and with a drawn one. The drawn probe is a graphics pipeline with no render target that draws one pixel (1x1 viewport and scissor) and writes the same buffer from its pixel program. A place counts as same only when every loaded probe agrees with its freshly made twin.

  • The compute probes keep their code and their library names. The probe shaders' entry line became an ENTRY macro that expands to the same tokens, and Stage::name hashes a compute probe's code alone, as main does. the_compute_probes_keep_their_names pins this without a card (fixed in e5895f9b8 after merzleckeier's report).
  • The drawn probes have names of their own, which hash both the vertex and the pixel code.
  • In the first run that has the drawn probes, none is stored yet, so that run judges by compute alone, as every run did before. Probes are still stored only when no place differs.

Test changes:

  • The no-care (=1) assertion now requires the graphics pipeline to read wrong, instead of every pipeline. On 621.40 compute pipelines read right in most runs.
  • The tests use places.rs's VERTEX and bytecode() instead of their own copies.
  • A new drawn: false field is set where a test builds a Run.

Cost, with 320 samplers listed (the_check_looks_at_every_kind_of_sampler, RTX 5090):

run that stores the probes first run that checks against them every later start
main 4,874 ms 5,412 ms 204 ms
this branch 4,690 ms 4,866 ms 425 ms

The first two columns are dominated by the driver compiling, and they vary between runs (KelboLive measured 4,658 / 5,337 / 480 ms). The lasting cost is about 0.2 s more per start.

Tested

On the card: cargo test -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored --nocapture --test-threads=1

passed failed
main 7fbdf8511 5 4
this branch (two runs) 6 2

Red to green:

  • the_check_looks_at_every_kind_of_sampler: on main it fails with left: "same" right: "differ". On this branch it finds differ.
  • pipelines_with_static_samplers_come_from_the_library: on main it fails at make=50,51;host;... (a pipeline read through another sampler). On this branch both make=50,51 and make=3w answer places: "differ" and every pipeline is made by the driver with wrong 0.

Still red, on main and here, and untouched: a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it and the_table_of_static_samplers. These assert the 616.64 driver's behaviour for compute pipelines, which #2887 documents.

Other checks:

  • cargo test -p leonida-gpu --lib --locked: 633 passed, 59 ignored.
  • cargo clippy -p leonida-gpu --all-targets --features diagnostics --locked: no warning in the changed files.
  • rustfmt --check: no new differences (four existing ones in places/tests.rs lines 961-986 are on main already).
  • python -I scripts/check_no_game_data.py on both files: clean.

GPUs tested: NVIDIA GeForce RTX 5090, driver 621.40, Windows 11 Pro (native D3D12). Not run on 616.64 or on AMD/Intel. The new probe only runs on NVIDIA, as before.

AI-assisted: yes. Code, tests and measurements: Claude Opus 5.5 (Claude Code). Separate read-only reviewer: Claude Opus 5.5. It found no bugs; its points are applied in the second commit.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5591831147 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-01T18:22:25Z. --- Claimed in the coordination issue as: D3D12-PLACES-CHECK-GRAPHICS (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7320510381) ### What and why `Places::check` (`d3d12/crates/leonida-gpu/src/pipeline/places.rs`) decides whether pipelines with static samplers may come from the pipeline library on NVIDIA. It loads a small stored pipeline for each listed place and compares what it samples with the same pipeline made now. Until now it used **compute pipelines only**. On an RTX 5090 with driver 621.40, a **graphics** pipeline loaded from the library samples through whatever now sits at its stored places, in every run. Loaded compute pipelines mostly sample through their own samplers wherever those now are. So when static samplers were made before the host's list (the case the check exists for), the check answered `same` and graphics pipelines were loaded through the wrong samplers. In `pipelines_with_static_samplers_come_from_the_library`, at step `make=50,51;host;...`, this happened 3 of 3 times on `main`: `places: "same"`, and pipe `g` was loaded with `read [2, 3]`, `wrong 2`. Measurements are in #2887 (comments from 2026-12-01). The change probes each place twice: with the compute pipeline as before, and with a **drawn** one. The drawn probe is a graphics pipeline with no render target that draws one pixel (1x1 viewport and scissor) and writes the same buffer from its pixel program. A place counts as `same` only when every loaded probe agrees with its freshly made twin. - The compute probes keep their code and their library names. The probe shaders' entry line became an `ENTRY` macro that expands to the same tokens, and `Stage::name` hashes a compute probe's code alone, as `main` does. `the_compute_probes_keep_their_names` pins this without a card (fixed in `e5895f9b8` after merzleckeier's report). - The drawn probes have names of their own, which hash both the vertex and the pixel code. - In the first run that has the drawn probes, none is stored yet, so that run judges by compute alone, as every run did before. Probes are still stored only when no place differs. Test changes: - The no-care (`=1`) assertion now requires the graphics pipeline to read wrong, instead of every pipeline. On 621.40 compute pipelines read right in most runs. - The tests use `places.rs`'s `VERTEX` and `bytecode()` instead of their own copies. - A new `drawn: false` field is set where a test builds a `Run`. Cost, with 320 samplers listed (`the_check_looks_at_every_kind_of_sampler`, RTX 5090): | | run that stores the probes | first run that checks against them | every later start | | --- | --- | --- | --- | | `main` | 4,874 ms | 5,412 ms | 204 ms | | this branch | 4,690 ms | 4,866 ms | 425 ms | The first two columns are dominated by the driver compiling, and they vary between runs (KelboLive measured 4,658 / 5,337 / 480 ms). The lasting cost is about 0.2 s more per start. ### Tested On the card: `cargo test -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored --nocapture --test-threads=1` | | passed | failed | | --- | --- | --- | | `main` `7fbdf8511` | 5 | 4 | | this branch (two runs) | 6 | 2 | Red to green: - `the_check_looks_at_every_kind_of_sampler`: on `main` it fails with `left: "same" right: "differ"`. On this branch it finds `differ`. - `pipelines_with_static_samplers_come_from_the_library`: on `main` it fails at `make=50,51;host;...` (`a pipeline read through another sampler`). On this branch both `make=50,51` and `make=3w` answer `places: "differ"` and every pipeline is made by the driver with `wrong 0`. Still red, on `main` and here, and untouched: `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` and `the_table_of_static_samplers`. These assert the 616.64 driver's behaviour for compute pipelines, which #2887 documents. Other checks: - `cargo test -p leonida-gpu --lib --locked`: 633 passed, 59 ignored. - `cargo clippy -p leonida-gpu --all-targets --features diagnostics --locked`: no warning in the changed files. - `rustfmt --check`: no new differences (four existing ones in `places/tests.rs` lines 961-986 are on `main` already). - `python -I scripts/check_no_game_data.py` on both files: clean. GPUs tested: NVIDIA GeForce RTX 5090, driver 621.40, Windows 11 Pro (native D3D12). Not run on 616.64 or on AMD/Intel. The new probe only runs on NVIDIA, as before. AI-assisted: yes. Code, tests and measurements: Claude Opus 5.5 (Claude Code). Separate read-only reviewer: Claude Opus 5.5. It found no bugs; its points are applied in the second commit. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-01 18:36:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T18:36:43Z.


Existing compute probe keys change on upgrade at 40cf398a on main 7fbdf851. In places.rs the legacy code passed [stored] to library::name. The PR passes [vertex, stored] for compute too. The vertex blob is empty, and library::name hashes a length for every part, including that empty one. I compiled the old and new compute sources for regular and comparison samplers. The stored bytecode was identical in each pair, but both keys changed (4c6a1f1b → 960ec8e9 and 190067a5 → 616c6d85). Passing only [stored] recovered both old keys in the same fixture.

From the lookup code, a pre-upgrade library with only the old compute probes will miss both new compute and drawn keys. The first run can therefore accept the library while storing replacement probes, without comparing the previously stored compute probes described in the PR. Keeping the original one-part key for compute and the two-part key for graphics preserves that check.

I separately ran the new drawn probe with freshly created PSOs under Wine 11.22 / VKD3D-Proton 3.1.0 on RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1). On both GPUs the same-sampler draw matched all 12 vectors for each sampler kind. Changing the sampler with the shader code held fixed changed 12 regular vectors and two comparison vectors. The Wine cache scenarios did not exercise the NVIDIA-specific gate, so the upgrade effect above follows from code and the measured keys.

MEASURED with synthetic fixtures. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321217125 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7321217125). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T18:36:43Z. --- Existing compute probe keys change on upgrade at `40cf398a` on `main` `7fbdf851`. In `places.rs` the legacy code passed `[stored]` to `library::name`. The PR passes `[vertex, stored]` for compute too. The vertex blob is empty, and `library::name` hashes a length for every part, including that empty one. I compiled the old and new compute sources for regular and comparison samplers. The stored bytecode was identical in each pair, but both keys changed (`4c6a1f1b` → `960ec8e9` and `190067a5` → `616c6d85`). Passing only `[stored]` recovered both old keys in the same fixture. From the lookup code, a pre-upgrade library with only the old compute probes will miss both new compute and drawn keys. The first run can therefore accept the library while storing replacement probes, without comparing the previously stored compute probes described in the PR. Keeping the original one-part key for compute and the two-part key for graphics preserves that check. I separately ran the new drawn probe with freshly created PSOs under Wine 11.22 / VKD3D-Proton 3.1.0 on RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1). On both GPUs the same-sampler draw matched all 12 vectors for each sampler kind. Changing the sampler with the shader code held fixed changed 12 regular vectors and two comparison vectors. The Wine cache scenarios did not exercise the NVIDIA-specific gate, so the upgrade effect above follows from code and the measured keys. MEASURED with synthetic fixtures. AI-assisted (Codex).
Christopher-Sundeby commented 2026-12-01 18:44:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-01T18:44:13Z.


Thanks @merzleckeier, you are right. The empty vertex part came in with the review fix in 40cf398a, and it changed every compute probe's name.

Fixed in e5895f9b8. Stage::name gives a compute probe its code alone, as on main, and a drawn probe both of its programs. A new test that needs no card, the_compute_probes_keep_their_names, compiles the probe source as written on main and requires the same name for each sampler kind. It also requires the drawn probe's name to differ.

  • With the empty part put back, the test fails (b4e5d35b… against 8e67b0f9…).
  • With the fix, it passes.
  • On the RTX 5090 / 621.40, the card tests still give 6 passed and 2 failed (the same two 616.64-model tests). The crate's lib tests give 634 passed.

So a library stored before this change is still checked against its compute probes on the first run, and the drawn probes are added beside them.

AI-assisted: yes (Claude Opus 5.5, via Claude Code).


damn an ai assistant thanking someone from your account feels kinda wrong / strange...
but ye thank you @merzleckeier I am telling this personaly not an ai assistant telling you that <3

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321444207 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7321444207). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-01T18:44:13Z. --- Thanks @merzleckeier, you are right. The empty vertex part came in with the review fix in `40cf398a`, and it changed every compute probe's name. Fixed in `e5895f9b8`. `Stage::name` gives a compute probe its code alone, as on `main`, and a drawn probe both of its programs. A new test that needs no card, `the_compute_probes_keep_their_names`, compiles the probe source as written on `main` and requires the same name for each sampler kind. It also requires the drawn probe's name to differ. - With the empty part put back, the test fails (`b4e5d35b…` against `8e67b0f9…`). - With the fix, it passes. - On the RTX 5090 / 621.40, the card tests still give 6 passed and 2 failed (the same two 616.64-model tests). The crate's lib tests give 634 passed. So a library stored before this change is still checked against its compute probes on the first run, and the drawn probes are added beside them. AI-assisted: yes (Claude Opus 5.5, via Claude Code). --- damn an ai assistant thanking someone from your account feels kinda wrong / strange... but ye thank you @merzleckeier I am telling this personaly not an ai assistant telling you that <3
KelboLive commented 2026-12-01 18:47:25 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


The drawn probe itself is sound: it compares a loaded graphics PSO with a freshly made one of the same desc, and the per-place AND (places.rs:641) only makes same stricter — mutating &= to |= fails the new test (places: "same", graphics wrong: 2). On this host the =1 careless run is also meaningful: compute wrong: 0 / [1,2,3], graphics wrong: 2 / [2,3].

But the compute probe does not keep its library name. places.rs:603 passes [vertex, stored] for both stages; compute's vertex is empty (:776-780), and library::name length-prefixes every part (library.rs:562-568), so the hash changes — I measured old 97583e2c… vs new 0397481c… while the compiled cs_5_1 bytes are identical (3,336 both). Consequence: on the first run after landing, no probe is found, check runs nothing, differ is empty, and same() returns true with same = 0 (places.rs:517-524, :629-632), then stores both baselines at whatever layout it found. That is not "judges by compute alone" — it trusts the library unchecked, and on a machine with moved places it can bless a poisoned drawn baseline. Passing only stored for compute (or otherwise preserving the old names) restores the historical comparison.

Second: the new wrong > 0 graphics assertion encodes 621.40 behaviour, while #2921's measurements say loaded pipelines keep their places on 621.24 — which would make that assertion fail there. Please gate it on the observed driver behaviour or name the supported range.

Two smaller notes:

  • The drawn probe has no RTV/DSV, so pixel-shader invocation is driver-dependent; a 1×1 dummy RTV would make it less brittle.
  • The timing claim needs a second look: the_check... measured 4,658 ms stored / 5,337 ms first held against / 480 ms steady, so the "~410 ms" figure matches only the steady state.

Threading is fine: check still runs once through same()'s OnceLock, the probe owns its queue/fence and waits, and Library::load/store are name/save-locked. Merge is clean against current main (ea6caf88), and no textual conflict with #2887/#2921.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6137776752 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#pullrequestreview-6137776752). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T18:47:25Z. **Review:** CHANGES_REQUESTED --- The drawn probe itself is sound: it compares a loaded graphics PSO with a freshly made one of the same desc, and the per-place AND (`places.rs:641`) only makes `same` stricter — mutating `&=` to `|=` fails the new test (`places: "same"`, graphics `wrong: 2`). On this host the `=1` careless run is also meaningful: compute `wrong: 0` / `[1,2,3]`, graphics `wrong: 2` / `[2,3]`. But the compute probe does **not** keep its library name. `places.rs:603` passes `[vertex, stored]` for both stages; compute's `vertex` is empty (`:776-780`), and `library::name` length-prefixes every part (`library.rs:562-568`), so the hash changes — I measured old `97583e2c…` vs new `0397481c…` while the compiled `cs_5_1` bytes are identical (3,336 both). Consequence: on the first run after landing, **no probe is found**, `check` runs nothing, `differ` is empty, and `same()` returns true with `same = 0` (`places.rs:517-524`, `:629-632`), then stores both baselines at whatever layout it found. That is not "judges by compute alone" — it trusts the library unchecked, and on a machine with moved places it can bless a poisoned drawn baseline. Passing only `stored` for compute (or otherwise preserving the old names) restores the historical comparison. Second: the new `wrong > 0` graphics assertion encodes 621.40 behaviour, while #2921's measurements say loaded pipelines keep their places on 621.24 — which would make that assertion fail there. Please gate it on the observed driver behaviour or name the supported range. Two smaller notes: - The drawn probe has no RTV/DSV, so pixel-shader invocation is driver-dependent; a 1×1 dummy RTV would make it less brittle. - The timing claim needs a second look: `the_check...` measured **4,658 ms stored / 5,337 ms first held against / 480 ms steady**, so the "~410 ms" figure matches only the steady state. Threading is fine: `check` still runs once through `same()`'s `OnceLock`, the probe owns its queue/fence and waits, and `Library::load/store` are name/save-locked. Merge is clean against current main (`ea6caf88`), and no textual conflict with #2887/#2921.
Christopher-Sundeby commented 2026-12-01 18:49:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-01T18:49:06Z.


Thanks @KelboLive for the review. This review is on 40cf398a. Point by point, at the current head e5895f9b8:

1. The compute probes' names. Fixed in e5895f9b8, just before this review landed (merzleckeier reported the same). Stage::name hashes a compute probe's code alone, as main does. A new test that needs no card, the_compute_probes_keep_their_names, compiles the probe source exactly as on main and requires the same name for both sampler kinds. It fails with the empty vertex part put back (b4e5d35b… against 8e67b0f9…) and passes with the fix. So the first run after landing checks against the stored compute probes, as before. You were right that the old wording ("judges by compute alone") did not hold at 40cf398a.

2. The graphics wrong > 0 assertion on 621.24. I believe it holds there too, from fiestorra's own 4090 / 621.24 run of a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it (#2570, 15:19 today):

left:  [[6, 7], [43, 44], [1, 2, 3]]      (s, g, c as loaded)
right: [[45, 46], [43, 44], [40, 41, 42]]  (the 616.64 model)

That is the same vector as here on 621.40. The compute pipelines read their own samplers, and the graphics pipeline reads [43, 44], the samplers now at its stored places, instead of [4, 5]. So the "keeps its places" result in #2887 and #2921 comes from compute probes, and graphics pipelines are still read through whatever sits at the old places on 621.24 and 621.40. That is also why #2921's "at run time nothing harmful follows" is too strong; I'll note it there. The assertion filter(kind == "g").all(wrong > 0) therefore matches every measurement we have: 616.64 (every pipeline wrong), 621.24 and 621.40. If you have a 621.01 run of a_stored_pipeline..., I'd like to see the g entry.

3. No RTV/DSV. This is UAV-only rendering: a pixel shader with UAV side effects runs without a bound target. D3D11.1 made this explicit, D3D12 keeps it, and a PSO with NumRenderTargets = 0 is valid (no debug-layer message here). The 1x1 viewport and scissor give one pixel. It is measured on native NVIDIA 621.40 (every drawn probe wrote its 13 vectors), and merzleckeier ran the same draw on an RTX 4070 SUPER and RADV through VKD3D-Proton. The check only runs on NVIDIA. If you would still rather have a 1x1 target, I can add one; it is a small change.

4. Timing. Agreed, the "~410 ms" was the steady state only. The PR body now has the table for both branches (store / first check / later starts) and quotes your numbers too. The lasting cost is about 0.2 s per start; the first two runs are dominated by driver compiles and vary.

AI-assisted: yes (Claude Opus 5.5, via Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321604924 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7321604924). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-01T18:49:06Z. --- Thanks @KelboLive for the review. This review is on `40cf398a`. Point by point, at the current head `e5895f9b8`: **1. The compute probes' names.** Fixed in `e5895f9b8`, just before this review landed (merzleckeier reported the same). `Stage::name` hashes a compute probe's code alone, as `main` does. A new test that needs no card, `the_compute_probes_keep_their_names`, compiles the probe source exactly as on `main` and requires the same name for both sampler kinds. It fails with the empty vertex part put back (`b4e5d35b…` against `8e67b0f9…`) and passes with the fix. So the first run after landing checks against the stored compute probes, as before. You were right that the old wording ("judges by compute alone") did not hold at `40cf398a`. **2. The graphics `wrong > 0` assertion on 621.24.** I believe it holds there too, from fiestorra's own 4090 / 621.24 run of `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` (#2570, 15:19 today): ``` left: [[6, 7], [43, 44], [1, 2, 3]] (s, g, c as loaded) right: [[45, 46], [43, 44], [40, 41, 42]] (the 616.64 model) ``` That is the same vector as here on 621.40. The compute pipelines read their own samplers, and the **graphics** pipeline reads `[43, 44]`, the samplers now at its stored places, instead of `[4, 5]`. So the "keeps its places" result in #2887 and #2921 comes from compute probes, and graphics pipelines are still read through whatever sits at the old places on 621.24 and 621.40. That is also why #2921's "at run time nothing harmful follows" is too strong; I'll note it there. The assertion `filter(kind == "g").all(wrong > 0)` therefore matches every measurement we have: 616.64 (every pipeline wrong), 621.24 and 621.40. If you have a 621.01 run of `a_stored_pipeline...`, I'd like to see the `g` entry. **3. No RTV/DSV.** This is UAV-only rendering: a pixel shader with UAV side effects runs without a bound target. D3D11.1 made this explicit, D3D12 keeps it, and a PSO with `NumRenderTargets = 0` is valid (no debug-layer message here). The 1x1 viewport and scissor give one pixel. It is measured on native NVIDIA 621.40 (every drawn probe wrote its 13 vectors), and merzleckeier ran the same draw on an RTX 4070 SUPER and RADV through VKD3D-Proton. The check only runs on NVIDIA. If you would still rather have a 1x1 target, I can add one; it is a small change. **4. Timing.** Agreed, the "~410 ms" was the steady state only. The PR body now has the table for both branches (store / first check / later starts) and quotes your numbers too. The lasting cost is about 0.2 s per start; the first two runs are dominated by driver compiles and vary. AI-assisted: yes (Claude Opus 5.5, via Claude Code).
merzleckeier commented 2026-12-01 18:52:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T18:52:45Z.


Compute probe key follow-up on the updated head e5895f9b on main 60f7dcd9. I reran the original comparison through the production Stage::name. Previously stored compute bytecode compiled identically, and both legacy keys now match exactly (4c6a1f1b and 190067a5 for this fixture). The drawn keys were distinct and matched their vertex-plus-pixel hashes. The new stock key-preservation test also passed.

Fresh graphics probes again matched all 12 vectors on RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1), under Wine 11.22 / VKD3D-Proton 3.1.0. With only the sampler changed, 12 regular vectors and two comparison vectors changed on each GPU. Each run passed five stock and two additional tests, with eight ignored. This follow-up covers key generation and fresh draws.

MEASURED with synthetic fixtures. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321728963 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7321728963). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T18:52:45Z. --- Compute probe key follow-up on the updated head `e5895f9b` on `main` `60f7dcd9`. I reran the original comparison through the production `Stage::name`. Previously stored compute bytecode compiled identically, and both legacy keys now match exactly (`4c6a1f1b` and `190067a5` for this fixture). The drawn keys were distinct and matched their vertex-plus-pixel hashes. The new stock key-preservation test also passed. Fresh graphics probes again matched all 12 vectors on RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1), under Wine 11.22 / VKD3D-Proton 3.1.0. With only the sampler changed, 12 regular vectors and two comparison vectors changed on each GPU. Each run passed five stock and two additional tests, with eight ignored. This follow-up covers key generation and fresh draws. MEASURED with synthetic fixtures. AI-assisted (Codex).
KelboLive commented 2026-12-01 19:47:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T19:47:16Z.

Review: COMMENTED


Re-checked at e5895f9b8 on RTX 4070 Ti SUPER / 621.01.

  • Compute names: fixed. Stage::name (places.rs:790) passes only stored, with the same kind string and parts as 7fbdf8511; the_compute_probes_keep_their_names passes, and putting the empty vertex part back fails (b4e5d35b… vs 8e67b0f9…). Stored compute probes are found on the first run after landing, and the drawn probes are added beside them.
  • Graphics wrong > 0: I withdraw this one. #2921's 621.24 "keeps its places" result is measured with compute pipelines only; its own graphics run reads g as [43,44] (wrong 2), and this host reproduces [[6,7],[43,44],[1,2,3]]. So the assertion holds on 616.64 / 621.24 / 621.01 / 621.40, not just 621.40. Only nit: the comment at tests.rs:1130 could name 621.24/621.01 too.
  • RTV/timing: not blocking. The draw writes correctly here and on the RADV/VKD3D runs, and the body's table now covers store / first check / later starts (5,272 / 5,497 / 464 ms cold; 267 / 407 / 410 ms warm here).

--lib pipeline::places: 5 passed; -- --ignored: 6 passed, 2 failed — the two 616.64-model tests that are red on main too, not a regression. &=→|= and same = true both fail in ~2 s, so the AND and the per-place comparison still bite. merge-tree against current main is clean (24ae9e45).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6138789299 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#pullrequestreview-6138789299). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T19:47:16Z. **Review:** COMMENTED --- Re-checked at `e5895f9b8` on RTX 4070 Ti SUPER / 621.01. - **Compute names: fixed.** `Stage::name` (`places.rs:790`) passes only `stored`, with the same kind string and parts as `7fbdf8511`; `the_compute_probes_keep_their_names` passes, and putting the empty vertex part back fails (`b4e5d35b…` vs `8e67b0f9…`). Stored compute probes are found on the first run after landing, and the drawn probes are added beside them. - **Graphics `wrong > 0`: I withdraw this one.** #2921's 621.24 "keeps its places" result is measured with **compute** pipelines only; its own graphics run reads `g` as `[43,44]` (wrong 2), and this host reproduces `[[6,7],[43,44],[1,2,3]]`. So the assertion holds on 616.64 / 621.24 / 621.01 / 621.40, not just 621.40. Only nit: the comment at `tests.rs:1130` could name 621.24/621.01 too. - **RTV/timing: not blocking.** The draw writes correctly here and on the RADV/VKD3D runs, and the body's table now covers store / first check / later starts (5,272 / 5,497 / 464 ms cold; 267 / 407 / 410 ms warm here). `--lib pipeline::places`: 5 passed; `-- --ignored`: 6 passed, 2 failed — the two 616.64-model tests that are red on main too, not a regression. `&=`→`|=` and `same = true` both fail in ~2 s, so the AND and the per-place comparison still bite. `merge-tree` against current main is clean (`24ae9e45`).
Christopher-Sundeby commented 2026-12-01 19:59:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-01T19:59:09Z.


Nit done in 33e2e4c13: the comment above the careless run now names 621.01, 621.24 and 621.40 for the graphics pipeline, and keeps "compute only at times" to 621.40, where that was measured. Comment-only change; nothing else moved.

@KelboLive, with the three points settled, could you approve if you're happy with it? Your earlier review still shows as "changes requested".

AI-assisted: yes (Claude Opus 5.5, via Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7323819355 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7323819355). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-01T19:59:09Z. --- Nit done in 33e2e4c13: the comment above the careless run now names 621.01, 621.24 and 621.40 for the graphics pipeline, and keeps "compute only at times" to 621.40, where that was measured. Comment-only change; nothing else moved. @KelboLive, with the three points settled, could you approve if you're happy with it? Your earlier review still shows as "changes requested". AI-assisted: yes (Claude Opus 5.5, via Claude Code).
lixonik commented 2026-12-01 21:38:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T21:38:48Z.


Independent check of 33e2e4c13 merged cleanly on main (1e3e316c5), on native Windows 10 Pro 22H2 (build 19045) + NVIDIA GeForce RTX 5070 12 GB (driver 621.40, Ryzen 9 5950X):

  • cargo test --locked -p leonida-gpu --features diagnostics --lib pipeline::places -- --nocapture --test-threads=1: 5 passed, 0 failed, 8 ignored (including the new the_compute_probes_keep_their_names).
  • cargo test --locked -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored --nocapture --test-threads=1: 1 passed (a_run), 7 failed -- all 7 GPU subprocess runs passed library_use(host, &descs) and then panicked in the test harness at pipeline/places/tests.rs:659 (root_signature(...) -> HRESULT(0x80070057) / E_INVALIDARG). This is a pre-existing Windows 10 inbox d3d12.dll limitation (test binaries do not export Agility SDK symbols, so inbox Win10 d3d12.dll rejects root_signature()'s SM 6.6 *_HEAP_DIRECTLY_INDEXED flags -- same class as #2855), not a regression in this PR.

(Unable to collect the ignored Blackwell 621.40 GPU sampler probe matrix from the test binary on Windows 10 without Agility SDK; non-ignored unit tests and merge on main are clean.)

AI-assisted: Antigravity

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7326573407 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7326573407). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T21:38:48Z. --- Independent check of `33e2e4c13` merged cleanly on `main` (`1e3e316c5`), on native Windows 10 Pro 22H2 (build 19045) + NVIDIA GeForce RTX 5070 12 GB (driver `621.40`, Ryzen 9 5950X): - `cargo test --locked -p leonida-gpu --features diagnostics --lib pipeline::places -- --nocapture --test-threads=1`: **5 passed, 0 failed, 8 ignored** (including the new `the_compute_probes_keep_their_names`). - `cargo test --locked -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored --nocapture --test-threads=1`: **1 passed (`a_run`), 7 failed** -- all 7 GPU subprocess runs passed `library_use(host, &descs)` and then panicked in the test harness at `pipeline/places/tests.rs:659` (`root_signature(...)` -> `HRESULT(0x80070057)` / `E_INVALIDARG`). This is a pre-existing Windows 10 inbox `d3d12.dll` limitation (test binaries do not export Agility SDK symbols, so inbox Win10 `d3d12.dll` rejects `root_signature()`'s SM 6.6 `*_HEAP_DIRECTLY_INDEXED` flags -- same class as #2855), not a regression in this PR. *(Unable to collect the ignored Blackwell `621.40` GPU sampler probe matrix from the test binary on Windows 10 without Agility SDK; non-ignored unit tests and merge on `main` are clean.)* AI-assisted: Antigravity
fiestorra commented 2026-12-01 22:48:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T22:48:17Z.


A finding this PR should know about, measured while making the tests ask a real card: on driver 621.24, 4 of the 8 #[ignore]d pipeline::places tests fail once they run on an NVIDIA card instead of being skipped by one.

They have never been seen failing because the device every test in this crate made came from D3D12CreateDevice(None, ..) - Windows' default adapter - and on a machine with an integrated chip that is the chip. The places children print the vendor of the device they made, and on a 7800X3D + RTX 4090 they printed:

PLACES vendor=1002
not an NVIDIA card: no places are kept

0x1002 is AMD. So the NVIDIA branch of these tests was never entered on this machine, and the 8 "passed" said nothing. With the device on the 4090 (PR #2995), nvidia: true and:

a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it
  left:  [[6, 7], [43, 44], [1, 2, 3]]
  right: [[45, 46], [43, 44], [40, 41, 42]]
pipelines_with_static_samplers_come_from_the_library   "same" where it expects "differ"
the_check_looks_at_every_kind_of_sampler               "same" where it expects "differ"
the_table_of_static_samplers                           assertion failed

What I cannot say: whether these are assertions of a driver behaviour that 621.24 changed (the places note in findings.md is about this driver) or a bug in places.rs. What I can say: on a 4090 with 621.24 the check answers "same" where these tests want "differ", and your drawn probe is the part that would tell them apart - which is why this is worth reading before merging: the probe's expectations may be written against a 5090/621.40 and a 4090/621.24 may answer differently.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7328353717 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7328353717). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T22:48:17Z. --- **A finding this PR should know about, measured while making the tests ask a real card: on driver 621.24, 4 of the 8 `#[ignore]`d `pipeline::places` tests fail once they run on an NVIDIA card instead of being skipped by one.** They have never been seen failing because **the device every test in this crate made came from `D3D12CreateDevice(None, ..)`** - Windows' default adapter - **and on a machine with an integrated chip that is the chip.** The `places` children print the vendor of the device they made, and on a 7800X3D + RTX 4090 they printed: ``` PLACES vendor=1002 not an NVIDIA card: no places are kept ``` **`0x1002` is AMD.** So the NVIDIA branch of these tests was never entered on this machine, and the 8 "passed" said nothing. With the device on the 4090 (PR #2995), `nvidia: true` and: ``` a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it left: [[6, 7], [43, 44], [1, 2, 3]] right: [[45, 46], [43, 44], [40, 41, 42]] pipelines_with_static_samplers_come_from_the_library "same" where it expects "differ" the_check_looks_at_every_kind_of_sampler "same" where it expects "differ" the_table_of_static_samplers assertion failed ``` **What I cannot say**: whether these are assertions of a driver behaviour that 621.24 changed (the places note in `findings.md` is about this driver) or a bug in `places.rs`. **What I can say**: on a 4090 with 621.24 the check answers "same" where these tests want "differ", **and your drawn probe is the part that would tell them apart** - which is why this is worth reading before merging: the probe's expectations may be written against a 5090/621.40 and a 4090/621.24 may answer differently. **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
ammonium231 commented 2026-12-02 03:36:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-12-02T03:36:26Z.


RTX 3090 / 621.47, 33e2e4c13 merged onto main 393901a5b: pipeline::places --ignored is 5 passed / 3 failed on main and 6/2 on the merge. static_samplers_come_from_the_library and every_kind_of_sampler go green; a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it goes red (left 6, 7], [43, 44], [1, 2, 3 right 45, 46], [43, 44], [40, 41, 42); the_table_of_static_samplers stays red. With no places: graphics wrong 2 read [2, 3], compute and sampler wrong 0.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7334054397 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7334054397). Originally posted by [ammonium231](https://github.com/ammonium231) on 2026-12-02T03:36:26Z. --- RTX 3090 / 621.47, 33e2e4c13 merged onto main 393901a5b: pipeline::places --ignored is 5 passed / 3 failed on main and 6/2 on the merge. static_samplers_come_from_the_library and every_kind_of_sampler go green; a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it goes red (left [[6, 7], [43, 44], [1, 2, 3]] right [[45, 46], [43, 44], [40, 41, 42]]); the_table_of_static_samplers stays red. With no places: graphics wrong 2 read [2, 3], compute and sampler wrong 0.
MoonEyes commented 2026-12-02 12:31:23 +00:00 (Migrated from github.com)

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


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:7345465607 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7345465607). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:31:23Z. --- 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).
Christopher-Sundeby commented 2026-12-02 15:54:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-02T15:54:58Z.


In-game run report for the current head, as asked above.

Head 33e2e4c13, merged onto main 0d6757b70 (clean merge)
Comparison main 0d6757b70 alone
Machine RTX 5090 32 GB, NVIDIA driver 621.47, Windows 11 Pro (build 26300)
Settings Series S profile, DLSS 720p to 1080p, DLSS frame generation 2x, diag build with DLSS, same caches for both runs
head + main main alone
Time in the world 462 s 385 s
Device lost 0 0
Crashes 0 (closed normally) 0 (closed normally)
Rendered fps, median (runtime's 5 s lines) 26.1 29.8
...at 6,000-9,000 draws/frame 26.3 (52 lines) 28.0 (34 lines)
...at 9,000+ draws/frame 24.2 (19 lines) 22.5 (13 lines)
Places check at start same=27 new=0, 145 ms same=27 new=0, 146 ms
  • The fps difference is the scene, not the change: the head's run spent more time in busier views (median 8,274 draws/frame against 6,416), and at the same load the two are within a few fps either way. After the start-up check this pull request changes nothing in the frame path.
  • The check passed with the drawn probes: all 27 places read the same when made fresh and when loaded, so the library was used as before. The start before this run (a short one to the menu, also on the head) gave the same result.
  • No visual problems seen in either run. The player's impression was that the head's run froze for shorter times and felt more playable; the runtime's 5 s lines are too coarse to show single long frames, so that is an impression, not a measurement.

No logs or screenshots attached (they show game content).

AI-assisted: yes (Claude Opus 5.5, via Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351140124 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7351140124). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-02T15:54:58Z. --- In-game run report for the current head, as asked above. | | | |---|---| | Head | `33e2e4c13`, merged onto `main` `0d6757b70` (clean merge) | | Comparison | `main` `0d6757b70` alone | | Machine | RTX 5090 32 GB, NVIDIA driver 621.47, Windows 11 Pro (build 26300) | | Settings | Series S profile, DLSS 720p to 1080p, DLSS frame generation 2x, `diag` build with DLSS, same caches for both runs | | | head + `main` | `main` alone | |---|---|---| | Time in the world | 462 s | 385 s | | Device lost | 0 | 0 | | Crashes | 0 (closed normally) | 0 (closed normally) | | Rendered fps, median (runtime's 5 s lines) | 26.1 | 29.8 | | ...at 6,000-9,000 draws/frame | 26.3 (52 lines) | 28.0 (34 lines) | | ...at 9,000+ draws/frame | 24.2 (19 lines) | 22.5 (13 lines) | | Places check at start | `same=27 new=0`, 145 ms | `same=27 new=0`, 146 ms | - **The fps difference is the scene, not the change**: the head's run spent more time in busier views (median 8,274 draws/frame against 6,416), and at the same load the two are within a few fps either way. After the start-up check this pull request changes nothing in the frame path. - **The check passed with the drawn probes**: all 27 places read the same when made fresh and when loaded, so the library was used as before. The start before this run (a short one to the menu, also on the head) gave the same result. - No visual problems seen in either run. The player's impression was that the head's run froze for shorter times and felt more playable; the runtime's 5 s lines are too coarse to show single long frames, so that is an impression, not a measurement. No logs or screenshots attached (they show game content). AI-assisted: yes (Claude Opus 5.5, via Claude Code).
Christopher-Sundeby commented 2026-12-02 15:57:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-02T15:57:02Z.


On ammonium231's RTX 3090 / 621.47 run: a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it going red on the merge is not this change.

  • None of this pull request's code runs in that test. Its child processes run with LEONIDA_LIBRARY_STATIC_SAMPLERS=1, and places::start returns before Places::start for 1, so there is no check and no drawn probe; the compute read path in Probe::run is unchanged.
  • It is a 616.64-model test, and on 621.x it passes or fails with the driver. It expects every loaded sampler to read through the stored places ([[45, 46], [43, 44], [40, 41, 42]]). On 621.x the graphics pipeline always does, while compute pipelines do only at times, so [[6, 7], [43, 44], [1, 2, 3]] comes and goes from run to run.
  • The same red is on main elsewhere: on the RTX 5090 / 621.40 here, and on fiestorra's RTX 4090 / 621.24 above, both without this pull request.

AI-assisted: yes (Claude Opus 5.5, via Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351199104 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7351199104). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-02T15:57:02Z. --- On ammonium231's RTX 3090 / 621.47 run: `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` going red on the merge is not this change. - **None of this pull request's code runs in that test.** Its child processes run with `LEONIDA_LIBRARY_STATIC_SAMPLERS=1`, and `places::start` returns before `Places::start` for `1`, so there is no check and no drawn probe; the compute read path in `Probe::run` is unchanged. - **It is a 616.64-model test, and on 621.x it passes or fails with the driver.** It expects every loaded sampler to read through the stored places (`[[45, 46], [43, 44], [40, 41, 42]]`). On 621.x the graphics pipeline always does, while compute pipelines do only at times, so `[[6, 7], [43, 44], [1, 2, 3]]` comes and goes from run to run. - **The same red is on `main` elsewhere**: on the RTX 5090 / 621.40 here, and on fiestorra's RTX 4090 / 621.24 above, both without this pull request. AI-assisted: yes (Claude Opus 5.5, via Claude Code).
Kal0s-design commented 2026-12-02 15:58:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T15:58:17Z.


Ran natively on Windows 11, head 33e2e4c13 merged into current main (83046a713, clean merge), on driver 617.14. The thread has 616.64, 621.01, 621.24, 621.40 and 621.47, so this is a driver branch it does not have yet. The machine also has a second hardware adapter. Every child run printed vendor=10de, so the NVIDIA branch was really entered (the default-adapter problem raised above did not hit here).

Stock tests (measured)

main merge
--lib pipeline::places (no card) 4 passed, 8 ignored 5 passed, 8 ignored
--lib pipeline::places -- --ignored --test-threads=1 8 passed, 0 failed 8 passed, 0 failed
cargo test -p leonida-gpu --features diagnostics --lib 778 passed, 59 ignored
cargo clippy -p leonida-gpu --all-targets --features diagnostics no warning in places.rs or places/tests.rs
rustfmt --check on places.rs the 4 known diffs in places/tests.rs the same 4, shifted by the new lines

The red-to-green in the PR body does not reproduce on 617.14, because main already passes all 8 tests here. make=50,51 and make=3w already answer differ on main. In the no-care (=1) run, every kind reads wrong on both: compute wrong 3 read [50, 51, 1], graphics wrong 2 [2, 3], stream wrong 2 [4, 5]. So on 617.14 a loaded compute pipeline reads through stored places as well (the 616.64 model), and a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it and the_table_of_static_samplers pass here. On this driver the change does not regress anything, and either probe kind alone finds the move, as the next table shows.

Does each probe kind find moved places on its own? (measured, throwaway mutation of check)

I built two mutants of the merge. One counts every compute pair as same (slot % 4 == 0), so only the drawn probe can find a move. The other blinds the drawn pairs instead (slot % 4 == 2). Both mutants ran the two stock tests that move places, 2 times each:

Mutant make=50,51 make=3w 320 listed + make=50 runs with nothing moved
drawn probe only differ 2/2 differ 2/2 differ 2/2 same every time (the tests assert it)
compute probe only differ 2/2 differ 2/2 differ 2/2 same every time (the tests assert it)

So the drawn probe works on its own on this driver, and gave no false differ. The unmutated merge also ran pipelines_with_static_samplers_come_from_the_library 3 more times, with the same verdicts every time (5× same, 2× differ, all wrong 0 where checked).

A graphics pipeline that samples in its vertex program (measured, throwaway kind v)

The drawn probe samples in its pixel program. I added a test kind whose vertex program does the sampling (SampleLevel in VS, passed to PS through nointerpolation outputs) and ran it beside c, g and s through the same steps, in a single pass:

Run v result
stored, then loaded with places unmoved (2 loading runs, one after make=40-49;heap=16) placed, loaded, wrong 0, read [8, 9]
make=50,51 / make=3w, checked places=differ, made by the driver, wrong 0
no care (=1), make=50,51 loaded, wrong 2, read [4, 5]
no care (=1), make=9p loaded, wrong 2, read [5, 8]

On 617.14, a vertex-stage sampler behaves like the pixel-stage one and is covered by the check. I found no false negative.

Cost (measured, test profile, warm driver cache, main and merge run in turns, n = 5 each, medians)

the_check_looks_at_every_kind_of_sampler, 320 places main merge delta
run that stores the probes 293 ms 436 ms +143 ms
first run held against them 458 ms 707 ms +249 ms
later start 519 ms 696 ms +177 ms
a sampler made before the list (differ) 568 ms 756 ms +188 ms

The extra cost per start is about 0.2 s, in line with the body. The first round, with a cold driver cache, was 4,243 / 5,753 / 1,166 ms on main against 8,133 / 6,083 / 695 ms on the merge. That is n = 1, so I would not read much into it.

Debug layer (measured)

The ignored suite cannot be used for a debug-layer verdict as it stands. With LEONIDA_D3D12_DEBUG=1, 7 of 8 tests fail on both main and the merge, with the same message, 7 times: the test harness's own SetComputeRootSignature on a root signature with SAMPLER_HEAP_DIRECTLY_INDEXED and no sampler heap set. This is pre-existing and not this PR. To look at the check alone, I drained the message queue right before and right after library_use (the call that runs the check) in a throwaway build. The check ran in 3 runs. In one it only made and stored its probes, so nothing was drawn. In the other two it loaded them and ran both the compute and the drawn pairs (the drawn ones have no render target). None of the 3 left a message at ERROR or above. The moved-places path could not be checked under the debug layer: a run that makes a device before host gets PLACES none once the layer is on.

Not checked: the moved-places path under the debug layer, warnings below ERROR, drivers other than 617.14, and any run in game.

GPUs tested: one NVIDIA desktop card. There was no WARP run of the card tests: the check runs only on NVIDIA, and run() removes LEONIDA_D3D12_WARP from its child processes. The 5 non-card tests also pass with LEONIDA_D3D12_WARP=1 set, but they create no device.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351234017 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7351234017). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T15:58:17Z. --- Ran natively on Windows 11, head `33e2e4c13` merged into current `main` (`83046a713`, clean merge), on driver **617.14**. The thread has 616.64, 621.01, 621.24, 621.40 and 621.47, so this is a driver branch it does not have yet. The machine also has a second hardware adapter. Every child run printed `vendor=10de`, so the NVIDIA branch was really entered (the default-adapter problem raised above did not hit here). **Stock tests (measured)** | | `main` | merge | | --- | --- | --- | | `--lib pipeline::places` (no card) | 4 passed, 8 ignored | 5 passed, 8 ignored | | `--lib pipeline::places -- --ignored --test-threads=1` | **8 passed, 0 failed** | **8 passed, 0 failed** | | `cargo test -p leonida-gpu --features diagnostics --lib` | | 778 passed, 59 ignored | | `cargo clippy -p leonida-gpu --all-targets --features diagnostics` | | no warning in `places.rs` or `places/tests.rs` | | `rustfmt --check` on `places.rs` | the 4 known diffs in `places/tests.rs` | the same 4, shifted by the new lines | The red-to-green in the PR body does not reproduce on 617.14, because `main` already passes all 8 tests here. `make=50,51` and `make=3w` already answer `differ` on `main`. In the no-care (`=1`) run, every kind reads wrong on both: compute `wrong 3` read `[50, 51, 1]`, graphics `wrong 2` `[2, 3]`, stream `wrong 2` `[4, 5]`. So on 617.14 a loaded compute pipeline reads through stored places as well (the 616.64 model), and `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` and `the_table_of_static_samplers` pass here. On this driver the change does not regress anything, and either probe kind alone finds the move, as the next table shows. **Does each probe kind find moved places on its own? (measured, throwaway mutation of `check`)** I built two mutants of the merge. One counts every compute pair as `same` (`slot % 4 == 0`), so only the drawn probe can find a move. The other blinds the drawn pairs instead (`slot % 4 == 2`). Both mutants ran the two stock tests that move places, 2 times each: | Mutant | `make=50,51` | `make=3w` | 320 listed + `make=50` | runs with nothing moved | | --- | --- | --- | --- | --- | | drawn probe only | `differ` 2/2 | `differ` 2/2 | `differ` 2/2 | `same` every time (the tests assert it) | | compute probe only | `differ` 2/2 | `differ` 2/2 | `differ` 2/2 | `same` every time (the tests assert it) | So the drawn probe works on its own on this driver, and gave no false `differ`. The unmutated merge also ran `pipelines_with_static_samplers_come_from_the_library` 3 more times, with the same verdicts every time (5× `same`, 2× `differ`, all `wrong 0` where checked). **A graphics pipeline that samples in its vertex program (measured, throwaway kind `v`)** The drawn probe samples in its pixel program. I added a test kind whose vertex program does the sampling (`SampleLevel` in VS, passed to PS through `nointerpolation` outputs) and ran it beside `c`, `g` and `s` through the same steps, in a single pass: | Run | `v` result | | --- | --- | | stored, then loaded with places unmoved (2 loading runs, one after `make=40-49;heap=16`) | `placed`, loaded, `wrong 0`, read `[8, 9]` | | `make=50,51` / `make=3w`, checked | `places=differ`, made by the driver, `wrong 0` | | no care (`=1`), `make=50,51` | loaded, `wrong 2`, read `[4, 5]` | | no care (`=1`), `make=9p` | loaded, `wrong 2`, read `[5, 8]` | On 617.14, a vertex-stage sampler behaves like the pixel-stage one and is covered by the check. I found no false negative. **Cost (measured, `test` profile, warm driver cache, `main` and merge run in turns, n = 5 each, medians)** | `the_check_looks_at_every_kind_of_sampler`, 320 places | `main` | merge | delta | | --- | --- | --- | --- | | run that stores the probes | 293 ms | 436 ms | +143 ms | | first run held against them | 458 ms | 707 ms | +249 ms | | later start | 519 ms | 696 ms | +177 ms | | a sampler made before the list (`differ`) | 568 ms | 756 ms | +188 ms | The extra cost per start is about 0.2 s, in line with the body. The first round, with a cold driver cache, was 4,243 / 5,753 / 1,166 ms on `main` against 8,133 / 6,083 / 695 ms on the merge. That is n = 1, so I would not read much into it. **Debug layer (measured)** The ignored suite cannot be used for a debug-layer verdict as it stands. With `LEONIDA_D3D12_DEBUG=1`, 7 of 8 tests fail on both `main` and the merge, with the same message, 7 times: the test harness's own `SetComputeRootSignature` on a root signature with `SAMPLER_HEAP_DIRECTLY_INDEXED` and no sampler heap set. This is pre-existing and not this PR. To look at the check alone, I drained the message queue right before and right after `library_use` (the call that runs the check) in a throwaway build. The check ran in 3 runs. In one it only made and stored its probes, so nothing was drawn. In the other two it loaded them and ran both the compute and the drawn pairs (the drawn ones have no render target). None of the 3 left a message at ERROR or above. The moved-places path could not be checked under the debug layer: a run that makes a device before `host` gets `PLACES none` once the layer is on. Not checked: the moved-places path under the debug layer, warnings below ERROR, drivers other than 617.14, and any run in game. GPUs tested: one NVIDIA desktop card. There was no WARP run of the card tests: the check runs only on NVIDIA, and `run()` removes `LEONIDA_D3D12_WARP` from its child processes. The 5 non-card tests also pass with `LEONIDA_D3D12_WARP=1` set, but they create no device. AI-assisted: yes (Claude Code).
MoonEyes commented 2026-12-02 17:06:57 +00:00 (Migrated from github.com)

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


RUN (in game, batch of eleven render-path pull requests), each head merged with git merge --no-ff onto main 3c106eb2f, in one build: #3071 c2065b540, #2982 65155eceb, #2964 00a068106, #3107 79333e26b, #2833 823087ec3, #2947 b07f64346, #2919 33e2e4c13, #2962 a4a26ec63, #2847 c8b950cb4, #3114 c4ebe52de, #2664 0e2b6287c. 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 16.2, mean 16.1
Rendered fps, last 120 s median 15.1

For reference, the same machine and route rendered 13.3 to 17.2 fps today on main with single pull requests or other batches. These 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, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory was low (median 0.6 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of this batch is not counted: two runs were started at the same time by mistake on one GPU (no device loss in either, but the measure is not clean).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7352919191 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7352919191). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T17:06:57Z. --- RUN (in game, batch of eleven render-path pull requests), each head merged with `git merge --no-ff` onto main `3c106eb2f`, in one build: #3071 `c2065b540`, #2982 `65155eceb`, #2964 `00a068106`, #3107 `79333e26b`, #2833 `823087ec3`, #2947 `b07f64346`, #2919 `33e2e4c13`, #2962 `a4a26ec63`, #2847 `c8b950cb4`, #3114 `c4ebe52de`, #2664 `0e2b6287c`. 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 16.2, mean 16.1 | | Rendered fps, last 120 s | median 15.1 | For reference, the same machine and route rendered 13.3 to 17.2 fps today on main with single pull requests or other batches. These 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, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory was low (median 0.6 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of this batch is not counted: two runs were started at the same time by mistake on one GPU (no device loss in either, but the measure is not clean). AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:12:36 +00:00 (Migrated from github.com)

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


Reviewed #2919 (code review only, not built here: Windows-only, NVIDIA). In-game PASS at this head and several native runs; the remaining red --ignored tests are driver-dependent and are red on main too.

Head 33e2e4c13d
Merge with main 45dc41f95c clean (git merge-tree); merge base 7fbdf85110, 365 commits behind
Switches registry on the merge exit 0
Evidence on this head lixonik (Windows 10), ghost (RTX 3090 / 621.47), Kal0s-design (617.14: 8/8 --ignored on both main and the merge), the author's in-game run (15:54), MoonEyes in-game PASS (2 December 17:06, batch of eleven)

What the threads establish

  • merzleckeier's probe-key regression on upgrade (40cf398a) was fixed in e5895f9b and rechecked by him.
  • On 621.47 (ghost) pipeline::places --ignored goes from 5/3 on main to 6/2 on the merge: two tests turn green, a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it turns red, the_table_of_static_samplers stays red. The author's answer holds when checked against the code: that test runs its children with LEONIDA_LIBRARY_STATIC_SAMPLERS=1, which returns before Places::start, so none of this PR's code runs in it. It is red on main on 621.24 (fiestorra) and 621.40 (author) and flips from run to run on 621.x. On 617.14 all 8 pass on both sides.
  • So the --ignored places tests are not a reliable gate on 621.x drivers. That is a separate finding, not this PR's: those tests assume the 616.64 driver model.

Review. Adding a drawn (graphics) probe beside the compute one so the check sees through a pipeline kind whose places the driver handles differently is a measured fix (driver versions named in the comment at 33e2e4c13), not a skip.

Verdict: ready.

finding: d3d12/crates/leonida-gpu/src/pipeline/places/tests.rs --ignored tests (a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it, the_table_of_static_samplers) assert the 616.64 model and fail or flip on 621.x NVIDIA drivers; needs an NVIDIA card to rework.

AI-assisted: Claude Opus 5.5 (Claude Code), review only.

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


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354128061 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2919#issuecomment-7354128061). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:12:36Z. --- **Reviewed #2919 (code review only, not built here: Windows-only, NVIDIA). In-game PASS at this head and several native runs; the remaining red `--ignored` tests are driver-dependent and are red on `main` too.** | | | |---|---| | Head | `33e2e4c13d` | | Merge with `main` `45dc41f95c` | clean (`git merge-tree`); merge base `7fbdf85110`, 365 commits behind | | Switches registry on the merge | exit 0 | | Evidence on this head | lixonik (Windows 10), ghost (RTX 3090 / 621.47), Kal0s-design (617.14: 8/8 `--ignored` on both `main` and the merge), the author's in-game run (15:54), MoonEyes in-game PASS (2 December 17:06, batch of eleven) | **What the threads establish** - merzleckeier's probe-key regression on upgrade (`40cf398a`) was fixed in `e5895f9b` and rechecked by him. - On 621.47 (ghost) `pipeline::places --ignored` goes from 5/3 on `main` to 6/2 on the merge: two tests turn green, `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` turns red, `the_table_of_static_samplers` stays red. The author's answer holds when checked against the code: that test runs its children with `LEONIDA_LIBRARY_STATIC_SAMPLERS=1`, which returns before `Places::start`, so none of this PR's code runs in it. It is red on `main` on 621.24 (fiestorra) and 621.40 (author) and flips from run to run on 621.x. On 617.14 all 8 pass on both sides. - So the `--ignored` places tests are not a reliable gate on 621.x drivers. That is a separate finding, not this PR's: those tests assume the 616.64 driver model. **Review.** Adding a drawn (graphics) probe beside the compute one so the check sees through a pipeline kind whose places the driver handles differently is a measured fix (driver versions named in the comment at `33e2e4c13`), not a skip. **Verdict: ready.** finding: `d3d12/crates/leonida-gpu/src/pipeline/places/tests.rs` `--ignored` tests (`a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it`, `the_table_of_static_samplers`) assert the 616.64 model and fail or flip on 621.x NVIDIA drivers; needs an NVIDIA card to rework. AI-assisted: Claude Opus 5.5 (Claude Code), review only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2919:upstream-pr/2919'
git switch 'upstream-pr/2919'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2919'
git switch 'upstream-pr/2919'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2919'
git switch 'upstream-pr/2919'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2919'
git switch 'main'
git merge --squash 'upstream-pr/2919'
git switch 'main'
git merge --ff-only 'upstream-pr/2919'
git switch 'main'
git merge 'upstream-pr/2919'
git push origin 'main'
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!2919
No description provided.