Shader count reconciliation: 24,064 programs, 26,503 programs and 25,043 streams — what does each count? #36
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#36
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@JoshRob297 on GitHub · 2026-11-22 14:43 UTC · original
Three projects now publish a "shader count" for the same retail package, and the numbers differ
enough that a reader could think someone is wrong:
sgd5_shader_dxbcthat carry a program name in their header, across all 22 archivesThe arithmetic is suggestive rather than contradictory: 26,503 − 25,043 = 1,460, which is what you
would get if a handful of streams hold more than one program (a VS+PS pair, for instance), and
26,503 − 24,064 = 2,439, which would be the programs outside the shader pack.
So the question I would like to close, in the interest of anyone comparing these three READMEs:
shaders.rpf, or every archive? The wording says "its shader pack",which reads like the archive alone.
If the answer is "shader pack only, counted after splitting", then the three numbers agree and the
difference is just scope. If not, one of us has a real discrepancy worth chasing.
Context on the third number, in case it helps: the 25,043 comes from walking all 22
.rpfarchives (150 GiB) and counting streams whose SGD5 header block decodes to a name; 25,043 of
25,043 such streams decoded, so it is a complete count of that type, not a sample. The method,
the per-archive breakdown and the negative results are in
https://github.com/JoshRob297/rpf9-research — the per-type table is in
docs/INDEX.md.precise, and thes_round_modeNOOPs are not free #73@ivall on GitHub · 2026-11-22 15:41 UTC · original
Short version: 24,064 covered
shaders.rpfonly, counted after splitting, and it was low because of #34. 26,503 is the complete record count ofshaders.rpf, and xcl now finds the same.scan()found inshaders.rpf. 195 GS records carry two programs (the ES and GS halves), so 23,869 + 195 = 24,064: PS 12,101, MS 9,282, VS 2,236, GS 195, ES 195, CS 55.shaders.rpf. The per-stage split matches ours exactly for PS, MS, VS and GS. The only difference is CS: 2,689 vs our 55. That gap is the 2,634 effect-qualified compute shadersscan()dropped (#34). So 26,503 − 24,064 = 2,439 = 2,634 − 195 (the ES halves we counted separately). No program from outside the shader pack is involved.shaders.rpf: we searched all 22 archives (~150 GB) for the name ending that every shader record has,_Wrapped\0. It occurs exactly 26,503 times inshaders.rpfand zero times in the other 21. That only covers records stored in this plain form; a shader inside an encrypted or compressed resource would not show up.shaders.rpfeach record is one DXBC container, so streams that hold several programs would not explain a count below the record count. For reference: 26,503 records, 25,889 distinct payloads, 8,145 distinct names – none of them is 25,043. If your streams are per resource rather than per record, the per-archive table should show where the difference sits.The README now says what is counted: "26 698 RDNA2 programs (26 503 records) of its shader pack".
@ivall on GitHub · 2026-11-22 15:46 UTC · original
Landed in
e80ce8d.@JoshRob297 on GitHub · 2026-11-22 16:15 UTC · original
Thanks — that closes it cleanly, and the CS gap is the part that mattered.
For the record, the third number maps to yours the way you would expect: my 25,043 is a count of
streams of type
sgd5_shader_dxbcacross all 22 archives, not records. If a stream can carrymore than one record, then 26,503 − 25,043 = 1,460 records would be sitting in multi-record
streams, which is consistent with your 23,869 records producing 24,064 programs before the fix.
So the three figures agree on scope:
shaders.rpfonly, counted after splitting at the recordlevel, and the 2,634 effect-qualified compute shaders were the real discrepancy — not a
disagreement between projects.
One thing I can add if useful: I have per-archive stream counts for that type, so if you ever want
to check that
shaders.rpfis the whole story (that no SGD5 stream lives outside it), the numbersare there. On my side the split was 29,248 streams classified in
shaders.rpf, of which 25,043decoded to an SGD5 name — the rest are other stream types in the same archive.