Open
zmasi wants to merge 20 commits from
upstream-pr/2834 into main
pull from: upstream-pr/2834
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!2834
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2834"
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 zmasi on 2026-12-01T05:01:14Z.
Summary
Refs #2771, #2770 (
D3D12-RDNA-GBUFFER-TERRAIN-TILES).Because #2771 (RX 7800 XT, RDNA 3) and #2770 (RX 9070 XT, RDNA 4) reproduce only on RDNA 3 / RDNA 4 hardware in outdoor scenes and our local test machine has an RTX 3090 + WARP with no retail game data, the root cause is not claimed as proven here. Instead of changing default runtime behaviour unmeasured, this PR lands the three concrete AMD-relevant gaps between Mandy and
monte-alt/vesper(7b7e556, GPL-3.0) as opt-in switches — all off by default — with per-frame diagnostic counters and hardware/WARP unit tests so RDNA 3 / RDNA 4 testers can isolate the exact mechanism in a single A/B pass.With all three switches unset (the default), command-list recording, thin-list streams, descriptor slots, and shader translation are unchanged from
main.Switches Added (All Off by Default)
LEONIDA_TARGET_BARRIERS=<bits>(leonida-gpu/src/list/groups.rs,list.rs,list/thin.rs,draw.rs,host/place.rs; adapted aftermonte-alt/vesper7b7e556VESPER_SMART_BARRIERS, GPL-3.0):1(named texture moves): parses the console'sID3D12GraphicsCommandList7::Barriertexture barrier groups (list.rspreviously ignored_groupsand emitted one null-resource UAV barrier) and transitions named single-subresource host textures left for reading (RENDER_TARGET/DEPTH_WRITE/COPY_DEST-> shader-read / copy-source state) throughHostList::ensure_state, caching the single-subresource check (GetDesc+CheckFeatureSupport) perHostTexture::serialso partial barriers do not query the driver repeatedly. Capped at 31 textures per call with a once-logged warning; when bit2is also enabled (=3), calls exceeding 31 textures fall back to a full target wait for the remainder.2(target waits): upgrades resource-less texture barriers, global barriers, and pipeline syncs toHostList::wait_for_everything(wait_for_all) when the host list has recorded a draw, clear, or resolve into a target since its last target wait.LEONIDA_THIN=1record/replay round-trips while keeping the unset thin-list encoding identical tomain(single word) and supports live toggling viaLEONIDA_AB=4,LEONIDA_TARGET_BARRIERS.LEONIDA_LIST_TWIN_MOVE=1(leonida-gpu/src/descriptor.rs,descriptor/host.rs,descriptor/host/listed_raw_tests.rs; aftermonte-alt/vesper7b7e556, GPL-3.0):move_rawin place to non-16-byte-aligned raw buffer twins inside per-threadLIST_VIEWSslots (wheremainonly moved the single staging slot and left per-list raw twins biased or null), and adds the moved-in-list count to the raw-twins frame diagnostic line. Supports live toggling viaLEONIDA_AB=4,LEONIDA_LIST_TWIN_MOVE.LEONIDA_HOST_WAVE32=1(leonida-shader/src/emit/mod.rs,emit/lower.rs; aftermonte-alt/vesper7b7e556VESPER_RDNA_WAVE32, GPL-3.0):32..64wave lanes), tells the shader translator to target 32-lane waves (matching the wave-32 forms run on NVIDIA) and keys the shader cache on both the effective lane count and switch value."no wave32 lowering for this wave64 program"(emit/mod.rs), so missing pipelines / skipped draws are expected on aLEONIDA_HOST_WAVE32=1run. Do not read unrelated missing geometry or passes as #2771/#2770 getting worse — judge only whether the flickering black/grey ground tiles themselves disappear or change.d3d12/docs/switches.md: Regenerated viapython -I tools/d3d12_switches.py --out d3d12/docs/switches.md.A/B Isolation Plan for RDNA 3 / RDNA 4 (#2771, #2770)
From the same outdoor save spot through the launcher (
diagprofile):Useful existing zero-code controls on the same spot if needed:
LEONIDA_INDIRECT_BATCH='0'; LEONIDA_INDIRECT_WINDOW='0',LEONIDA_RAW_VIEWS='0', andLEONIDA_TWIN_BIAS='0'.Key log lines to include from each run:
host wave lanesthe title's waits for what was drawn into targets per frame ...(reports full target waits, skipped waits, named read textures, and in-list transitions)raw twins of buffer views made per frame ...LEONIDA_HOST_WAVE32=1: ...plus"no wave32 lowering for this wave64 program"/DROPPED/no host pipelinelines (onLEONIDA_HOST_WAVE32=1, wave64-only shader refusals and missing pipelines are expected)Once a reporter confirms which switch resolves the outdoor ground tiles (and its frame-time delta), flipping that default is a one-line follow-up.
Verification & AI Disclosure
go, risk0/4), Claude Opus 5.5 (4 adversarial review passes), and Gemini 4 Neon (opus-systems-criticreview on the follow-up cache/counter/test commit).10.0.26200), NVIDIA GeForce RTX 3090 (24 GB, driver610.88) and D3D12 WARP (LEONIDA_D3D12_WARP=1):cargo test -p leonida-gpu --lib(default,--features diagnostics, andLEONIDA_D3D12_WARP=1): all passing, including 16 new hardware/WARP tests acrosslist::groups(including cachedone_subresourcequery count verification),list::thin, anddescriptor::host::listed_raw_tests(including fresh-threadmake_listed->LIST_SLOTS->own_slotverification on hardware and WARP).cargo test -p leonida-shader --lib(default and--features diagnostics):404passed,0failed (includingemit::tests::a_card_with_waves_of_32_to_64_is_taken_for_one_of_32_only_when_asked).cargo clippy --all-targets(0warnings on added lines),python -I tools/d3d12_switches.py --check d3d12/docs/switches.md(rc=0),tests/test_docs_*.py(rc=0),python -I scripts/check_no_game_data.py(rc=0).listed_twins_moved_readbackremains#[ignore]d locally becauseheap.raw == 0on RTX 3090 / WARP), andID3D12Debuglayer barrier validation (d3d12SDKLayers.dll/ Windows Graphics Tools is not installed on this machine).Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T05:26:10Z.
Verified on Windows with the three code commits and without the fourth, which is documentation and conflicts on its own. The workspace is green apart from the asset policy that
mainalready fails.main10bed9ff2(this branch's merge base),cargo 1.98.1:That remaining failure is
mainfailing its own asset policy on two source files over 640 KiB - not this diff; #2815 fixes it.So the 1,567 lines of code across
list/groups.rs(1,096 new),list.rs,list/thin.rs,host/place.rs,emit/mod.rsandemit/lower.rscompile and pass every test in the workspace. The 12 lines this does not cover are thedocs/switches.mdrow for three new switches, and the conflict there is the switches table's usual one.What I could not test: what the switches do.
LEONIDA_TARGET_BARRIERS,LEONIDA_LIST_TWIN_MOVEandLEONIDA_HOST_WAVE32need a title driving an RDNA card - this machine has a 4090, and the wave32 switch is for a card this is not. The suite passes; the behaviour those switches ask for is what its author measured and I cannot.One thing worth saying about the shape: three switches and 1,096 new lines in one file is a lot to review, and the split this branch already has - one commit per switch plus the doc row - is the right one. If it is rebased, keep that split: the doc commit is what needs the rerere, and the code is what a reviewer should read.
AI-assisted: yes - DeepSeek v4.1 (flash), a 6.9-minute workspace run on the three-commit tree.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T06:14:08Z.
Review: COMMENTED
The code is careful and the default path is genuinely the old one:
words()returns the single count word when the bits are 0,own_slotkeeps the staging-slot behaviour and leaves a listed twin biased, andhost_max_wave()returns the real lanes whenaskedis false. The bit combinations, the thin-list round trip and the WARP paths are covered (13list::groups, the enhanced-barrier and twin tests, all passing on this machine's GPU and on WARP), and the barrier moves/waits are per call — so an A/B phase boundary cannot leave a texture permanently in a wrong state; the worst case is a few calls from the previous phase at the boundary on thin lists, which are valid barriers.switches.mdis current (--checkrc 0), the shader and gpu crates are 405/0 and 607/0 here.Three things before merge:
LEONIDA_HOST_WAVE32experiment guidance is incomplete, and this is the one that will waste someone's run: the switch refuses wave64-only programs (emit/mod.rs:1104, "no wave32 lowering for this wave64 program"), but the A/B plan only says "any DROPPED / no host pipeline lines". Name that message and state that missing pipelines are expected on the=1run — otherwise a tester reads a worse picture as #2771 getting worse and abandons the experiment.one_subresourcequeries the device per named partial barrier (list.rs:2828:GetDesc+CheckFeatureSupport) inside a switch whose frame-time delta is a reported result. Cache the answer per host texture, or state the overhead, so the A/B is not partly measuring a driver query.LIST_SLOTSpath has no running test:LIST_SLOTS.setinmake_listedis exercised only by the#[ignore]dlisted_twins_moved_readback, while the unignored twin test fakes the slot range. A WARP test that makes a real list view would close it, or say in the body that the ignored test was run and passed.Nits, both about the log rather than behaviour: the 31-texture fallback wait requires bit 2 (the
groups.rswarning says so, the body implies more), andTARGET_WAITS[2]counts named textures rather than actual moves, so the "each moved … unless it was in it" line reports a count that is not the number of moves.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-01T06:31:39Z.
Thanks for the thorough review @KelboLive (and @fiestorra for the full-workspace run)! Pushed
6f7d5910cand updated the PR description to address all three items and both nits:LEONIDA_HOST_WAVE32=1refusal guidance: Updated both the switch summary and A/B run notes in the PR description to name"no wave32 lowering for this wave64 program"(leonida-shader/src/emit/mod.rs) explicitly and state that refused wave64-only shaders / missing pipelines are expected on=1, so testers evaluate only whether the ground tiles themselves change rather than treating unrelated missing draws as a regression.one_subresourcecached per host texture (list.rs): Added a lock-free 4,096-slot[AtomicU64; 4096]cache keyed byHostTexture::serial((serial << 2) | (1 + one)) soGetDesc+CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO)runs at most once perHostTexture(absent rare hash eviction) instead of on every partial barrier, covered by a query-count assertion inlist::groups::tests::a_barrier_on_a_part_of_a_texture_moves_it_only_if_that_is_all_of_it.make_listed->LIST_SLOTS->own_slottest (descriptor/host/listed_raw_tests.rs): Added un-ignoredmake_listed_populates_thread_list_slots_for_own_slot, which spawns a fresh worker thread (LIST_SLOTS == (0, 0)), callsheap.make_listed(...)on a real registered placed buffer view, verifiesLIST_SLOTSmatchesLIST_VIEWS's[start, end)range, and checksown_slotacross interior, boundary, and staging handles on both hardware (RTX 3090) andLEONIDA_D3D12_WARP=1.draw.rs+ PR body): Clarified in the PR body that the>31-texture fallback wait applies when bit2is enabled (=3), and addedTARGET_WAITS[3](ensure_state_moved) so the frame log reports both{named} host textures named for readingand({inline} transitioned in the list, the rest at submission or already in state).AI-assisted: authored with Gemini 4 Carbon; independently reviewed with Gemini 4 Neon (
opus-systems-critic). Tested on Windows 11, RTX 3090 (driver 610.88) +LEONIDA_D3D12_WARP=1.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T15:24:18Z.
I ran two-vendor barrier and descriptor checks at
6e1b7eb3against88a9f133e. The Rust tree auto-merges. The only unresolved path is d3d12/docs/switches.md, so this is coverage of the merged Rust code. Win64 MSVC target, Wine 11.22 and VKD3D-Proton 3.1.0, Radeon Raphael RADV 26.3.1 and RTX 4070 SUPER 620.73.04.Each GPU passed 18 tests across list::groups, the enhanced-barrier round trip and the listed descriptor tests. Each also passed the 26 paired-wave and twin-bias shader tests. The off-by-default wave-limit selector test passed separately. The two ignored raw-twin readbacks, when explicitly run, both stopped at the prerequisite that a raw-twin heap be available.
To exercise the readbacks, I made a local build with only the test heap sizes reduced (raw twin base 2^18 and dynamic minimum 2^15). All six listed-descriptor tests then passed on each GPU. The two readbacks returned the expected values with the switch both off and on. Both drivers retained a bias in the on arm because their descriptor layouts do not satisfy move_raw, so that part verifies fallback readback only. The test with synthetic descriptors separately covers an actual move. No RDNA3/RDNA4 terrain-repro claim. MEASURED with synthetic tests. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:04:02Z.
Barrier and descriptor recheck after the main merge at
f34bcd57on60f7dcd9, using Wine 11.22 / VKD3D-Proton 3.1.0. On RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1), the stock barrier, thin-list and listed-descriptor selection passed 22 tests per GPU with three ignored. The same selection on main passed six per GPU with two ignored. The separate Wave32 selector unit test passed.Both optional GPU readbacks stopped at the raw-twin heap prerequisite with stock limits. With just the local heap constants reduced for the test hosts, both passed on each GPU. Listed-twin and public transfers returned expected data at the three source/target bias pairs (4/12, 8/8, 12/4). Both drivers retained the bias when relocation was requested. The moved case is covered here by the stock synthetic descriptor test.
MEASURED with synthetic buffers and shader fixtures. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-12-01T23:47:27Z.
Native Windows AMD complement: RDNA4 through AMD's own D3D12 driver. The runs above are RTX 4090, RTX 3090, WARP, RTX 4070 SUPER and RADV under Wine; none is the native D3D12 driver that #2770 / #2771 run on.
Radeon RX 9060 XT (RDNA4, 16 GB), driver 32.0.23033.1002, Windows 10 Pro 22H2 19045.7846, rustc 1.100.1. Head
f34bcd57bmerged (no commit) intomain913b88b90, merges cleanly.cargo test(whole workspace), 2 runs each. MEASURED.mainalone: 755 passed, 1 failed,depth_bounds_pipeline_loads_and_filters_draws(Windows 10's in-box D3D12, #2855).LEONIDA_TARGET_BARRIERS=7 LEONIDA_LIST_TWIN_MOVE=1 LEONIDA_HOST_WAVE32=1: 773 passed, 2 failed. The extra one isdescriptor::host::listed_raw_tests::sub_dword_views_null_twins_and_recycled_raw_cbv_clears_bias.That extra failure is the test, which does not pin the switch it checks. That test alone, one switch at a time, 3 runs each. MEASURED.
LEONIDA_TARGET_BARRIERS=7,LEONIDA_HOST_WAVE32=1: pass 3/3.LEONIDA_LIST_TWIN_MOVE=1: fails 3/3 atlisted_raw_tests.rs:464,non-dword-aligned SRV twin (by=2) must be null, not reading misaligned pre-view bytes.--features diagnostics,LEONIDA_D3D12_WARP=1), the same head passes 3/3 with the switch at 1. ASSUMED: the test leaves early there, since this PR's description saysheap.raw == 0on WARP. So the red only shows wheremove_rawreally moves the twin, which is the case on this AMD card.settle_twin(host.rs:5473) takesown_slot(host.rs:5461), thenmove_raw(host.rs:5501). By designmove_rawalso moves off-dword twins: "Off dwords too",host.rs:5502. The test does not pin the switch, unlikelisted_readback, which sets it withTwinMove::set(listed_raw_tests.rs:61). So a tester on an AMD card who exportsLEONIDA_LIST_TWIN_MOVE=1for the #2770 A/B and then runscargo testgets a red that says nothing about the card.fix-2834-twin-test-pin, one commit on this head. It addslet _moved = TwinMove::set(false);at the top of that test. MEASURED on the RX 9060 XT, 3 runs each: passes with the switch at 0 and at 1. The wholeleonida-gpucrate with the switch at 1: onlydepth_boundsfails, 2 runs.The ignored hardware probes. On the RX 9060 XT, 3 runs each, MEASURED:
listed_twins_moved_readback -- --ignored: passes 3/3. The probe sets the switch on itself.listed_off_alignment_raw_twin_readback -- --ignored: passes 3/3. This one sets it off.Each prints "listed twins read right" (moved to their views: true for the first, false for the second), "public transfer correct, existing layout guard SRV=true UAV=true", for source bias 4 / target 12, 8 / 8 and 12 / 4.
So on RDNA4's native driver, list twins read correctly for dword-aligned biases, moved or not. Neither probe has an off-dword case (by = 2, 6, ...). That is the case the switch now moves too, and whether RDNA reads it right is not covered by these runs. It would be worth a case before reading the #2770 A/B. ASSUMED.
Part of these numbers was recomputed by a second agent on the same machine: the log counts, the line references, the pin fix, and the WARP run that corrected an earlier draft of this comment. AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-02T00:20:27Z.
Thanks for running both
#[ignore]d hardware readback probes on a native Windows RDNA 4 RX 9060 XT @Tauwni — great to have direct confirmation thatmove_rawengages (moved to their views: true,SRV=true UAV=true) and passes3/3on RDNA 4! Foldedlet _moved = TwinMove::set(false);at the top ofsub_dword_views_null_twins_and_recycled_raw_cbv_clears_biasinb20fd5bb6(and syncedswitches.mdontomain) so runningcargo testwithLEONIDA_LIST_TWIN_MOVE=1exported in the environment stays clean on AMD cards.AI-assisted: Gemini 4 Carbon.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:28:26Z.
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:mainSHA it was merged onto;mainalone 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).
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T17:01:49Z.
Ran natively on Windows 11, head
0386100f0merged into currentmain(43fc605ed, merges cleanly),--features diagnostics, on an NVIDIA card and on WARP, with the D3D12 debug layer this time. The head has since moved to01df1490c, a merge ofmainat5b1fff821with the PR's own diff unchanged. On that head I re-ran the gpu suite, the PR tests under the debug layer, and the all-switches suite (bottom of the tables). The earlier runs here had no debug layer on Windows (the PR body says it was not installed) or ran under Wine, so the barrier recording had not been through the native debug layer yet.Suites on the merge. MEASURED.
leonida-gpu --lib, cardleonida-gpu --lib, WARPleonida-shader --libclippy --all-targets(gpu + shader)leonida-gpu --lib, card and WARP, new head01df1490cDebug layer, PR tests.
list::groups,list::thinanddescriptor::host::listed_raw_tests, withLEONIDA_D3D12_DEBUG=1. The groups tests'run()closes and executes what they record and asserts the debug layer logged nothing. I confirmed the layer was attached: a throwaway test that records a deliberately wrong barrier stops at once with the debug layer'sResourceBarriererror. MEASURED.LEONIDA_D3D12_GBV=101df1490cThe barrier-move and target-wait paths (bits 1, 2 and 3, the thin round trip, clears and resolves) record nothing the debug layer rejects, on either device.
Whole gpu suite with all three switches set.
LEONIDA_TARGET_BARRIERS=3 LEONIDA_LIST_TWIN_MOVE=1 LEONIDA_HOST_WAVE32=1 LEONIDA_D3D12_DEBUG=1. MEASURED.leonida-gpu --lib01df1490c, 3 runs eachOn the new head, one run on each device had a single red, and each was a different test:
indirect::tests::host_list_window_executions_need_no_barrier_of_their_ownon the card andtimeline::report::tests::real_waits_are_recorded_with_who_ended_themon WARP. Both passed when rerun, and the indirect one passed 3/3 alone with each switch set on its own and with all three. I read them as load-sensitive tests on a busy machine, not as an effect of the switches.On these two devices only the barrier switch really does anything.
LEONIDA_HOST_WAVE32needs an AMD card (told_lanesreturns the real lanes otherwise).LEONIDA_LIST_TWIN_MOVEonly acts wheremove_rawtakes the descriptors, anddump_buffer_view_descriptor_bytesprintsmove_raw would take: SRV false UAV falseon this card. The two ignored readbacks stop at "the host must allocate raw twins", as reported above. So this run is no evidence about those two switches on AMD.Switches unset compared with
main. MEASURED except where marked.TEST_BITS):words()for 0, 1, 2, 30, 31, 32, 33, 100 and 1000 barriers, null and named texture, count 0 and 1[count], one word as onmaintargets_written, pipeline sync, 4 rounds, cardown_slotfor addresses inside this thread'sLIST_SLOTSNone, sosettle_twintakesmain's pathemit::emitresult in the 39leonida-shadertests that reach it, one thread,mainagainst this mergeTEST_HOST_WAVE, which returns before the changed line inhost_max_wave, so the unpinned path is covered mainly by readingtold_lanesOne thing that does change with the switches unset (READ IN CODE).
clear_rtv,clear_dsvandresolvenow always callwith_state(this, |_, state| state.targets_written()). In a diagnostics build that is one more state lock, atick()and onecopystat"list call" for each clear and resolve, whatever the switch says. The recorded host commands are unchanged, but the "list calls per frame" figure of a diagnostics run moves a little againstmain. Agroups::waits()check before it would keep the unset path as it was.Switch values. READ IN CODE, and the PR's own
the_switch_is_off_unless_it_is_a_numbercovers the first row.LEONIDA_TARGET_BARRIERSu8masked to its low two bits, trimmed7acts as3,4and256as off; a log line says what the value was taken asLEONIDA_LIST_TWIN_MOVE0(switch::on)falseoroffturns it on; that is the crate's conventionLEONIDA_HOST_WAVE321true,yesor1leave it off and print nothing, since the log line only comes when it is onWith
LEONIDA_ABnamingLEONIDA_TARGET_BARRIERS, the AB bit wins and alternates 3 and 0. A value such asLEONIDA_TARGET_BARRIERS=1set alongside it is then ignored, with no log line. That matters for the A/B plan, which suggests trying1and2on their own after3.Overlap with #3136.
git merge-treeof the two heads conflicts inleonida-gpu/src/list.rs. #3136 giveswith_statean op-name argument, and this PR adds new two-argumentwith_statecalls (targets_written,wait). Whichever lands second needs a rebase, and its newwith_statecalls need the op name.Not checked: any AMD card, so the two AMD-only switches did nothing here; an in-game run (the collaborator's gate above still stands); the ignored raw-twin readbacks beyond their prerequisite; the frame-time cost of bit 2.
GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:01:12Z.
Triage of head
01df1490c(merge base5b1fff821, 3 commits behind;git merge-treeagainst currentmain45dc41f95: no conflicts).11 files (+1,703/-47), mostly new
list/groups.rs(+1,110), all behind opt-in switches.CI green on the head (6 checks).
Existing verification: Verified by @fiestorra, @merzleckeier (RADV and RTX under Wine), @Tauwni (native RDNA 4 RX 9060 XT) and @Kal0s-design on
0386100f0with the debug layer. The current head01df1490cis a merge ofmainplus a regeneratedswitches.md; the PR's own diff is unchanged.This check: Not re-reviewed in depth. The switches are off by default, so default behaviour is unchanged; the body states the RDNA 3/4 root cause is not proven. The size (+1,110 lines in one new file) is the main review risk; the issues it is for (#2770, #2771) still need an A/B on the reporting hardware.
I did not build it: the crate is Windows-only (or the C++ runtime's Windows build), so no red/green was run here.
Verdict: ready (opt-in only, verified on four configurations; root cause still open by design).
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-03T03:34:31Z.
Merged
origin/main(516c9eaabf) intoc60eaf13dfstrictly to regenerated3d12/docs/switches.md(needs rebase); all 10 Rust files (descriptor.rs,descriptor/host.rs,draw.rs,listed_raw_tests.rs,host/place.rs,list.rs,list/groups.rs,list/thin.rs,emit/lower.rs, andemit/mod.rs) preserve 100% identical+/-changes againstorigin/maincompared to01df1490c4.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T04:29:41Z.
RUN (in game, one pull request), its head merged with
git merge --no-ffonto main516c9eaab: #2834c60eaf13d. 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 pull request, on the head above. If it 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. It was run alone because it does not merge together with #2789 and #3072. Its switches are opt-in and target RDNA; they were left off on this NVIDIA card, so this run covers the default path only. The precompile before the world took 528 s against about 155 s for the batches before it: something in this head changes pipelines and leaves the cache cold (cause not looked into).AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-03T11:25:01Z.
Merged
origin/main(6e97990505,#3318) into6a0a20c7f1strictly to regenerated3d12/docs/switches.md(needs rebase); all 10 Rust files have byte-identical diffs againstorigin/maincompared toc60eaf13df.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
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.