Title memory by address: the structure builder turns off when no copy number is left (#1257) #1262

Closed
Humb8l wants to merge 1 commit from upstream-pr/1265 into main
Humb8l commented 2026-11-26 05:29:19 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Humb8l on 2026-11-26T05:29:19Z.


Refs #1257.

What happened

With VICTORY_BVH_BUILDER=1, memory.rs ran out of its 1023 copy numbers within seconds. It logged no number left for another copy; its pages read zeros once and kept running the builder. The builder's stages then read zeros and dropped stores. The module itself treats that as a dropped stage ("all or none"). The title then faulted in its own image (0xc0000005).

Change

  • memory::ready returns Ready::whole. It is false when a page named by this dispatch found no number left.
  • In State::bind, a builder stage for which whole is false is dropped, and pipeline::builder_off(...) is called. A stage that cannot be bound already takes this path. Programs outside the builder are unchanged.
  • The one-time warning now counts the copies numbered so far by what named them first: views, pairs, units (constants in 256-byte units) and faults. The reporter's hypothesis is that constants are being taken for addresses. The next run of the log will confirm it or rule it out before anyone touches the heuristic in ready.

This does not make the builder work: it stops it cleanly instead of letting the title crash. The root cause (why so many copies are numbered) is left for the measurement above.

Checks

  • cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings: OK
  • cargo test --locked -p victory-gpu --lib memory: 15 passed
  • Not run in the game: I don't have the hardware. A run with VICTORY_BVH_BUILDER=1 should now show the ray-tracing structure builder is turned off for the rest of the run right after the no number left warning, and no crash.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:5504563787 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1265). Originally posted by [Humb8l](https://github.com/Humb8l) on 2026-11-26T05:29:19Z. --- Refs #1257. ## What happened With `VICTORY_BVH_BUILDER=1`, `memory.rs` ran out of its 1023 copy numbers within seconds. It logged `no number left for another copy; its pages read zeros` once and **kept running the builder**. The builder's stages then read zeros and dropped stores. The module itself treats that as a dropped stage ("all or none"). The title then faulted in its own image (`0xc0000005`). ## Change - `memory::ready` returns `Ready::whole`. It is `false` when a page named by this dispatch found no number left. - In `State::bind`, a **builder** stage for which `whole` is `false` is dropped, and `pipeline::builder_off(...)` is called. A stage that cannot be bound already takes this path. Programs outside the builder are unchanged. - The one-time warning now counts the copies numbered so far by what named them first: `views`, `pairs`, `units` (constants in 256-byte units) and `faults`. The reporter's hypothesis is that constants are being taken for addresses. The next run of the log will confirm it or rule it out before anyone touches the heuristic in `ready`. This does not make the builder work: it stops it cleanly instead of letting the title crash. The root cause (why so many copies are numbered) is left for the measurement above. ## Checks - `cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings`: OK - `cargo test --locked -p victory-gpu --lib memory`: 15 passed - **Not run in the game**: I don't have the hardware. A run with `VICTORY_BVH_BUILDER=1` should now show `the ray-tracing structure builder is turned off for the rest of the run` right after the `no number left` warning, and no crash. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
fxceless/victory-fork!1262
No description provided.