docs: name the shader census tiers and the key behind each count #619
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/625"
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 R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T16:20:38Z.
Change
Refs #594. Adds one subsection to
docs/experiments.md,### Shader census tiers and what each percentage divides by, placed directly before### Fixed-profile archive rescanso the first coverage table is read with the convention in hand. It advances S1 of #594 — a contributor quoting a percentage can now see which population it divides by — and answers the convention question raised for a second corpus in drycheetah84/TomBox#5.The section names the three counts with their own source and key, as requested:
It states the convention the profile tables already follow: they divide by the 26,503 accepted archive records, and each per-stage row divides by that stage's own count (PS 12,101, CS 2,689, MS 9,282, VS 2,236, GS 195).
tools/shader_profile_audit.pyis named as the counter, with the full-container SHA-256 as its classification cache key. The text also records why the two archive keys stay apart: 26,721 accepted candidates include 218 re-detections, leaving 26,503 records and 25,889 digests.21,044 is now described as the earlier extractor result, together with the reason it was revised: that scan ended every program at a fixed 40-byte
S_CODE_ENDtail and missed 478 index entries (419 carry the standard gate andS_ENDPGM— 407 end with a 20-byte tail and 12 carry noS_CODE_ENDfill — 58 begin directly with the program body, one has no terminator), and a further 4,485 entries were bounded wrongly at both ends because their start falls in the gap between two old records and their tail extends into the next one. Boundaries now come from the index, which gives 21,522 programs. The subsection also notes that 26,091 is the number ofS_ENDPGMinstructions and not a record count.One correction is folded in from ivall/xcl#34: the 218 re-detections are suffix aliases that start inside the previous record's name, at a byte whose value equals its distance to the name's terminating NUL, and share that record's terminator, header and payload. The earlier wording here placed those starts inside the compressed payload. The de-duplication result is unchanged, since it keeps the earlier start whenever the end offset and the digest match.
No behaviour, tool or test changes: the only edit is prose in one document.
Verification
Commit
62b9256, Windows x64, Python 3.15.0.Both pass before and after the change. The numbers in the subsection were checked one by one against our measurements of the archive, the cache index and the earlier extractor: 26,721 / 218 / 26,503 / 25,889, the per-stage split 12,101 + 2,689 + 9,282 + 2,236 + 195 = 26,503, the 21,522 entries with their offset-and-span reading, 419 + 58 + 1 = 478, 4,485 cross-boundary entries, and 26,091
S_ENDPGMoccurrences.The reproduction command in the issue (
tools/shader_profile_audit.py --llvm <lib>) needs the archive and LLVM 15 and was not rerun for a documentation-only change; no game files, container bytes or shader names are added by this patch.Evidence and follow-up
Checklist
docs/experiments.md).Drafted with AI assistance; the commands above were run on the author's Windows x64 host and the numbers were re-checked against the measurements before posting.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T18:56:14Z.
Coordination note: #617 and #625 both add a new subsection to
docs/experiments.mdat the same place, directly after line 231, before### Fixed-profile archive rescan. Both explain the shader census populations:### Shader census populationstogether withtools/shader_census.pyand its check.### Shader census tiers and what each percentage divides byand only edits the docs.The two branches conflict with each other in
docs/experiments.md(git merge-tree). #617 also conflicts withmainatedc2e54inCMakeLists.txt, while #625 merges cleanly withmain. Since both describe the same three counts for #594, it may help to agree on one section, for example one PR building on the other, so the docs don't end up with two definitions of the same tiers.AI-assisted (Claude Code).