Repository navigation
Conversation
|
Thanks for claiming P-4. Before you write a narrower lock, try measuring with a switch we already have for this exact wait:
What we've measured so far:
Your opening-scene baseline (1,038 ms a frame waiting for the lock) is the case this switch was written for. If it removes most of that wait, P-4 may only need it measured and turned on, maybe with a narrower lock as a follow-up. You're right that a remap can unmap a whole view, so any narrower lock has to cover the view's full span. To compare without playing by hand, put the switch in an opt-in profile in Also, #35 has merged and added to the top of the "Newest" section of |
8c62950 to
7bbfff4
Compare
7bbfff4 to
76d48cf
Compare
|
This session is nearly out of its Codex usage allowance, so I can’t continue working on P-4. Could someone take over this draft and finish the remaining validation? The implementation is in commit |
What changed
P-4 experiment.
LEONIDA_TEXTURE_RANGE_LOCK=1lets a texture refresh read in place while unrelated title memory is remapped. Overlapping reads still wait. The option is off by default, and P-4 remains open.This follows the request to measure the existing no-wait switch. The tested branch is
Ondra97:codex/p4-texture-remap-lockat76d48cf, based onf4c0707.How it was tested
scripts\measure-run.ps1.cargo test --workspace --lockedon the rebased branch. 613 passed, 17 ignored.cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policyPlaytest
The 330-second control and existing-switch runs used
e8aa615. The range-lock run used the patch on the same runtime base. Each started from the same save and a separate copy of the warmed shader and pipeline caches.baseLEONIDA_TEXTURE_NO_WAIT=1LEONIDA_TEXTURE_RANGE_LOCK=1FPS and frame times are medians of the script's windows after 170 seconds. Mapping wait and deferred refreshes use the windows with at least 500 draws per frame. The variants advanced through the opening at different rates.
Handoff
Check out the published draft. From an upstream clone, run
gh pr checkout 34 --repo ProjectLeonidaL/leonida. The reference benchmark and local validation are pinned above. Upstreammainwas ata141614at handoff and includes #48, which moves graphics profile handling into the runtime. Recheck profile selection and rerun validation on any rebased head before comparing figures.Reproduce the comparison on the pinned revisions. Use separate worktrees for
e8aa615and76d48cf. In each, configure a local game directory viaLEONIDA_GAME_DIRorleonida.tomland build on Windows.The second command binds without running the title. Warm the shader cache with
translate --warm allafter translator changes and prime the pipeline cache with an untimed run. For each timed run, setLEONIDA_DATA_DIRandLEONIDA_CACHE_DIRto separate copies of the same starting save and warmed cache, outside the checkout. ClearLEONIDA_KEEP_WINDOW. Add these opt-in entries to the ignoredgpu-profiles.local.jsonused by the pinned scripts.{ "profiles": [ {"name": "p4-no-wait", "opt_in": true, "env": {"LEONIDA_TEXTURE_NO_WAIT": "1"}}, {"name": "p4-range-lock", "opt_in": true, "env": {"LEONIDA_TEXTURE_RANGE_LOCK": "1"}} ] }Run the first two commands from the control worktree and the third from the draft worktree. Set the same report root in both PowerShell sessions.
Read each
summary.txtand check the actual run data directory for growth incrashes.logwhen usingLEONIDA_DATA_DIR. Compare the same camera view from a checkpoint, repeat in reverse order, and record whether textures converge and whether mapping waits and deferred refreshes change. Keep captures, logs, saves and caches private. Share numeric results and visual observations in words.Preserve the locking contract.
xmem::remapping_viewsincludes the complete footprint of any view Windows temporarily removes. Hold the writer guard through unmapping, replacement and the remap notifications. Texture readers take only the locks for their address spans, in table order. Readers that can follow aliases keep the global guard. The regression tests cover disjoint reads, overlaps, wraparound and the fringes of a split view.Open work. Compare both opt-ins in the same steady gameplay view and check the intermittent dark samples before changing a default. P-4 also includes the kernel cost of the remaps themselves.
AI