From a012d951ad9f28486a7d59bda1070c1120eae4e7 Mon Sep 17 00:00:00 2001 From: fiestorra Date: Tue, 1 Dec 2026 19:24:19 +0100 Subject: [PATCH 1/2] findings: what the static-sampler places do on driver 621.24 places.rs models one card and one driver - RTX 4060 Ti, 616.64, as its own first lines say - and the section above records that model. On an RTX 4090 with 621.24 four of its five tests fail, and the reason is a single behaviour the model gets the other way round. On 616.64 a loaded pipeline gives its static-sampler places back: the root signature goes, the place with it, the next samplers made take the lowest free ones and a stored pipeline reads through whatever is now at its old places. That is the fault the numbering at the start exists to survive. On 621.24 the sixteen stay where the first run left them: host : places 0 to 15 hold [0, 1, ..., 15] host;make=22,20,21 : places 0 to 15 hold [0, 1, ..., 15] unchanged KelboLive measured the same on an RTX 4070 Ti SUPER with 621.01. At run time this changes nothing harmful: Places::check loads a stored pipeline, compares it with one made now, finds no difference, reports "same", and the library is used - correctly, because the places are the ones the pipeline was stored with. The numbering still happens and is now unnecessary on this driver rather than wrong. The four tests are left as they are, deliberately: with one driver measured and the other machine missing, a test accepting both would stop reporting the change it exists to report. What would settle it is the command in the section above, run on a 40-series card with 616.64. Written with an AI assistant. --- d3d12/docs/findings.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/d3d12/docs/findings.md b/d3d12/docs/findings.md index 4bb292e357..dc7a0730de 100644 --- a/d3d12/docs/findings.md +++ b/d3d12/docs/findings.md @@ -562,6 +562,43 @@ stops at 1,000. If something makes static samplers on the device before the list runs and not in others, those runs fall back to the driver; the log then names the file to delete to begin anew. +## The static samplers' places on driver 621.24 (2026-12-01) + +`pipeline/places.rs` is a model of one card and one driver - its first lines say RTX 4060 Ti, +616.64, and so does the section above. On an RTX 4090 with 621.24, four of its five tests fail, and +the one thing they get wrong is what a loaded pipeline does with its places. + +**On 616.64 a loaded pipeline gives its places back**: the root signature goes, the place with it, +and the next samplers made take the lowest free ones - so a stored pipeline reads through whatever +is now at its old places, which is the fault all the numbering exists to survive. + +**On 621.24 it keeps them.** `the_table_of_static_samplers` prints the places 0 to 15 hold after +each of its steps, and the step that differs is this one: + +``` +host : places 0 to 15 hold [0, 1, ..., 15] +host;make=22,20,21 : places 0 to 15 hold [0, 1, ..., 15] <- unchanged +``` + +The model says the three samplers made since take 0, 1 and 2 and the sixteen slide to 3..15 +(`[22, 20, 21, 0..12]`). They do not slide on 621.24. KelboLive measured the same on an RTX 4070 Ti +SUPER with 621.01, and `a_loaded_pipeline_keeps_its_places_or_loses_them` prints `keeps its places` +on both cards. + +**At run time this changes nothing harmful.** `Places::check` loads a stored pipeline and compares it +with one made now; on 621.24 it finds no difference, reports `same`, and the library is used - which +is correct, because the places really are the ones the pipeline was stored with. The numbering at the +start still happens, and is now unnecessary on this driver rather than wrong. + +**For the tests it changes four, red on 621.24 and only there**, all of them asserting the 616.64 +vectors. `the_check_looks_at_every_kind_of_sampler` is the clearest: it makes the places shift on +purpose and expects the check to say so; with no shift the check answers `same`, which is the truth. + +**What is not done**: the four are left as they are. With one driver measured and the other machine +missing, a test that accepted both would stop reporting the change it exists to report. Two runs of +those four on a 40-series card with 616.64 - the command is in the section above - say whether the +bit is the driver version or the card, and that is all that is missing. + ### The precompile and the game's pipelines (2026-12-01) Right after a precompile (`leonida warm`) that had just made the 4,875 pipelines earlier runs drew From d2fefa982a768edb5068013dfc6da24acb389cdd Mon Sep 17 00:00:00 2001 From: fiestorra Date: Tue, 1 Dec 2026 19:37:11 +0100 Subject: [PATCH 2/2] d3d12: run leonida-gpu's tests on one thread The Tests (no GPU, no game data) job fails on the runner's WARP adapter about one run in eight, a different test each time: crash::tests in leonida-loader on one run, descriptor::tests in leonida-gpu on another, and the same branch passed the job an hour before the second failure. This crate's flake was measured and cured that way already: 16 parallel runs of leonida-gpu/lib gave 2 failures in two different tests, --test-threads=1 gave 8 of 8 clean at 37 s against 13 s, and every test alone was 15 of 15 clean. The workflow runs them the default way, so every device test in the crate shares one WARP device on every core at once. So the workspace runs without leonida-gpu, and the crate runs by itself with --test-threads=1, keeping the --skip for the depth bounds test that the software adapter does not do. The cost measured here: the whole crate serial is 55.4 s and 632 tests pass; the job grows by seconds, not minutes, and its timeout stays 30. Written with an AI assistant. --- .github/workflows/d3d12.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/d3d12.yml b/.github/workflows/d3d12.yml index 3cf56fa817..3d347ac06b 100644 --- a/.github/workflows/d3d12.yml +++ b/.github/workflows/d3d12.yml @@ -73,8 +73,14 @@ jobs: # in the renderer; drop the --skip with it. A failing test here also stops the crates after leonida-gpu. - name: Tests (no GPU, no game data) timeout-minutes: 30 - run: cargo test --workspace --exclude xtask --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws - # tests/replay.rs is compiled only with the diagnostics feature. + run: cargo test --workspace --exclude xtask --exclude leonida-gpu --locked + # One thread: this crate's device tests share the runner's one WARP device, + # and in parallel they fail about one run in eight (two different tests in + # 16 runs, and two more in CI on 2026-12-01). Serial, 8 of 8 passed at 37 s + # against 13 s, and every test alone 15 of 15. The whole crate serial is 55 s. + - name: Tests (leonida-gpu, one thread) + timeout-minutes: 30 + run: cargo test -p leonida-gpu --locked -- --test-threads=1 --skip depth_bounds_pipeline_loads_and_filters_draws - name: Replay test (diagnostics) timeout-minutes: 15 run: cargo test -p leonida-gpu --features diagnostics --test replay --locked