Repository navigation
Conversation
|
Native Windows check of
Not covered: a run with AI-assisted: yes |
bd01148 to
5122c6a
Compare
|
Thanks — that closes the two things I could not check here: the three The conflict you flagged is handled: rebased onto Agreed on the last point: the one number I have for the title with the variable set is a Wine run (7,000 MB on an RTX 3060 Ti 8 GB, no Xid). A native Windows run is the case the variable was written for, if you or anyone can try it. |
f49a9eb to
cba289a
Compare
|
The code is fine and its test passes; the docs table is what conflicts, and the branch is carrying commits Measured on And the tree pieces:
The code, applied on its own to So What I could not verify: the part of the comment that matters most - "set above what the card has free, allocations fail rather than move to the PC's memory" - needs a title allocating against a constrained budget, which needs the game. I did test that shape once from the outside ( AI-assisted: yes - DeepSeek v4.1 (flash), which applied the code alone after the full cherry-pick conflicted. Written with an AI assistant. |
cba289a to
94c3507
Compare
|
Thanks for the trace. The conflict is the generated page, and that is the only thing in this branch that moves: Rebased onto One correction on the merge base: On what you could not verify: yes, that is the gap. |
|
finding: this now conflicts with The merge is #2589 ( So this needs one rebase and the two conflicts are probably in different functions: What I verified before the conflict, so it is on record ( And what I could not: "set above what the card has free, allocations fail rather than move to the PC's memory" needs a title allocating, which needs the game. AI-assisted: yes - DeepSeek v4.1 (flash), which re-checked after a merge to that file. Written with an AI assistant. |
KelboLive
left a comment
There was a problem hiding this comment.
Verified on this machine (RTX 4070 Ti SUPER, 621.01): system own budget 15,293 MB; with LEONIDA_VRAM_BUDGET_MB=7000 the runtime's Host::video_memory()[0] is 7000 while the system query and video_memory_groups stay 15,293; 256 gives 256, 20000 gives 20000, and 0/abc keep 15,293. It lands only in the runtime accessor (host.rs:13645-13665) — no SetVideoMemoryReservation — so Windows still enforces its own budget, which is the right shape for a Wine/Proton measure. 590/0 lib tests, switches --check clean.
Three things:
- The wiring is untested: ignoring the fixed value in
video_memory(fixed.unwrap_or(own.Budget)->own.Budget) leaves all 590 tests green; only the parser is covered. A smalleffective_budget(own, setting)helper tested directly would fix that without fighting the process-globalOnceLock. - Warn when
fixed > own.Budget. Both numbers are in hand at the first call; on Windows the runtime's own guards will then allow over-commit, androom's comment records that paging past the budget ended runs 20/24. Clamping would defeat the Wine use — a warning is the right compromise. - Say what happens below the current usage. With
fixed < own.CurrentUsagethe card is permanently over budget:vram_keepevicts,room(with no texture budget) refuses, and ifLEONIDA_TEXTURE_BUDGET_MBis also set,roomallows exactly whatvram_keepthen evicts — a make/evict churn. The docs sentence should also say this is a Wine/Proton measure rather than a Windows tuning knob.
Cosmetic: the F1 panel and the memory line now read the fixed budget while the "as the system counts it" line shows the real one, so a 7,000 MB budget on a 15,293 MB card reads oddly; the one-time log helps, but a note in the panel would too.
…f the system's Host::video_memory hands every decision on the card's memory (the texture queue's room, the card copies of title buffers, the staging per frame) the budget LEONIDA_VRAM_BUDGET_MB names, in MB from 256 up, instead of the one DXGI reports; unset, empty or not a number of MB: the system's, as before. The log says it once, with the system's budget beside it. Under Wine the system's budget is what Vulkan reports as left to the process, and above what the card has free the NVIDIA driver fails allocations rather than moving memory to the PC's. Tested: resource::tests::a_fixed_card_budget_is_a_size_in_mb (failing before, passing after) and the resource tests, as Windows executables under Wine 11.21 (cargo xwin test); the leonida-gpu suite gives 568 passed and 3 failed, the same three watch:: tests that fail under Wine on main without this change. A run with 7000 on an RTX 3060 Ti (NVIDIA 620.73, GE-Proton11-14): no Xid, the card held about 600 MB more. Rebased onto main at 90c5144; the only conflict was d3d12/docs/switches.md, which is generated, so it is regenerated (tools/d3d12_switches.py --check passes). It carries what main changed in the page since it was last made too: LEONIDA_WC_SUBRANGE_NO_BACK, and the source cells of LEONIDA_TAKE_BLOCKS and LEONIDA_WC_NO_BACK. AI-assisted (Claude Code). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
94c3507 to
87f812f
Compare
…ns above the system's From the review of ProjectLeonida#2765 (KelboLive): the setting's wiring was not covered, since replacing the choice in `Host::video_memory` with the system's budget left every test green; above the system's budget the runtime's own guards then allow more than the system gives, which on Windows ended runs 20 and 24; and the doc sentence said nothing of what happens below what the card has in use. The choice is now `resource::effective_budget(system, setting)`, a function of its own, tested by `a_fixed_card_budget_wins_over_the_systems_and_the_system_otherwise`: 7,000, 20,000 and 256 MB over 15,293 MB as the system reports an RTX 4070 Ti SUPER, and the system's for unset, empty, "7 GB" and 0. The environment is read once and in one place (`resource::card_budget_setting`), so the log, the choice and the panel see the same answer; the once-only log moves to a `std::sync::Once` and the setting is parsed per call rather than cached. Above the system's budget the one-time log adds a warning with both numbers. Clamping would defeat the Wine use the setting is for, so it says so and goes on. The doc sentence now says what the setting is for: a measure for Wine and Proton rather than a knob for Windows, and below what the card has in use it keeps the card over budget, the copies the keep rule evicts being made again as fast as the texture budget lets them be. switches.md regenerated for it (`tools/d3d12_switches.py --check` passes): the row carries the whole comment now, the Wine/Proton framing included. The F1 panel's VRAM line marks a fixed budget (`FIXED`), so a 7,000 MB budget on a 15,293 MB card does not read as the card's own beside the log's "as the system counts it". Tested under Wine 11.21 on the machine of ProjectLeonida#2765 (RTX 3060 Ti, NVIDIA 620.73.4), against main at 653f60d: `cargo xwin test -p leonida-gpu --target x86_64-pc-windows-msvc` gives 601 passed, the same three `watch::` failures as before and 57 ignored; `resource::` alone, 23 passed. With the choice mutated to ignore the setting the new test fails (16,035,872,768 bytes against 7,340,032,000), so the wiring it covers is the one `video_memory` takes. `cargo xwin check -p leonida-gpu --features diagnostics --target x86_64-pc-windows-msvc` compiles the panel's line. AI-assisted (Claude Code). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
|
Point 3, measured below the current usage: the ceiling holds and nothing faults.
Never above 4 000 MB, no What replaces an allocation past the ceiling, at the same spot:
Unrelated to this switch: |
…ns above the system's From the review of ProjectLeonida#2765 (KelboLive): the setting's wiring was not covered, since replacing the choice in `Host::video_memory` with the system's budget left every test green; above the system's budget the runtime's own guards then allow more than the system gives, which on Windows ended runs 20 and 24; and the doc sentence said nothing of what happens below what the card has in use. The choice is now `resource::effective_budget(system, setting)`, a function of its own, tested by `a_fixed_card_budget_wins_over_the_systems_and_the_system_otherwise`: 7,000, 20,000 and 256 MB over 15,293 MB as the system reports an RTX 4070 Ti SUPER, and the system's for unset, empty, "7 GB" and 0. The environment is read once and in one place (`resource::card_budget_setting`), so the log, the choice and the panel see the same answer; the once-only log moves to a `std::sync::Once` and the setting is parsed per call rather than cached. Above the system's budget the one-time log adds a warning with both numbers. Clamping would defeat the Wine use the setting is for, so it says so and goes on. The doc sentence now says what the setting is for: a measure for Wine and Proton rather than a knob for Windows, and below what the card has in use it keeps the card over budget, the copies the keep rule evicts being made again as fast as the texture budget lets them be. switches.md regenerated for it (`tools/d3d12_switches.py --check` passes): the row carries the whole comment now, the Wine/Proton framing included. The F1 panel's VRAM line marks a fixed budget (`FIXED`), so a 7,000 MB budget on a 15,293 MB card does not read as the card's own beside the log's "as the system counts it". Tested under Wine 11.21 on the machine of ProjectLeonida#2765 (RTX 3060 Ti, NVIDIA 620.73.4), against main at 653f60d: `cargo xwin test -p leonida-gpu --target x86_64-pc-windows-msvc` gives 601 passed, the same three `watch::` failures as before and 57 ignored; `resource::` alone, 23 passed. With the choice mutated to ignore the setting the new test fails (16,035,872,768 bytes against 7,340,032,000), so the wiring it covers is the one `video_memory` takes. `cargo xwin check -p leonida-gpu --features diagnostics --target x86_64-pc-windows-msvc` compiles the panel's line. AI-assisted (Claude Code). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
87f812f to
f0aa16a
Compare
|
For the record: at 89% of the card's own budget the picture loses the avatar's head. Seen in the run that checked the pipeline-worker supervisor, whose build comes from The avatar stands headless, its eyes and teeth floating above the collar, while the panel read
So this is not evidence that the switch makes the picture wrong - it was not in that build. What it does say is that a card held at its ceiling already drops something the title needs, and the frame shows it, so the switch is worth documenting as costing pixels as well as frame rate, with Not attributed yet: a texture that could not be made resident, or a mesh path with |
What and why
Under Wine or Proton the budget DXGI reports for the card is what Vulkan reports as left to the process,
not what the card has free, and above the card's free memory NVIDIA's driver fails allocations instead of
moving them to the PC's memory as Windows does (GPU faults, Xid).
LEONIDA_VRAM_BUDGET_MBsets the budgetthe runtime works to instead:
Host::video_memoryhands it to every decision on the card's memory (thetexture queue's room, the card copies of title buffers, the staging per frame). Unset, empty or not a
number of MB: the system's, as before. The log says it once, with the system's budget beside it.
Tests
cargo xwin test -p leonida-gpu --target x86_64-pc-windows-msvcunder Wine 11.21, RTX 3060 Ti(NVIDIA 620.73.4): 569 passed, 3 failed, 52 ignored. The resource tests are 21/21, including
resource::tests::a_fixed_card_budget_is_a_size_in_mb(failing before, passing after) andresource::tests::texture_floor_scales_with_vram_budget. The three failures arewatch::(
holes_are_known_until_the_runtime_tells,no_mapping_is_lost_between_askers,what_is_left_alone_is_no_known_hole), the ones that fail under Wine onmainwithout this change.LEONIDA_VRAM_BUDGET_MB=7000on an RTX 3060 Ti 8 GB (NVIDIA 620.73.4, GE-Proton11-14): noXid, the card held about 600 MB more.
d3d12/docs/switches.mdregenerated withtools/d3d12_switches.py;--checkpasses. The page alsolists the three names
mainadded since it was last made (LEONIDA_CAPTURE_SHOWN,LEONIDA_FG_RESET_STALE,LEONIDA_TIMELINE_STALL_MS).Notes
Rebased onto
mainat35e75b7a9; no other change. Independent of the Linux launcher work: nothing heretouches
scripts/, and the variable is read where the card's budget is decided, so the two merge in eitherorder.
Item:
LEONIDA-GPU-VRAM-BUDGET-MB, claimed in#2570.
AI-assisted (Claude Code).