gpu/descriptor: read the texture queue without its lock and tell it in batches #173
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!173
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-172"
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?
@SovietBearz0r on GitHub · 2026-12-05 20:51 UTC · original
SovietBearz0r:darner-queue-marks→main· +653 −106 · 5 files · 1 commits · openDarner measured other threads waiting 33-44 s on the texture-queue lock in a 150 s run before
DARNER_QUEUE_MARKS, and the queue batch switch. This ports the lock-sparing marks and batched tells.What
QueueMarks: per-slot entry write numbers (0 = none) plus a count of shards holding slots back for lack of card room, maintained under the queue lock, read without it.VICTORY_QUEUE_MARKSdefault on (=0takes the lock every time).texture_slots_room(no shard locked when nothing is held). Spared takes are counted and reported as "texture queue locks not taken N a frame" on the existing list line.texture_slots_due_knowngets each due slot'scheckeddata in the same lock take instead of one lock per due slot; newVICTORY_QUEUE_BATCH(default on) /_MAX(64, clamp 1-4096) gathersToldresults and applies them once per shard (sorted by slot), flushed at pass end.DARNER_DUE_INDEXis deliberately left out: our queue is a 64-shardHashMapwith per-shard census scanning, so a faithful index needs a per-shard bucket index plus census/held/room parity; that is an opt-in follow-up with equivalence tests, not part of this PR.Verification
cargo test -p victory-gpu --lib: 719 passed, 0 failed, 21 ignored (3 new: marks say what the queue holds without the lock; batched tells serve as told one-by-one; due slots come with what the queue knew); all-features 796 passed; clippy default+all-features-D warningsclean;cargo check -p victory; policy 442 files.VICTORY_QUEUE_*constants. A/B needed: "texture queue lock waits" and the new "locks not taken" lines, marks/batch defaults vs=0.@SovietBearz0r on GitHub · 2026-12-05 21:48 UTC · original
In-game A/B on RX 9070 XT (diag build, builtin:cruise, medians over the measured spots):
VICTORY_QUEUE_MARKS=0 VICTORY_QUEUE_BATCH=0texture queue lock waits/ frametexture queue locks not taken/ frameSo the marks reduce texture-queue lock waits by ~37x on this route, with identical results/pacing and 0 errors. That is also the argument for keeping the defaults ON: this is measured, not speculative. (
locks not takenbeing non-zero with the switch off is expected — one write-site shortcut is independent of the mark table.) Logs:data\ingame-verify\logs\queue-base.log,...\queue-nomarks.log.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.