listed_raw_twin: return where the host makes no raw twins #2911
Open
fiestorra wants to merge 2 commits from
upstream-pr/2911 into main
pull from: upstream-pr/2911
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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!2911
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2911"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T17:32:49Z.
The test says in its own
ignorewhy it exists —"offscreen descriptor probe requiring a host with raw view twins"— and then, on a host without them, compares 0 with 0:assert_ne!(0, 0, "the host must allocate raw twins")cannot tell "this host makes no twins" from "the twins this host makes are wrong", and its message chooses the second.A host that does not make raw view twins is the case the probe does not apply to, and it is exactly what the
ignoreattribute says. So it now returns with a line saying so:which is what the other card probes in this crate already do —
the_table_of_static_samplersreturns when there is no card, and theupchecktests name the variable they need instead of asserting into a wall.Nothing else changes: a host that does make raw twins runs the same probe, the same reads and the same comparisons as before.
Measured on an RTX 4090 with 621.24, where
HostHeap::new(false, 4)makes none:AI-assisted: yes — DeepSeek v4.1 (flash), which ran the whole card suite to find this one.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T17:52:40Z.
Independent raw-twin probe matrix at
acd5e00c0+27613ab6b, Win64 under Wine 11.22 and VKD3D-Proton 3.1.0. I ran the exact ignoredlisted_off_alignment_raw_twin_readbacktest withLEONIDA_RAW_VIEWS=0and=1on both AMD Radeon (RADV 26.3.1) and the GeForce RTX 4070 SUPER (620.73.4 as reported by Wine).Main fails at the raw-twin availability assertion in all four cases. With this PR, all four runs print
this host makes no raw view twins: the probe does not apply hereand exit successfully. On these two Wine adapters, enabling the setting still reaches that early return. The evidence covers the unsupported-host path before readback.MEASURED with the offscreen test. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-01T17:59:45Z.
Verified on Windows 11 on a second card, a different NVIDIA generation from the one in the description, with the native D3D12 driver.
Head
acd5e00c0, which already containsmaind2a564b66.cargo test -p leonida-gpu --features diagnostics --lib listed_raw_tests -- --ignored --nocapture --test-threads=1:listed_off_alignment_raw_twin_readbackprintsthis host makes no raw view twins: the probe does not apply here, anddump_buffer_view_descriptor_bytesstill runs.main's version of the file put back: fails atlisted_raw_tests.rs:33withthe host must allocate raw twins(left: 0, right: 0).So
HostHeap::new(false, 4)makes no raw twins on this host either, and the old assert reported that as a broken host. The return is only taken whenheap.raw == 0, so a host that does make twins runs the same probe as before. I could not exercise that path here.GPUs tested: one NVIDIA card, native driver, model not given.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T18:56:18Z.
Review: COMMENTED
Returning here is safe for the only caller: the ignored test is
#[cfg(test)]-only, and the guard precedescpu, the buffers and the firstSetDescriptorHeapsat:101, so no binding or cleanup is skipped, andheapdrops normally. The mutation confirms the guard is the right one — flipping it to!= 0fails at:193with0x80000004vs0x84000004.But it is not the only option, and it costs coverage on exactly the hosts that hit it. On this RTX 4070 Ti SUPER (
heap.raw == 0), the sibling's syntheticheap.raw = 64+ 32 twins fallback (sub_dword...,:305-311) makes the full probe pass 1/1 — I swapped the return for that fallback and got all three biases. So this turns the probe into a no-op on NVIDIA rather than preserving the check. If you keep the return, I would at least prefer the fallback, since the machinery already exists two tests above.Two caveats if it stays:
heap.raw == 0also coversLEONIDA_RAW_VIEWS=0and a regression inprobe_view_limit's 4M-descriptor fit — so a real regression now passes silently. Wording the skip as "raw twins are off" and checkingtwin_bias()(as the sibling does at:299) would narrow that.host().expect(...)at:30, so a machine with no device panics before reaching the guard; #2908'srequire_host()does not touch this test.Non-blocking: shader suite 414/5/0, both ignored tests pass here, and
merge-treewith main is clean. Note #2834 rewrites this same test into alisted_readback(bool)helper — whichever lands second must reapply the guard (or the fallback) there.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:13:06Z.
Positive raw-twin readback check for the new early return at
acd5e00conmain60f7dcd9, using the exact ignoredlisted_off_alignment_raw_twin_readbackcase under Wine 11.22 / VKD3D-Proton 3.1.0 on RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1).With stock heap limits and raw views enabled, main hit the raw-twin assertion on both adapters. The PR printed its early-return message on both. I then reduced the heap limits in a local test build so these adapters could create the raw twins. On that same build, explicit raw views off still printed the early-return message, and raw views on reached DX12 readback and passed on both adapters. The readback verified listed-twin and public transfers at all three source/target bias pairs (4/12, 8/8, 12/4).
MEASURED with synthetic buffers and a local smaller-heap positive control. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T11:25:03Z.
VERIFY-2911 — 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 change is a test-only fix to a card probe: on a host that makes no raw view twins, the probe now returns with a line saying it does not apply, instead of failing
assert_ne!(0, 0, "the host must allocate raw twins")— a message that reads as a broken host. The guard is exactly the condition the test's own#[ignore]names, the probe code on hosts that do make twins is byte-identical to before, and no test in the crate regresses. The one red→green the verifier reported is awatchflake, not this change.head
acd5e00c0f7be26242a18d58ea063bf3798fa45f("listed_raw_twin: return where the host makes no raw twins"), baseorigin/main=a917c54d6aff8c9ef5dda2d8ebf938cb5c693902, merge based2a564b66a96127bc06bb348f3fae52d11e4461e(197 commits behindmain). One file, +8/−1:d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs.1. What it changes
listed_off_alignment_raw_twin_readbackis an offscreen descriptor probe: it places a raw twin for a view that starts 4, 8 or 12 bytes past a 16-byte boundary and runs a compute shader that reads the view's own dwords through the twin (listed_raw_tests.rs:27-223). It is#[ignore]d with the reason"offscreen descriptor probe requiring a host with raw view twins"(:26).The old first lines of the body were
The new body replaces the
assert_ne!with an early return (:33-40):HostHeap::rawis set fromleonida_shader::emit::raw_views()(host.rs:2484, field athost.rs:263with the comment "0: there are none").raw_views()is set toRAW_TWINS = 1 << 21byprobe_view_limit()only whenraw_twins()is on and the host fits a heap of2 * RAW_TWINS = 2^22descriptors (host.rs:2275-2320); otherwise it stays0. Soheap.raw == 0is exactly "the host makes no raw twins" as this runtime determines it, and that is the case theignoreattribute says the probe does not apply to.2. The claims, checked
ignoreattribute says." — Confirmed.#[ignore = "offscreen descriptor probe requiring a host with raw view twins"]at:26, andheap.raw == 0⟺raw_views() == 0⟺ the host makes no raw twins (see the chain in §1). Theignoreand the guard name the same condition.assert_ne!(0, 0, "the host must allocate raw twins")cannot tell 'this host makes no twins' from 'the twins this host makes are wrong', and its message chooses the second." — Confirmed. Whenheap.raw == 0,assert_ne!(heap.raw, 0, ...)isassert_ne!(0, 0, ...), which fails with "the host must allocate raw twins; left: 0; right: 0" — a message about a host whose twins are wrong, for a host that made none. That is the exact misdiagnosis the change removes.assert_ne!→if heap.raw == 0 { ... return; }. Every line after:41(let cpu = ListViews::new()...) is untouched, so a host withheap.raw != 0takes the identical path.host::upcheckand thedump_buffer_view_descriptor_bytessibling probe#[ignore]on the same condition. I did not enumerate every probe; the substantive point (the guard matches theignore) is what matters.d3d12/docs/switches.md:450recordsLEONIDA_RAW_VIEWS("raw twins of the title's slots" withLEONIDA_RAW_VIEWS=0meaning they read the title's slots themselves), which is the switch that turns the raw twins off and thus makesheap.raw == 0. That is the "broader than the stated intent" arm the reviewer flags in §5: the guard also fires when the switch is off, which is the same host condition from the runtime's point of view.3. What the tests do here
I cross-compiled
leonida-gpuforx86_64-pc-windows-gnuand ran the test binaries under Wine withpython3 tools/wine_red_green.py 2911 --crate leonida-gpu(run from/home/shangli/oc-workspace/gta6). Because this pull request changes only a test file, the verifier's red side (merge base + the PR's test hunks) is the same source as the green side, so the run can only show that nothing regressed — it cannot demonstrate the fix.d2a564b66(merge base) + the PR's test hunks--ignored)acd5e00c(PR head)The tool reported 1 red→green, 0 regressions, 3 failing on both sides, 629 passing on both sides, no test present on one side only.
listed_off_alignment_raw_twin_readbackis#[ignore]d, and the verifier runs the test binaries without--ignored, so it is reportedignoredon both sides. Even with--ignored, its first linehost().expect("an active D3D12 device")would panic on this machine:host()returnsNone(host.rs:1223-1232) — Wine's D3D12 (DXVK 2.7.1) finds only the llvmpipe CPU device (Found device: llvmpipe (LLVM 23.1.5, 256 bits)), butHost::create()still fails afterD3D12CreateDevice, so no host device is made. I confirmed this directly: the ignoreddump_buffer_view_descriptor_bytesprobe (alsohost().expect("an active D3D12 device")) panics with exactly that message atlisted_raw_tests.rs:224. The new guard is therefore not exercised here; the author's measurement (RTX 4090, driver 621.24) and the three commenters' verifications (RTX 4070 Ti SUPER, RTX 4070 SUPER + Radeon under Wine, and a second NVIDIA card on Windows 11) are the evidence that on a host without raw twins it prints the message and returns, and on one with them it runs the probe.watchflake, not this PR.watch::tests::a_view_being_split_leaves_its_pages_unguarded_elsewherefailed on the red side and passed on the green. The PR touches onlylisted_raw_tests.rs;watchis a different module, and the same threewatchtests that fail on the merge base (holes_are_known_until_the_runtime_tells,no_mapping_is_lost_between_askers,what_is_left_alone_is_no_known_hole) fail identically on both sides here. So the "red then green" verdict is a false positive of the flakywatchguard-page machinery under Wine without a real GPU, not evidence for this change. I did not repeat the run to measure how often it flips; on the single run it was 1/4watchtests unstable (the 3 others failing both sides).sub_dword_views_null_twins_and_recycled_raw_cbv_clears_bias(the sibling probe,listed_raw_tests.rs:298, which has its ownheap.raw == 0 → heap.raw = 64fallback at:305-311) passes on both sides — so the raw-twin machinery the changed test exercises is exercised by that sibling instead, on hosts with a capped heap.4. Any failure I saw and why it is not this PR
watchfailures (§3) fail on the merge base as well and are environment failures of the guard-page/exception machinery under Wine without a real GPU, exactly as the parent's note says; the PR touches none ofwatch.rs.5. One thing the reviewers said that the change does not address (not a defect)
KelboLive's review (the only review) confirms the return is safe for the only caller and that flipping the guard to
!= 0fails at the probe proper, but notes two things:heap.raw == 0also coversLEONIDA_RAW_VIEWS=0(raw twins off by switch) and a regression inprobe_view_limit's 4M-descriptor fit check, so such a regression would now pass silently instead of failing the probe. That is true:raw_views()stays0both when the host cannot fit2^22descriptors and whenLEONIDA_RAW_VIEWS=0(or whenprobe_view_limitwrongly decides it cannot). Wording the skip as "raw twins are off" and checkingtwin_bias()would narrow it. The author chose the return and did not answer.heap.raw = 64+ 32 twins) makes the full probe pass 1/1 on the same RTX 4070 Ti SUPER where the new guard turns it into a no-op; KelboLive would prefer that fallback since the machinery exists two tests above.These are about how much the probe covers on capped hosts, not about the change being wrong: on a host that genuinely makes no raw twins the probe cannot run, and the change says so instead of failing. I record them so the author can decide whether to switch to the fallback; they do not change the verdict.
6. What I did not check
LEONIDA_RAW_VIEWS=0andtwin_bias()arms: I readraw_twins()(host.rs:2282) andtwin_bias()(host.rs:5390) but did not run the probe under either switch.cargo test --target x86_64-pc-windows-gnuunder Wine 11.21 on Fedora 45; the#[cfg(windows)]path is compiled, but a real Windows ABI/driver is not exercised.leonida-hle,leonida-loader) and the repository's Python suite were not run; the change is confined toleonida-gpu.probe_view_limit's fit check under--ignored: whetherHostHeap::new(false, 4)in this test is the first call that triggersprobe_view_limit(which isOnce-guarded) affectsheap.raw; I read the code but did not observe the ordering in a live run.listed_readback(bool)helper) — I did not read it; whichever lands second must reapply the guard (or the fallback).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:56Z.
Code review only, not built (Windows-only
leonida-gpu). Ready.acd5e00c0, merge based2a564b66, 376 behind currentmain45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.Review of
d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs:#[ignore]d card probe. On a host that makes no raw view twins (heap.raw == 0), it now prints that the probe does not apply and returns. Before, it failedassert_ne!(0, 0, "the host must allocate raw twins"), which reads as a broken host.#[ignore]reason names. On hosts that do make twins, the probe code is unchanged.--nocaptureoutput.Verdict: ready.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T21:38:50Z.
RUN (independent run on Windows, head
acd5e00c0f7be26242a18d58ea063bf3798fa45f, merged intomain8d82a34ae56ca11e499a26ff1e2c834f09100badwithgit merge --no-ff)Merge: clean, no conflict. The merge changes one file, +8/-1:
d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs. Windows 11, native D3D12 driver, one NVIDIA card (model not recorded), release build,--locked.Green
cargo test -p leonida-gpu --release --locked --lib: 703 passed, 0 failed, 59 ignored.#[cfg(test)]only,host.rs:7115), so I did not run--features diagnostics. No Python test is touched.cargo test -p leonida-gpu --release --locked --lib listed_raw_tests -- --ignored --nocapture --test-threads=1: 2 passed, 0 failed.listed_off_alignment_raw_twin_readbackprintsthis host makes no raw view twins: the probe does not apply hereand returns;dump_buffer_view_descriptor_bytesstill runs and prints its tables.Red
main's version oflisted_raw_tests.rsput back (git checkout origin/main -- <file>), the same command fails:listed_off_alignment_raw_twin_readbackpanics atlisted_raw_tests.rs:33withthe host must allocate raw twins,left: 0, right: 0; result 1 passed, 1 failed. Restored withgit checkout HEAD -- <file>; the tree is clean again.heap.raw == 0changed toheap.raw == 1. The probe then falls through on this host and panics atlisted_raw_tests.rs:193; the mutant is killed (1 passed, 1 failed). Removing thereturnwould behave the same way on a host without twins. I tried no other mutation, there is little else in an 8-line change.Review
docs/switches.mddoes not need regenerating. The guard readsheap.raw, which is 0 whenLEONIDA_RAW_VIEWSis off or the host cannot fit the heap, and that is the condition the#[ignore]reason names.ListViews, the registered buffer and the dispatch are created, so nothing is left to drop or wait on. On a host that makes twins, every line after the guard is the same as before.heap.raw == 0) the sibling's synthetic fallback (heap.raw = 64plus 32 twins,:305-311) makes the full probe pass at all three biases. KelboLive swapped the return for that fallback and measured 1/1 passing. So the return turns the probe into a no-op on NVIDIA; the reviewer prefers the fallback.heap.raw == 0also coversLEONIDA_RAW_VIEWS=0and a regression ofprobe_view_limit's 4M-descriptor fit, so a real regression now passes with only a printed line. The reviewer suggests wording the skip as "raw twins are off" and checkingtwin_bias()as the sibling does at:299.host().expect(...)at:30still panics on a machine with no device, before the guard is reached; #2908'srequire_host()does not touch this test.01df1490c45a1d50693878bc2763bc0f6ed3cbce) edits the same file. Its diff moves this test's body into alisted_readback(bool)helper and adds a second ignored test, so whichever of #2911 and #2834 merges second must put the guard back in the helper (KelboLive says the same). I did not merge the two, so I do not know whether git reports a textual conflict; the merge of #2911 alone intomainis clean (GitHub shows CLEAN, MERGEABLE).Not covered
--features diagnosticsand an in-game run: not run, no shipped code is changed.Verdict
PARTIAL. The behaviour is confirmed (green here and on three other machines), main's version fails with the old message (red), and a mutant of the guard is killed. But the three points of KelboLive's review above are open on this head: the return makes the probe a no-op where a measured fallback runs it fully, a regression of the twin fit would pass silently, and
host().expectat:30still panics with no device. #2834 will also conflict in substance with this test. The verdict becomes PASS when the author answers those points (keep the return and say why, or switch to the fallback) and the overlap with #2834 is settled. No in-game run is posted on this head; since no runtime code changes, I do not hold the verdict on that alone.AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T22:05:28Z.
KelboLive's third point is fixed in
c13dab327; the other two I answer here, and one of them I confirm rather than close.3.
host().expect(...)at :30 — fixed. The probe now returns with a message when there is no device, the same way it returns when the host makes no twins:It is the same shape the second test in the file already used. Run on this machine (
cargo test -p leonida-gpu --lib listed_off_alignment_raw_twin_readback -- --ignored --nocapture): 1 passed and no skip line printed, so this host does make raw twins and the probe body ran fully — the guard did not hide anything here.1. "the return makes the probe a no-op where a measured fallback runs it fully" — the probe's subject is the raw twin (
twin_bias,buffer_opreading the slot's stride word); on a host that makes none there is no measurement to take, and the old assertion compared 0 with 0 and reported "the host must allocate raw twins", which is a false fault on a portable host. What the probe can no longer do is fail there, and that is the trade this PR makes, deliberately.2. "a regression of the twin fit would pass silently" — confirmed, and the fix does not close it. I looked: the only other test that exercises the machinery is
sub_dword_views_null_twins_and_recycled_raw_cbv_clears_bias(not ignored), and whenheap.raw == 0it fabricates 64 raw slots instead of asserting that the host made any. So nothing in the crate asserts that a host which can make twins does make them, and a regression that stopped making them would leave both tests green. That is a real gap and it is older than this PR; closing it needs a test that knows independently whether the host can twin, which is the hard part. I would rather write that here than pretend the skip covers it.On #2834: it edits the same file and I have not rebased onto it; whichever lands second will need the other's file. That is a fact about the queue, not a claim that this PR is ready.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T22:52:06Z.
The
UNSTABLEon this pull request is not its own: thed3d12 (windows-latest)job fails at Build, before any test runs, on a line this branch does not touch:main(16243cd6e) does not compile itsleonida-luatests since057cc94d8changedRuntime::newto returnRuntimeand left one.unwrap(). It fails for every pull request, so a red check here says nothing about this change. I checked withcargo test -p leonida-luaonorigin/main: same error, exit 101.The fix is one line and it is pushed to the fork as
fix-main-lua-test-unwrap(cf29393a1), with46 passedafter it; I left the finding in #2570 since I cannot open pull requests from this account.My own evidence for the change here is unchanged and green: on the branch head,
cargo test -p leonida-gpu --lib listed_off_alignment_raw_twin_readback -- --ignored --nocapturepasses and prints no skip line, so this host makes raw twins and the probe body ran fully.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T22:53:47Z.
In-game run (batch with #2891, #2892, #2952, #2965 on main
f3865cae87, merged --no-ff): PASSc13dab3274AI-assisted (oreofr-agent)
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:35:06Z.
Rebased onto the fixed
main(81efe4566), pushed as9a2e9f607. TheUNSTABLEhere wasmain's: it did not compileleonida-lua's tests for a few hours (057cc94d8left a.unwrap()onRuntime::new), which turned every pull request'sd3d12 (windows-latest)red at Build. That landed fixed in #3244 (a22fa26d6).On the new base, the probe still does what this pull request says:
cargo test -p leonida-gpu --lib listed_off_alignment_raw_twin_readback -- --ignored→ 1 passed, and no skip line, so this host makes raw twins and the body ran. The check's neighbours are unaffected.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T00:38:26Z.
RUN (in game, batch of three pull requests), each head merged with
git merge --no-ffonto maind5b30be1c, in one build: #29119a2e9f607, #2995a2cd1dda5, #30506934967a0. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. 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; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. #2995 and #3050 change tests only: this run shows they leave the game path as it was, nothing more. #2911 was run in game on an earlier head by another tester; this run covers its current head.AI-assisted (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.