Bound per-thread shader census records and drain them when output is unavailable #246
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by feanorsun on 2026-11-26T12:36:51Z.
Refs #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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.