d3d12: render targets laid out linearly go back into title memory (black photos) #2915
Open
kurrutako wants to merge 2 commits from
upstream-pr/2915 into main
pull from: upstream-pr/2915
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!2915
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2915"
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 kurrutako on 2026-12-01T17:57:21Z.
Claimed in the coordination issue as: D3D12-LINEAR-TARGETS-BACK (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7320122810)
What and why
A title lays a render target out linearly in its memory (layout 1, or
0x100 |the linear swizzle mode) when its CPU reads what is drawn there, for example a photo it encodes to an image file from that memory. On the D3D12 runtime the host texture was the target's only picture: nothing copied it back, so the memory under it stayed zero and such photos were saved black.This PR:
resource::linear_target(linear_target_descfor the description): a 2D, single-sample texture with the render-target flag in a linear layout;texback::wantedalso take such targets, so the existing copy-back path (texback) returns them to title memory when the list closes;draw.rs(list.texture_written), so the copy-back sees draws into it;LEONIDA_TARGET_BACK_LINEAR=0to turn it off (as before).Targets in the library's own tiled layouts, MSAA targets and textures without the target flag are unchanged.
Tested
Played on Windows 11, RTX 5070 12 GB, NVIDIA 621.01. D3D12 runtime, diag build, Series X profile.
cargo test -p leonida-gpu --lib: 634 passed (new testresource::tests::only_linear_render_targets_go_back).cargo clippy -p leonida-gpu --all-targets -- -D warnings: nothing in the changed lines (the four lints it reports are inmainalready:host.rs,pipeline/host.rs,pipeline/known.rs).python -I scripts/check_no_game_data.pyon the three files: clean.GPUs tested: NVIDIA GeForce RTX 5070 12 GB, driver 621.01, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code)
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T18:17:31Z.
Independent GPU readback of synthetic linear render targets at
8c8ae9b4+7fbdf851. I built the same 64×16 RGBA8 fixture on each tree. It registers the render-target state, performs a real D3D12 clear, callsHostList::texture_written, closes and submits the list, and checks CPU backing after synchronous landing (LEONIDA_TEXBACK_ASYNC=0).With the PR’s default setting, both linear layouts (
0x1and0x100) returned all 1,024 red RGBA pixels on both Radeon RADV (Mesa 26.3.1) and GeForce RTX 4070 SUPER (620.73.04), using Wine 11.22 / VKD3D-Proton 3.1.0. Main and the PR withLEONIDA_TARGET_BACK_LINEAR=0both retained zero-filled CPU backing. Layout0x0retained zero-filled backing in every run. The existing texture-back test selection passed all eight on main and all nine on the PR, including the new eligibility test.The fixture covers selection and the production close, copy, and landing path after explicit write registration. MEASURED with synthetic textures. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T18:46:07Z.
Review: COMMENTED
Tested
8c8ae9b4: 634 lib tests pass including the new predicate test, forcing theRENDER_TARGETguard makes it fail, clippy keeps only the four pre-existing warnings, andmerge-treeagainst current main is clean. The hook is right: targets are!fills(resource.rs:1884-1888), so the host copy is the only picture, and close-time registration (draw.rs:3063→host.rs:8878,:9295) runs after the list's resolves with oneback_wantedentry per owner, so there is no double copy.Two scope issues:
linear_target_descacceptsmip_levels > 1/depth_or_array_size > 1(resource.rs:3959), whiletexture_writtenmarks every subresource (host.rs:9265,texback.rs:164) and non-copy tickets write the whole allocation (texback.rs:496-500). For a mip chain or array, that copies back mips/slices no draw touched, from a host copy that was never uploaded (targets are!fills). Please restrict it to the RTV's subresource, or at least single-mip/single-slice.ResolveSubresourceis still uncovered.texture_copiedis gated ontitle_written(texture.rs:1290-1294), which is false when the target flag is set, so an MSAA→linear-photo resolve stays black. Is the measured photo path a direct draw? A synthetic resolve fixture would settle it — and would also cover the case where an earlier list's whole-target copy-back lands pre-resolve pixels.Minor:
texback.rs:71is over rustfmt width.The in-tree test only checks the predicate plumbing — not
wanted(), the toggle, or the copy/land path — so the end-to-end claim still rests on the author's and the independent commenter's runs. No conflict with current main;resource.rsoverlaps #2908/#2765/#2658 only outside these hunks.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:26:03Z.
Asynchronous linear target readback with a held writer at
8c8ae9b4on60f7dcd9. I cleared a synthetic 64×16 RGBA8 D3D12 render target to red, explicitly registered the write withHostList::texture_written, and submitted throughexecute_sync_internal. The test held the productiontexture read-backsworker immediately before the CPU write. On both an RTX 4070 SUPER and Radeon RADV (Wine 11.22 / VKD3D-Proton 3.1.0), submission returned while the worker was held and CPU backing was still zero. After release both linear layouts (0x1and0x100) returned all 1,024 red pixels. Synchronous mode returned the same pixels on the submitting thread.Main and the PR with
LEONIDA_TARGET_BACK_LINEAR=0both retained zero backing for these targets. Nonlinear0x0stayed zero in all eight hardware runs. Focused existing tests passed 8/8 on main and 9/9 on the PR per GPU. The later main update93ffc482changes the launcher and its test in this merged tree.This covers explicitly registered single-subresource targets. The multi-subresource and resolve-only cases raised in review were outside this fixture. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:37:50Z.
Two linear-target edge cases reproduced on hardware at
8c8ae9b4on93ffc482, with synchronous landing. I compared main, the PR with linear readback on, and the same PR withLEONIDA_TARGET_BACK_LINEAR=0on an RTX 4070 SUPER (620.73.4) and Radeon RADV (26.3.1), using Wine 11.22 / VKD3D-Proton 3.1.0.ResolveSubresourceentry resolved a green 4× MSAA source into a linear single-sample target. An independent host readback found 1,024/1,024 green pixels in each of 24 resolves (both layouts, both GPUs, all three arms, with and without a separate earlier red clear). CPU backing had zero green pixels in all 24. With the PR on and a previously registered red clear, it retained all 1,024 red pixels. Fresh backing and the other controls retained zero-filled pixels.0x1,0x100) gave the same result.MEASURED with synthetic textures. The array fixture explicitly registers the write and the resolve fixture uses the console resolve entry directly. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-12-01T19:51:01Z.
Thanks @KelboLive, and @merzleckeier for the hardware runs (the two-mip/two-slice one shows exactly the problem in point 1). Pushed
58e8535c:linear_target_descnow also requiresmip_levels == 1anddepth_or_array_size == 1, so a mip chain or an array is never copied back from host subresources no draw touched. The test covers both cases.resolve(list.rs) now also callstexture_copied(dst, Some(dst_sub))for a linear target whentargets_back()is on, as it already did for textures the title fills. The measured photo path is a direct draw: thedraw.rshook is what made the in-game photos come out. This covers the resolve case too.texback.rs:71is wrapped to rustfmt width.cargo test -p leonida-gpu --lib: 634 passed. clippy reports only the pre-existing warnings.check_no_game_data.pyon the changed files is clean, and the branch merges cleanly with currentmain. Not re-run in game after this push. The resolve change is covered only by the reasoning above, not by a fixture of mine.AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T20:00:59Z.
Hardware recheck of the single-subresource and resolve update at
58e8535con99a29d10. Compared main, prior head8c8ae9b4, and the updated head on RTX 4070 SUPER and Radeon RADV (Wine 11.22 / VKD3D-Proton 3.1.0).LEONIDA_TARGET_BACK_LINEARorLEONIDA_COPY_BACKstill left the GPU resolve intact and suppressed CPU landing.All 10 synchronous matrix runs passed both diagnostics. Existing focused tests passed 8 on main and 9 on each PR head per GPU. MEASURED with synthetic textures and an instrumented async writer. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-02T00:07:50Z.
Independent native Windows 11 + RTX 3090 verification (
VERIFY-2915-RTX3090, claimed in #2570): PASS58e8535cfmerged cleanly ontomain913b88b90(diagnostics,mimalloc,exe_sha16:1ebc71ceabfb0417).610.88).python -I scripts/check_no_game_data.pypassed on all changed files.cargo test -p leonida-gpu --locked -- only_linear_render_targets_go_back --test-threads=1):913b88b90with PR test overlaid: compile failure (linear_target_descmissing).--features diagnostics): 1 passed, 0 failed in both configurations.scripts/game-gate.ps1, Series X 1080–1440p,-NoFrameGen, upgraded 8-leg sprint/wide-turn/jumpgate_driver+LEONIDA_GAME_ACTIONS_RUN="150:time 23"):PASS(reasons=[],warnings=[],exit=clean,stop=target,cache_saved=true,GATE CONTROLfired withmoved=2.54 m, maxfrom_control_m=9.2 m,time 23confirmed PASS).world_s=304.2s,world+60s, 4,808 presents, 6,537 median draws):20.03 FPSmedian,15.54 FPSp5,64.37 msp95 frame time,0.430 slongest present gap,0missed pipeline waits,31,218 MBmax private memory,250 MBmin commit left,12,033 MBmax VRAM (0 sover budget).AI-assisted: yes (Gemini 4 Neon orchestrator; Codex GPT-6.2 Astra build, unit tests, and serialized RTX 3090 gate execution).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:31:17Z.
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-02T13:55:30Z.
Ran natively on Windows 11, head
58e8535cfmerged into currentmain(128648cfe, clean merge). Earlier runs here were under Wine or were the in-game gate, so this one covers formats, row pitch and the end of a mapping on a native driver, with a throwaway test (not committed).cargo test -p leonida-gpu --lib --locked: 692 passed, 0 failed.only_linear_render_targets_go_backpasses. clippy on the merge reports one lint (host.rs:7633, unusedmut), andmainalone reports the same one, so nothing comes from this PR.Fixture. A title texture is created at an address inside committed memory, placed so it ends exactly at the end of the committed region with a no-access page right after it. Title memory is filled with
0xCDfirst. The host copy is filled with a different byte pattern per texel throughCopyTextureRegion. Thenensure_state(RENDER_TARGET),texture_written, close,execute_sync_internal, withLEONIDA_TEXBACK_ASYNC=0. I compared every texel atLayout::offsetand checked that bytes outside the texels (row padding, and memory before and after the texture) still hold0xCD. Layouts0x100and1gave identical results everywhere. Every case below ran on the NVIDIA card and on WARP. OnmainI ran the same fixture, wheretexture_writtendoesn't take these targets.Formats that match the host copy: all correct.
mainThe console's linear row pitch matched the copyable-footprint pitch in every case (both rounded up to 256 bytes), so the tiler never had to deal with a pitch mismatch. Writing the last byte of a texture that ends right at a no-access page did not fault. With
LEONIDA_TARGET_BACK_LINEAR=0(NVIDIA card, 33x7 and 64x16 sizes), every texel stayed0xCD.Finding 1: targets in a stand-in format get raw host bytes.
linear_targetdoesn't checkstands_in. When the host copy uses a wider stand-in format (target_format),texback::writetiles the host rows using the console's element size with no conversion. Each console texel then gets the next N raw bytes of the host row: console texel 1 holds bytes 4..7 of host texel 0, so the left half of every host row ends up across the whole console row.On
mainthis memory was untouched. With the PR it gets those bytes, but only on hosts that use the stand-in. Adding&& !stands_in(this)tolinear_target, or converting before tiling, would avoid it. I don't know whether the title ever makes a linear target in one of these formats.Finding 2: a draw that covers part of a linear target overwrites the rest from the host copy. Host and title memory both started as above. I copied only a 32x16 box into the left half of a 64x16 target, then registered the write:
0xCDbefore)main: right half00 00 00 00(the fresh host copy)Same on both GPUs. Targets are
!fills, so anything the title's CPU wrote into the target's memory never reaches the host copy, and a non-copy ticket rewrites the whole subresource. This is the in-subresource case of the mip/slice issue fixed in58e8535c. It doesn't matter for a full-screen photo, but it would for a target the CPU pre-fills and the GPU draws only part of. I'm noting it as a limit of scope, not asking for a change.Not checked: real draws or resolves (the fixture writes the host copy by a copy), asynchronous landing, a CPU write made between submission and landing, the cost of calling
texture_writtenfor every bound target on every draw, block-compressed formats (they cannot be render targets), and anything in game.GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:21:24Z.
RUN (in game, batch of seventeen render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #311115b579756, #29485284c6eae, #26981f188c4f7, #294644bf554fe, #3001d924cbb65, #28320c861595a, #291558e8535cf, #2822d359a2f85, #2896c9c6b103d, #29838278ef1b9, #3115ba5121192, #2945d2c08c14f, #297574512d658, #295126da88e8e, #2800b6ebcedd4, #28937c7e99b48, #3113fa1460b6b(and #30970d7a451ab, merged since). 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.The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.
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. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:29:29Z.
Verification triage of #2915
Head
58e8535cfis already verified on this exact head: EdenBendheim (VERIFY-2915-RTX3090) and Kal0s-design (native Windows 11). CI passes (6/6) and the PR merges cleanly. No new run here (Windows-only). Verdict: ready (already verified on this head).AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T04:19:33Z.
VERIFY-2915 — aplica limpio, uno de sus cuatro ficheros ya está en
main, y la suite no se rompeMétodo del
AGENTS.md: cherry-pick del commit sobreorigin/main—Y el 1 es la iGPU. Pero el detalle que vale la pena: el PR tiene 4 ficheros y el cherry-pick tocó 3 —
O sea que el cambio de
list.rsllegó amainpor otra vía (es el fichero delwith_capacityque revisé en#2952esta noche, y probablemente el mismo commit de origen). El cherry-pick aplica el resto sin conflicto y descarta lo que ya está, que es exactamente lo que debe hacer.Lo que el PR hace, por su título: los render targets con disposición lineal vuelven a la memoria del título — el caso de la foto que sale negra porque el destino se quedó en un recurso propio, y
resource.rs+58 es donde vive la nueva disposición.Lo que no verifiqué: la foto negra — necesita el título y su modo foto; los 716 verdes dicen que el cambio no rompe ninguna de las pruebas existentes, ni más ni menos.
Y la consecuencia para el merge: cuando alguien lo rebase,
list.rsno aparecerá en el diff, y eso es correcto — un revisor que espere cuatro ficheros y vea tres debería saber por qué antes de sospechar de la PR.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T17:26:31Z.
In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #2915, #2896, #2893 and #2889 merged into main
09273248c; this PR tested at its current head58e8535cf. Series S 1080, DLSS FG 2x,play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s, screen kept on.AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.
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.