Repository navigation
Conversation
…gets (D3D12-SERIES-S-NATIVE-BUDGETS) Series S at render scale 1.0 (1080p, `-SeriesS -Resolution 1080`, `play-S-1080p.ps1`) stopped the title at its own breakpoint as soon as it started. The README listed it as "does not work yet". The title sizes two memory budgets per console, both for Series S' own 2/3 scale, and at 1.0 each in turn is too small: - The render-target pool, the third of nine pool sizes in the per-console table in .rdata: 1277 MiB on Series S, 2199 MiB on the others. Its allocator treats a failed allocation as fatal, and a 1 MiB one failed. - A heap counted in 64 KiB pages, `mov eax, 0x1290` then `cmovne` with 0x2c60: 297 MiB on Series S, 710 MiB on the others. A check compares a 432 MiB resource with it and stops at a breakpoint. With a pinned render scale above 2/3, resolution_levers now writes the other consoles' sizes into both places. Only Series S' row and its immediate change; the other consoles already hold such a scale. The retail-bytes test checks both places and the other consoles' pool size. RTX 3060, driver 621.40: Series S at 1080p ran five minutes into the world, rendering 1920x1080, at 11-22 fps, with no crash. Before, it stopped about 8 s in, once at each budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KelboLive
left a comment
There was a problem hiding this comment.
The two patches and the threshold line up exactly with the 1277/2199 MiB and 0x1290/0x2c60 values (hooks.rs:184-209; 1277<<20, 2199<<20, 0x129064 KiB = 297 MiB, 0x2c6064 KiB = 710 MiB), the threshold test bites (scale > 2/3 + 1e-3 → > 2/3 fails at 0.6667), and leonida-loader is 85/0 with clippy clean and a clean merge on current main.
One real gap: the budgets are applied only on the pinned LEONIDA_RENDER_SCALE path (hooks.rs:466-472). LEONIDA_RENDER_SCALE_MIN (:477-490) never calls the helper, and play-nvidia.ps1:385 maps -Lowest 1080 to RENDER_SCALE_MIN=1.0 — so on Series S that still renders at 1.0 with the 1277 MiB pool and 297 MiB transient heap, which is exactly the case README:532 says now gets the larger budgets. Please cover min > 2/3 as well, or narrow the README sentence.
Two smaller things:
- Apply the pair atomically: the two
apply()calls are independent (:466-472), so if the second byte-check fails the pool is raised alone. The file already hasapply_all(:499-513) for this. - Nothing tests the wiring: replacing
if needs_series_s_target_pool(scale)withif false && …still passes 13/13, so a refactor could silently disable the whole fix. A test that the patches land (even against a fake image buffer) would pin it.
Minor: the old game-step test's doc comment now sits above the new test (hooks.rs:712-714), leaving the game-step test undocumented; and the new test's name mentions only the target pool although it also checks the transient heap.
…and a test that they land Review of 2901667 (KelboLive): - The budgets were applied only for a pinned LEONIDA_RENDER_SCALE. -Lowest 1080 on Series S sets LEONIDA_RENDER_SCALE_MIN to 1.0, and the title renders at or above it. The minimum path now applies them too. - They are written by series_s_budgets through apply_all, so a build where one place differs keeps the console's own pair instead of a raised pool alone. - the_series_s_budgets_are_written_both_or_neither writes them into an image buffer: - both are written at 1.0 and at 0.75, and neither at 2/3 or 0.5; - neither is written when the heap's place holds other bytes. With the helper made to write nothing, it fails. - The game-step test has its doc comment back. The threshold test is named for both budgets. - The README says -Lowest is covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@KelboLive thanks, all confirmed and fixed in
Not run in the game yet: AI-assisted (Claude Code, Claude Opus 5.5). |
KelboLive
left a comment
There was a problem hiding this comment.
Re-checked at 0cbc9e93a — all four points hold. Both paths now apply the pair (hooks.rs:486 for pinned, :503 for the minimum) through apply_all, so a failed heap byte-check leaves the pool untouched; if false && fails the new test (13/1), and a non-atomic two-apply variant fails it too. The game-step doc comment is restored, the names cover both budgets, and the README sentence now names -Resolution and -Lowest. 86/86 lib tests, clippy -D warnings clean, merge-tree clean.
Two small things left, neither blocking:
- The call sites are still unpinned: replacing the
:486call withapplied += 0passes 86/86. The silent-condition failure mode is gone (each call is now one unconditional line), but a deleted call would still be invisible — a test that runsresolution_leverswith a pinned scale and checksappliedwould close it. -Lowest 720on Series S is0.6667, so the pair is skipped even though the title's dynamic resolution can still rise to1.0(hooks.rs:87-91,play-nvidia.ps1:43-45) and hit the 1277 MiB pool; the no-switch default has the same 2/3 minimum. If the intent is "anything that can reach 1.0 gets the budgets", gating on the ceiling rather than the floor would cover it. Worth a sentence in the body either way — I have not measured this in-game.
… can reach Review of 0cbc9e9 (KelboLive): - The budgets followed the lowest scale, so -Lowest 720 on Series S (LEONIDA_RENDER_SCALE_MIN=0.6667) got none. The title's own upscaler stores its minimum at 0x28f1e78 and its maximum at 0x28f1e87 as max(minimum, f()). f() at 0x1fb4300 is 1.0 on Series S and 2/3 elsewhere. So with that upscaler forced and no pinned scale, Series S may render up to 1.0 whatever the lowest. The budgets now follow the ceiling: - a pinned scale is its own ceiling; - the own upscaler with no pinned scale has a ceiling of 1.0, as with -Lowest or the F1 menu's OWN UPSCALER; - with neither, the ceiling is the lowest asked for. - The call sites are covered now. resolution_levers reads the environment (Levers::from_env), checks the build and calls apply_levers. the_levers_give_series_s_its_budgets_for_the_highest_scale_it_can_reach runs apply_levers on an image buffer for -Resolution 1080, -Lowest 1080, -Lowest 720, the own upscaler alone, pinned 2/3, a pinned scale over a lowest one, and FSR alone. It fails when the budgets are dropped from apply_levers, and with the old floor rule. cargo test -p leonida-loader --lib: 87 passed. cargo clippy -p leonida-loader --all-targets -- -D warnings: clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@KelboLive both taken, in 2. Ceiling, not floor: you were right. I read the title's own upscaler:
So with that upscaler forced and no pinned scale, Series S may render up to 1.0 whatever
Pinned at 2/3 or below still gets none. The README says this now. 1. Call sites:
Two variants fail it (14 passed, 1 failed): one drops the budgets from
In the game: AI-assisted (Claude Code, Claude Opus 5.5). |
|
Independent Series S loader and threshold check at I also compiled the exact MEASURED with synthetic inputs. AI-assisted (Codex). |
VERIFY-2900 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), Wine 11.21, no GPU device, no game filesVerdict: PASS. The two patched budgets encode exactly the sizes the README and the code comments claim, the pair is applied all-or-nothing, and the pull request's three new tests pass with nothing else broken. What I could not check is the part that needs the retail image: that the patched bytes are at the offsets the patch says. Head 1. What it changesThe title sizes two of its memory pools per console. On Series S they are smaller than on the other consoles (a render-target pool of 1277 MiB against 2199, and a heap of 64 KiB pages of 297 MiB against 710), which a render scale above Series S' own 2/3 outgrows: the first allocation that does not fit stops the title at its own breakpoint as soon as it starts. The pull request patches both sizes to the other consoles' when the highest scale the title can render at is above 2/3. The two patches are: const SERIES_S_TARGET_POOL: Patch<'static> = Patch {
rva: 0x6186268,
expect: &[0x00, 0x00, 0xD0, 0x4F, 0x00, 0x00, 0x00, 0x00], // 1277 MiB
new: &[0x00, 0x00, 0x70, 0x89, 0x00, 0x00, 0x00, 0x00], // 2199 MiB
};
const SERIES_S_TRANSIENT_HEAP: Patch<'static> = Patch {
rva: 0x1d488ac,
expect: &[0xB8, 0x90, 0x12, 0x00, 0x00], // mov eax, 0x1290 (297 MiB)
new: &[0xB8, 0x60, 0x2C, 0x00, 0x00], // mov eax, 0x2c60 (710 MiB)
};2. The bytes say what the documentation saysI decoded both patches and checked them against the numbers in the README and in the code's own comments:
The 3. The pair is applied all or neitherThe code comment promises "both budgets or neither, so a build where one place differs keeps the console's own pair". That holds, and it is /// Applies `patches` if every one of them finds its bytes, and none of them otherwise.
unsafe fn apply_all(base: usize, patches: &[OwnedPatch]) -> usize {
if let Some(missing) = patches.iter().find(|p| !there(p)) {
tracing::warn!(what = missing.what, "hooks skipped, all that go with it too: ...");
return 0;
}
...
}So a build where the bytes at one of the two offsets are not the expected ones gets neither patch — the console keeps its own pair — and the pull request's new test 4. The scale that decidesfn needs_series_s_larger(scale: f32) -> bool { scale > 2.0 / 3.0 + 1e-3 }and the ceiling comes from let ceiling = pinned_scale.or_else(|| own.then_some(1.0)).or(lowest);I checked the one that looked wrong: One small mismatch remains: the README says "whenever Series S can render above 2/3", while the code needs 5. Red and green, run under Wine
The red side (the merge base with only this pull request's test changes) does not compile: the new tests call
So nothing that worked before is broken, and the three new tests pass. 6. What I did not check
AI-assisted: MiniMax M3.1 Flash. |
…sandth above 2/3 Review of de550f7 (imShangLi): - The comment called the pool "the third" of the row at 0x6186250, while the patch is 0x18 further on, which reads as the fourth. Each row is an 8-byte header followed by its nine sizes from +8 (the copy reads [row + 0x8]), so 0x6186268 is the third size. The comment says so now. - The README said "above 2/3"; the code wants more than 2/3 + 0.001, so that Series S' own 2/3 (0.6667) keeps the console's budgets. The README says that now. No code change. cargo test -p leonida-loader --lib hooks: 15 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@imShangLi thanks for the independent run. Both points are documentation, and both are fixed in
On the offsets against the retail image: AI-assisted (Claude Code, Claude Opus 5.5). |
|
Series S budget check with the updated DLSS launcher on
The full hooks selection reported 16 passes under Wine 11.22, including the combined fixture and one explicitly skipped retail-only case. This checks launcher handoff and synthetic budget selection. MEASURED with synthetic inputs. AI-assisted (Codex). |
Claimed in the coordination issue as: D3D12-SERIES-S-NATIVE-BUDGETS (#2570 (comment))
What and why
Series S at render scale 1.0 (1080p rendered:
-SeriesS -Resolution 1080, ord3d12/scripts/play-S-1080p.ps1) stopped the title at its own breakpoint as soon as it started.d3d12/README.mdlisted it as "does not work yet", on an RTX 5070 and an RTX 2080. Here, on an RTX 3060, the same happened at every start.The title sizes two memory budgets per console, both for Series S' own 2/3 scale, and at 1.0 each in turn is too small:
.rdata, copied at start. The third is the pool the render targets are allocated from: 1277 MiB on Series S, 2199 MiB on the other consoles. At 1.0 a 1 MiB allocation from it failed at the first pipelines. That allocator treats a failure as fatal, so the title stopped at its breakpoint.mov eax, 0x1290then acmovnewith 0x2c60 gives 297 MiB on Series S, 710 MiB on the others. With the pool above large enough, the next start stopped at a check that compares a resource's size (432 MiB) with this heap and breaks when it is larger.Whenever the highest scale the title can render at is above 2/3, the loader now writes the other consoles' sizes into both places, both or neither (
series_s_budgetsthroughapply_all,SERIES_S_LARGERinleonida-loader/src/hooks.rs). The ceiling:LEONIDA_RENDER_SCALE, which-Resolutionsets) is its own ceiling.-Lowest, or the F1 menu's OWN UPSCALER) has a ceiling of 1.0. Its maximum ismax(minimum, f()), andf()(at 0x1fb4300) is 1.0 on Series S, so it may rise to 1.0 whatever the lowest.The changes:
Tested
cargo test --locked -p leonida-loader --libwithLEONIDA_GAME_DIRset to the 1.0.2.1 copy: 87 passed.cargo clippy -p leonida-loader --all-targets -- -D warnings: clean.the_resolution_places_are_in_the_retail_executablenow also checks both Series S places and the other consoles' pool size in the retail bytes.only_a_scale_above_series_s_own_grows_its_budgetschecks the threshold and both sizes.the_series_s_budgets_are_written_both_or_neitherwrites them into an image buffer. Both land at 1.0 and 0.75, neither at 2/3 or 0.5, and neither when one place holds other bytes. With the helper made to return early, it fails.the_levers_give_series_s_its_budgets_for_the_highest_scale_it_can_reachrunsapply_levers(whatresolution_leverscalls after its checks) on an image buffer. The cases:-Resolution 1080,-Lowest 1080,-Lowest 720, the own upscaler alone, pinned 2/3, a pinned scale over a lowest one, and FSR alone. It fails when the budgets are dropped fromapply_levers, and with a floor rule in place of the ceiling.scripts\play-d3d12.ps1 -Game <copy> -SeriesS -Resolution 1080 -FsrFrameGen -Fullscreen -Log, three starts on the same save:ERRORline in the log. The log shows both patches ashook applied.scripts\play-d3d12.ps1 -Game <copy> -SeriesS -Lowest 1080 -FsrFrameGen -Fullscreen -Log(LEONIDA_RENDER_SCALE_MIN=1), after the-Lowestpath was added: the log shows both patches ashook appliednext to the lowest scale, and the title rendered 1920x1080. It ran 98 s until it was closed, with no crash and noERRORline, past the point where it stopped before. That start was short and mostly loading, so the five-minute world run above is the-Resolution 1080one.-Lowest 720, covered by the ceiling rule since, has not been run in the game.scripts/check_no_game_data.pyon the changed files: clean.GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 621.40, Windows 11 Pro (build 26300); Ryzen 5 5600GT, 16 GB RAM
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code