Loader: descriptor and write sites reach their stubs without the GPL-2.0-only console_insn helpers #393
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!393
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-393"
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?
@MKmajster on GitHub · 2026-11-26 22:43 UTC · original
MKmajster:mk/descriptor-sites-own-helpers→main· +118 −16 · 4 files · 1 commits · opendescriptor_sites.rs(renderer port #2) andwrite_sites.rstake theirjmp rel32encoder and the room for their stubs (jump,near,STUBS_LEN) fromconsole_insn.rs. That file says it is ported from XCL, which is GPL-2.0-only, while this tree is GPL-3.0-or-later — so the two patchers cannot be taken into GPL-3.0 trees cleanly.This PR gives them a small module of their own,
reach.rs, written from the instruction encoding alone:jump(at, to):E9and a signed 32-bit displacement counted from the end of the five bytes;Nonepast ±2 GiB.near(at): a 64 KiB region of executable memory, the free one nearest the code (above first, then below), found by walkingVirtualQueryon 64 KiB lines.STUBS_LEN: 64 KiB, as before.All nine call sites move from
console_insn::toreach::. Behaviour is unchanged.console_insn.rsstays for the instructions it emulates; only the patchers no longer need it.Tests: two new ones in
reach.rs— the encoding and its reach in both directions, and that room taken near our own code is within a jump of it, on a 64 KiB line, and usable.cargo test -p victory-loader --lib: 54/54. The diagnostics build ofvictorycompiles. Not run in the title on top of this exact commit; the same helpers (written for an fxceless-based tree) run port 2 there on an RTX 3070 without problems (sync_heaps17 ms → under 1 ms a frame).Thank you for port 2 — on NVIDIA it is the one renderer port that clearly helps (see #389).
AI-assisted, no game data attached.
🤖 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.