[pr-fix][memory] DARNER_PORT_CONSTANTS: the F1 row shows not set as AUTO and offers OFF; help, README and comments match the code #414
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/fix/port-constants-menu-row"
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?
What it changes
The F1 row. ADVANCED > CONSTANTS HEAP IN PLACE had two values: not set, shown as OFF, and
1, shown as ON. Not set is not off: the card side (port.rsresolve_port_mode) is on when the variable is not set, except on Ampere cards. And the menu could not write0, the one value both halves read as off. The row is now AUTO (not set), OFF (0), ON (1), with a test of the three.The texts. They contradicted each other and the code:
locales/en.json,zh-CN.json)port.rsmodule doc andparse_modedocresolve_port_mode: unset is on, except on Amperelib.rsport_constants_ondocxmem.rsreads the variable itself, unset = offrenderer port 1 (DARNER_PORT_CONSTANTS=1)What the code does when the variable is not set: the card side is on (except on Ampere cards), but xmem takes unset as off and does not arrange the heap, so nothing is placed (xmem's own comment: "Scattered", 0 MB in place). The help, both README rows and the comments now say that about AUTO and claim nothing new about ON.
What changes for a player: a row that showed OFF shows AUTO, with the same behaviour as before; OFF is new and writes
0. No default changes.Read from the code, not tested: with
DARNER_HEAP_TWIN=1(the play default sincef6e84ff9) xmem returns the twin's heap before it looks at this switch, so ON places nothing there either.Not done here, for the maintainer to decide: making the card side's default follow xmem's (off when not set) would remove the disagreement itself.
xmem.rs's comment records why its side went back to off (2.6 to 3.3 fps against 18.5 to 18.9), so both defaults are left alone.How it was tested
0a4495ebcargo clippy -p darner-gpu --all-targets --locked -- -D warnings: clean.cargo test -p darner-gpu --lib --locked menu: 56 passed, 0 failed, 2 ignored; the new testport_constants_row_shows_unset_as_auto_and_offers_offis among them.cargo test -p darner-gpu --lib --locked(all 1,838 unit tests of the crate), 10 runs: 3 passed all 1,757 that are not ignored; 6 failed one or two tests; 1 hung in the write-watch tests and was stopped. Failed:watch::tests::ask_once_by_res_splits_reservations_without_refusals4 times,host::menu::tests::gray_shadow_lift_is_live_and_saved_as_a_percentagetwice,gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readbackonce,watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochsonce. The new test never failed.maincommit (f3840d73) without this change: 11 of 20 runs there, the same tests. So they look flaky onmain;mainitself was not run. Open PRs #261 (thegpu_ownedtest of eight faults) and #262 (arefresh_teststest and the watch journal's lock) are already about tests of this family failing by chance.gray_shadow_liftfailed only on this branch: 2 of 10 runs, against 0 of 20 on the other. Both times its loop of ten saves got "COULD NOT SAVE THE SETTINGS FILE" (an I/O error fromwrite_settingson a file in the test's own temporary folder), and both timesask_once_by_resfailed in the same run. The cause is not established. This PR changes no code on that path (it reads the file, builds text and renames a temporary file over it), and no other test in the crate touches that test's file orDARNER_MENU_FILEwithout the tests' lock. In the narrowmenurun above the test passed.darner-gpuwith all targets, and the unit tests named above. Not run: clippy over the whole workspace, clippy with--all-features,cargo test --workspace.0) was not run in the game. The two rows for this switch indocs/README-nvidia.md:148anddocs/memory-separation-window-budget.md:57still say "off" and are left as they are. The changed help lines are covered by the menu's own fit tests (every_name_and_value_fits_its_row_at_every_scale,every_view_fits_its_box_at_every_scale), which are in themenurun; the catalogs have no other test. The Chinese help line was written by an AI model, not checked by a native speaker; it uses only characters the catalog already has. The Spanish and Portuguese catalogs of open PRs #196 and #217 carry the old sentence.Checklist
main.docs/asset-policy.md.Checked for overlap
locales/en.jsonand 9locales/zh-CN.jsonat other keys. Inhost/menu.rs, #302 has a hunk 9 lines below the row; #80, #328, #344, #380 and #385 change the file elsewhere. Inlocales/en.json, #302 has a hunk that ends 2 lines above the two help lines. Inlib.rs, #80 has a hunk that ends 7 lines above the comment. None of these changes the same lines.DARNER_PORT_CONSTANTS,port_constants_onor this help key. The forge's search finds no closed issue or PR for the switch or the row's name; six open issues and #394 mention the switch; by their titles they are crash, performance and Linux reports, not about this row.🤖 Generated with Claude Code
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.