The views table is a read-write lock: list recorders only read it #18
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18"
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?
Imported from DexNom/VIctory. Originally posted by Daayben on 2026-11-25T18:38:22Z.
descriptor::VIEWSbecomes aRwLock. List recorders read it for every descriptor they bind. Belobug's PIX timing capture showed the title's five recording threads taking turns on the mutex, at 6,600 context switches a second each.Read lock:
view,view_at(table entries andplaced_of),views_kept, and the two lookups in the tests.Write lock:
words_for(shape()may add a shape,entry()an entry) andforget.Adapted from Belobug/VIctory-Belobug-AMD ff920f2 (beloooo, credited as co-author). This tree's table has shapes and placed views that the original did not, so the patch does not apply as is.
Measured effect: Belobug saw no frame-time change from this alone (4.2 to 5.8 fps either way). The submit thread is the limit there. I have not measured it in the game.
Checked on Windows 11, RTX 4090, i9-10900F:
cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: cleancargo test --workspace --locked: 634 passed, 0 failed, 11 ignoredcargo test --locked --release -p victory-gpu: 188 passed, including the 23descriptortests🤖 Generated with Claude Code
Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-26T23:17:59Z.
Independent native Windows release benchmark at
a9990fdversus base2e01ab4, Ryzen 7 5700X3D: 500,000 realview()lookups against 2,048 table-backed sampler descriptors per sample. Median of three process medians, each with five measured samples after warm-up: one reader 6.675 → 6.867 ms; five readers 74.663 → 30.751 ms (about 2.43×); five readers with one also callingwords_forevery 128 of its own reads 73.195 → 31.865 ms (about 2.30×). This isolates CPU lock paths; no GPU, gameplay or frame-time result.Verification was AI-assisted with GPT-6.2 Astra.
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.