Bound per-thread shader census records and drain them when output is unavailable #246
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!246
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-246"
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?
@feanorsun on GitHub · 2026-11-26 12:36 UTC · original
feanorsun:fix/bound-shader-census-records→main· +156 −16 · 2 files · 1 commits · openRefs #227
This addresses the Census list item. Thanks to @kekonn for identifying both ways that shader census records could accumulate.
With
VICTORY_SHADER_CENSUSenabled, each emitting thread kept every candidate until a caller requested the counts. Game runs can emit candidates without a consumer. Intranslate, a failed output-file open was cached, so every subsequent translation also returned before consuming its candidates.Each thread now keeps its most recent 64 candidates in a deque. The next insertion evicts the oldest in constant time. A translation can select an earlier candidate.
takesearches newest first by embedded bitcode length and hash, then discards the whole batch on a hit, a miss, or a missing bitcode marker. The CLI consumes the batch before checking the cached output file. With the diagnostic disabled it returns before scanning the container, hashing bitcode, or opening a file.Windows CPU tests
The CLI cases ran in separate test processes to isolate the cached environment switch and file. All tests used synthetic input on the CPU.
git diff --checkpassed.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.