[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

Open
iBooM72 wants to merge 2 commits from iboom72/fix/port-constants-menu-row into main AGit
Contributor

What it changes

  • The problem on main: read from the code only, plus eight local play logs (v2026.12.03.01 and .02, RTX 4070 Ti, launcher defaults) that all show 0 regions in place.

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.rs resolve_port_mode) is on when the variable is not set, except on Ampere cards. And the menu could not write 0, 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:

Where Said Code
F1 help (locales/en.json, zh-CN.json) "ON BY DEFAULT, NOT ON RTX 30 CARDS" the row beside it showed OFF when not set
README switch table "on (not set), except on RTX 30 cards" the README's F1 table said default OFF
port.rs module doc and parse_mode doc "off by default", "unset or anything else: off" resolve_port_mode: unset is on, except on Ampere
lib.rs port_constants_on doc "The runtime's memory side asks this, so both halves agree" nothing calls it; xmem.rs reads the variable itself, unset = off
frame-rate line renderer port 1 (DARNER_PORT_CONSTANTS=1) printed when the variable is not set too

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 since f6e84ff9) 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

  • Tested revision: 0a4495eb
  • Commands and results:
    • cargo 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 test port_constants_row_shows_unset_as_auto_and_offers_off is 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_refusals 4 times, host::menu::tests::gray_shadow_lift_is_live_and_saved_as_a_percentage twice, gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readback once, watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs once. The new test never failed.
      • The watch and GPU-owned tests also fail on a branch from the same main commit (f3840d73) without this change: 11 of 20 runs there, the same tests. So they look flaky on main; main itself was not run. Open PRs #261 (the gpu_owned test of eight faults) and #262 (a refresh_tests test and the watch journal's lock) are already about tests of this family failing by chance.
      • gray_shadow_lift failed 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 from write_settings on a file in the test's own temporary folder), and both times ask_once_by_res failed 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 or DARNER_MENU_FILE without the tests' lock. In the narrow menu run above the test passed.
  • Changes a default: no
  • A/B result: not applicable (no default changes, no speed claim).
  • Gates run on that revision (the three in AGENTS.md; there is no CI): none of the three in full. Run instead: clippy for darner-gpu with all targets, and the unit tests named above. Not run: clippy over the whole workspace, clippy with --all-features, cargo test --workspace.
  • Gameplay, when relevant: not run in the game. The menu row is covered by its unit test only.
  • Hardware dependence: none for the row and the texts.
  • Coverage gaps: the row was not looked at in the running menu, and OFF (0) was not run in the game. The two rows for this switch in docs/README-nvidia.md:148 and docs/memory-separation-window-budget.md:57 still 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 the menu run; 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

  • I ran this change in the game, or say below why it can't be (docs, tests only).
    • Not run in the game: one menu row with a unit test, help text, README cells, comments and one log string.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #154 (F1 menu new look) and the catalogs of #196 and #217 carry this help text; #34 changes the README row below this one (line 1268). 11 open PRs change locales/en.json and 9 locales/zh-CN.json at other keys. In host/menu.rs, #302 has a hunk 9 lines below the row; #80, #328, #344, #380 and #385 change the file elsewhere. In locales/en.json, #302 has a hunk that ends 2 lines above the two help lines. In lib.rs, #80 has a hunk that ends 7 lines above the comment. None of these changes the same lines.
  • Replaces or overlaps: none found. No open PR's diff names DARNER_PORT_CONSTANTS, port_constants_on or 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

## What it changes - The problem on main: read from the code only, plus eight local play logs (v2026.12.03.01 and .02, RTX 4070 Ti, launcher defaults) that all show 0 regions in place. **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.rs` `resolve_port_mode`) is on when the variable is not set, except on Ampere cards. And the menu could not write `0`, 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: | Where | Said | Code | |---|---|---| | F1 help (`locales/en.json`, `zh-CN.json`) | "ON BY DEFAULT, NOT ON RTX 30 CARDS" | the row beside it showed OFF when not set | | README switch table | "on (not set), except on RTX 30 cards" | the README's F1 table said default OFF | | `port.rs` module doc and `parse_mode` doc | "off by default", "unset or anything else: off" | `resolve_port_mode`: unset is on, except on Ampere | | `lib.rs` `port_constants_on` doc | "The runtime's memory side asks this, so both halves agree" | nothing calls it; `xmem.rs` reads the variable itself, unset = off | | frame-rate line | `renderer port 1 (DARNER_PORT_CONSTANTS=1)` | printed when the variable is not set too | 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 since `f6e84ff9`) 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 - Tested revision: `0a4495eb` - Commands and results: - `cargo 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 test `port_constants_row_shows_unset_as_auto_and_offers_off` is 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_refusals` 4 times, `host::menu::tests::gray_shadow_lift_is_live_and_saved_as_a_percentage` twice, `gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readback` once, `watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs` once. The new test never failed. - The watch and GPU-owned tests also fail on a branch from the same `main` commit (`f3840d73`) without this change: 11 of 20 runs there, the same tests. So they look flaky on `main`; `main` itself was not run. Open PRs #261 (the `gpu_owned` test of eight faults) and #262 (a `refresh_tests` test and the watch journal's lock) are already about tests of this family failing by chance. - `gray_shadow_lift` failed 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 from `write_settings` on a file in the test's own temporary folder), and both times `ask_once_by_res` failed 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 or `DARNER_MENU_FILE` without the tests' lock. In the narrow `menu` run above the test passed. - Changes a default: no - A/B result: not applicable (no default changes, no speed claim). - Gates run on that revision (the three in AGENTS.md; there is no CI): none of the three in full. Run instead: clippy for `darner-gpu` with all targets, and the unit tests named above. Not run: clippy over the whole workspace, clippy with `--all-features`, `cargo test --workspace`. - Gameplay, when relevant: not run in the game. The menu row is covered by its unit test only. - Hardware dependence: none for the row and the texts. - Coverage gaps: the row was not looked at in the running menu, and OFF (`0`) was not run in the game. The two rows for this switch in `docs/README-nvidia.md:148` and `docs/memory-separation-window-budget.md:57` still 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 the `menu` run; 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 - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - Not run in the game: one menu row with a unit test, help text, README cells, comments and one log string. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #154 (F1 menu new look) and the catalogs of #196 and #217 carry this help text; #34 changes the README row below this one (line 1268). 11 open PRs change `locales/en.json` and 9 `locales/zh-CN.json` at other keys. In `host/menu.rs`, #302 has a hunk 9 lines below the row; #80, #328, #344, #380 and #385 change the file elsewhere. In `locales/en.json`, #302 has a hunk that ends 2 lines above the two help lines. In `lib.rs`, #80 has a hunk that ends 7 lines above the comment. None of these changes the same lines. - Replaces or overlaps: none found. No open PR's diff names `DARNER_PORT_CONSTANTS`, `port_constants_on` or 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](https://claude.com/claude-code)
The F1 help and the README row said "on by default, not on RTX 30
cards" beside a menu row that shows OFF, and port.rs said "off by
default" above code that is on when unset. Both halves are described as
they are: unset, 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.
`port_constants_on`'s doc said xmem asks it; nothing calls it. The
frame-rate line no longer prints "=1" when the variable is unset. No
behaviour changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The row had two values, not set shown as OFF and `1` as ON. Not set is
not off: the card side still looks for the heap (except on RTX 30
cards), and the menu could not write `0`, the one value both halves
read as off. The row is AUTO (not set), OFF (`0`), ON (`1`) now, with a
test. The help and the README rows say that AUTO places nothing, because
the heap is not arranged for it without ON.

Menu fix by the gpu-dig session; text by this one.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/414/head:iboom72/fix/port-constants-menu-row'
git switch 'iboom72/fix/port-constants-menu-row'

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.

git switch 'main'
git merge --no-ff 'iboom72/fix/port-constants-menu-row'
git switch 'iboom72/fix/port-constants-menu-row'
git rebase 'main'
git switch 'main'
git merge --ff-only 'iboom72/fix/port-constants-menu-row'
git switch 'iboom72/fix/port-constants-menu-row'
git rebase 'main'
git switch 'main'
git merge --no-ff 'iboom72/fix/port-constants-menu-row'
git switch 'main'
git merge --squash 'iboom72/fix/port-constants-menu-row'
git switch 'main'
git merge --ff-only 'iboom72/fix/port-constants-menu-row'
git switch 'main'
git merge 'iboom72/fix/port-constants-menu-row'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!414
No description provided.