Repository navigation
Conversation
|
Readback of the complete synthetic output table after apply_all at 6b4f772 + 0ff8a53. The Win64 fixture uses the real patch planner and write routine on a private synthetic mapping under Wine 11.22.
The refresh and flag fields stayed intact and the scanout reservation matched the requested size in all cases. Corrupting the expected bytes for the final planned write rejected the group before modifying any earlier entry. The same readback assertion fails on main and passes on the PR. This covers the table update and preflight; actual mode selection by the title was outside the fixture. MEASURED with synthetic inputs. AI-assisted (Codex). |
|
Verified on native Windows 11 (MSVC target, rustc 1.98.1), since the runs in the description are under Wine. Head
The new test catches the change:
Not checked: the game itself, and what the title does with several identical rows after capping (for example 1280x720 turns the three rows above it into 1280x720 too). GPUs tested: n/a (CPU unit tests only). AI-assisted: yes (Claude Code). |
KelboLive
left a comment
There was a problem hiding this comment.
The logic is right: width < row_w || height < row_h (hooks.rs:171) is exactly "either dimension exceeds the request", and since scanout_pool_bytes is monotone in both dimensions, no selectable row can then need a bigger pool than the reservation. apply_all preflights the added rows before any write (:478-493), so a mismatched lower-row byte refuses the whole change as documented, and exact-limit rows are untouched. The <= mutation fails the new test at hooks.rs:604 (5 vs 4), so the boundary is covered; 85/85 lib tests, and the merges with #2890/#2891 are clean.
Two nits:
docs/ultrawide.md:130-132still saysLEONIDA_OUTPUTchanges "the first three together" — it now changes up to six rows. Update it in this PR.- At 1280x720 the three lower rows all become 1280x720 (five identical modes), which is intended but not exercised: the live gate only covers 1920x1080. A 720p or 1600x900 smoke run, or a sentence that duplicate rows are expected, would close the remaining gap.
CI is red only on unrelated Python tool tests (files that moved after this PR's base); a rebase onto current main should clear it. Note the retail-bytes test passed vacuously here (LEONIDA_GAME_DIR unset), so the six byte sites are still only validated on a machine with the 1.0.2.1 executable.
|
CI diagnosis for the dependency discussion on #2958. The failed Windows check and Linux Python job both annotated the same five Python files in run 46681212676. The base commit 0ff8a53 had its own failed push run (46678721362): both jobs already reported test_wave_diff.py, test_wave_trace.py, test_x64_recomp.py and test_x64_recomp_qemu_runner.py there. The fifth file, test_piecewise_parse.py, was only annotated on the PR run. The Linux log shows its code-object comparison failing for scripts/run_gpu_tests.py. I checked the actual CI merge commit 24d9f64 against its first parent: only d3d12/crates/leonida-loader/src/hooks.rs changed, so the Python test and script are identical. This establishes four pre-existing failures; the fifth remains unexplained. A fresh CI run after updating the base would give a current verdict. Base run · PR run. Codex-assisted. |
|
Follow-up: I reproduced the fifth failure on the base alone (0ff8a53), with Windows CPython 3.12.10 and PYTHONHASHSEED=0. For scripts/run_gpu_tests.py, the piece sizes 1, 40 and 300 all failed the code_facts comparison. An equal frozenset constant had a different repr iteration order. Normalizing only the frozenset representation made all three comparisons pass, including the bytecode and line-position fields. Both historical Linux CI runs used CPython 3.12.16. Main already contains the corresponding normalization in 9b7674d. This accounts for the previously unexplained failure without the loader change. A new hosted run is still needed for current CI status. Codex-assisted. Local integration check: PR head 6b4f772 merged cleanly into main 5b03c68 (tree 29a8f1b82). I ran all five previously failing suites on Windows with CPython 3.12.10. The parser, wave diff, wave trace and QEMU-runner wrapper passed all 53 tests. The x64 recompiler suite passed 15, with 34 skipped because qemu-system-aarch64 was unavailable. Total: 68 passed, 34 skipped, zero failures. This is a local result; the hosted check still needs a fresh run. |
Claimed in the coordination issue as:
D3D12-LOADER-OUTPUT-1440-CAP.What and why
When
LEONIDA_OUTPUTasks for an output size smaller than intermediate rows of the title's mode table (2560x1440,1920x1080,1664x936, documented indocs/ultrawide.mdat.rdata0x615c0c0..=0x615c100), also cap every lower mode-table row larger than(width, height)ind3d12/crates/leonida-loader/src/hooks.rs.output_patches(width, height)previously patched only the3840x2160mode row (OUTPUT_ROW = 0x615c100), the scanout pool reservation (SCANOUT_RESERVATION), and the Settings viewport (SETTINGS_VIEWPORT). WheneverLEONIDA_OUTPUTasked for a size smaller than2560x1440(down toparse_output's1280x720minimum, e.g.1920x1080,2560x1080,1664x936,1600x900,1280x720),scanout_pool_bytes(width, height)shrank below the larger unpatched mode rows immediately precedingOUTPUT_ROW, allowing the title to pick a larger row and overflow the smaller scanout reservation.LOWER_OUTPUT_ROWScovering all three intermediate rows (OUTPUT_ROW - 0x10 = 0x615c0f0for2560x1440,OUTPUT_ROW - 0x20 = 0x615c0e0for1920x1080,OUTPUT_ROW - 0x30 = 0x615c0d0for1664x936; the1280x720row atOUTPUT_ROW - 0x40is alreadyparse_output's minimum).OwnedPatchfor every row wherewidth < row_w || height < row_h. Outputs at or above2560x1440(2560x1440,3440x1440,3840x2160) emit the exact same 3 patches as before.the_resolution_places_are_in_the_retail_executableto checkoutput_patches(1280, 720)so all 6 patches (the 3 base patches plus all 3LOWER_OUTPUT_ROWS) are validated directly against the 1.0.2.1 executable whenLEONIDA_GAME_DIRis set.#2756(D3D12-SERIESX-FSR-MAX-SCALED, which touchesrender_scale_patches, notoutput_patches).d3d12/crates/leonida-loader/src/hooks.rs,docs/ultrawide.md) + fresh red→green unit tests + live retail-executable byte check (the_resolution_places_are_in_the_retail_executable) + MEASURED 300 s in-world game gate exercisingLEONIDA_OUTPUT=1920x1080.Tested
python3 -I scripts/check_no_game_data.py d3d12/crates/leonida-loader/src/hooks.rs→ exit 0.cargo clean -p leonida-loader --target x86_64-pc-windows-msvc)leonida-loaderunit test binary (x86_64-pc-windows-msvc) and ran under Wine:origin/main(only the new testhooks::tests::output_below_table_rows_caps_every_larger_mode_rowapplied):6b4f77222(rebased onto3e7b34a52):LEONIDA_GAME_DIRset, noSKIP:):test hooks::tests::the_resolution_places_are_in_the_retail_executable ... ok(all 6 output patches verified against 1.0.2.1 binary).test result: ok. 85 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out.6b4f77222, Series S + DLSS Quality1280×720 → 1920×1080,LEONIDA_OUTPUT=1920x1080exercising the2560x1440row cap live, Option Amods/gate_drivermode = roamloaded):310.78 sin-world after world entry at62.62 s; also passed an earlier cold-cache 310.93 s run with0errors).3,319frames after +60 s (3,427total world presents),15.89median FPS (16.22end median FPS),111.28 msp95 frame time,4.677 slongest present gap (<= 10.0 s).6,678 MiBpeak VRAM (<= 7,400 MiB),0device losses (0x887A0005),0crashes,0panics,0faults before stop,0kernelNVRM: Xiderrors.gate_drivernote:mods/gate_driverloaded inmode = roamwith0GATE FAIL; its 10 s menu-press cadence missed the brief world-entry probe window so the 310.78 s run stayed on the in-world camera cleanly at15.89FPS.GPUs tested: NVIDIA GeForce RTX 3070 Ti 8 GB, driver 620.73.04, Arch Linux (Wine 11.22 + VKD3D-Proton 3.2.0).
AI-assisted: yes (authored by Gemini 4 Neon; independent fresh review pass by a separate Gemini 4 Neon agent requested capping
< 1080prows and validating all rows inthe_resolution_places_are_in_the_retail_executable, addressed and approved in re-review).Checklist
main(3e7b34a52) and merges cleanly (a conflicting pull request is labeledneeds rebase).check_no_game_data.pyclean on both source and PR description).docs/design.md, with how it was confirmed. (n/a — loader output-mode table patch)