shader: the per-stage census needs a second layer — 21,522 cache index entries and 21,044 extractor-accepted records behind the 26,503 records your classifier accepts #588
Open
opened 2026-11-22 14:47:45 +00:00 by MoonYueya
·
9 comments
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
R0Y00/Xbox2Windows#588
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?
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T14:47:45Z.
Question
should the coverage table divide by the 26,503 accepted records, the 21,522 cache index entries, or the 21,044 records our extractor accepts?
Evidence so far
PR #527 publishes per-stage
Records(PS 12,101, CS 2,689, MS 9,282, VS 2,236, GS 195 = 26,503) and 849 of 12,101 PS carry a D3D12 PSO. We reproduce that total from the archive alone: 26,721 plaintext records, 218 re-detections, 26,503 records / 25,889 digests; MS 9,282 and GS 195 match ours exactly. The console cache behind it (0x10579000, 4,205 streams, 275,540,780 B) indexes 21,522 entries; our extractor accepts 21,044. The 478 gap is no longer an aliasing question: an index check (rpatty-dev/PercyStar#39) finds 21,522 unique non-zero(code_offset, code_size)spans, no aliases, no zero-size entries, and blames programs ending ins_code_endrather thans_endpgm, the terminator our model requires. Resolved since — see Details below.Why here: each percentage in
docs/experiments.mddivides by one of them; if runtime lookups key off the console cache, the same coverage figure means something else, and the de-dup key moves it again. drycheetah84/TomBox#5 raised this for a second corpus; this asks for one convention here.Completion condition
docs/experiments.md, say which each table uses, give the de-dup key. Accept:python -B tests/docs_links_check.pygreen, and the numbers reproduce fromtools/shader_profile_audit.py --llvm <lib>.ctest --preset dev --no-tests=error -R 'shader_metadata|dxcontainer_part_offsets' -Vgreen on a source-built fixture, no archive needed.We will do S1 if nobody claims it. Claim here or in TomBox#5.
Required environment
Windows x64 and LLVM 15 for the count run; no game files or GPU.
Details for whoever picks this up
Named records (plaintext, before the cache). At offset
i,L = byte[i],p = i + L:i+1 .. p-1p== 0p+1p+2> 0p+6p+10== csizep+14p+18Accept a candidate only if the payload inflates to exactly
usizebytes, the output starts withDXBC, and its u32 at +24 equalsusize.Overlap rule: a candidate whose start falls inside the name of a previous record (a name byte that happens to equal its distance to the terminator) shares that record's terminator, header and payload; it is a suffix alias, so keep the earlier start. Matching end offset and 16-byte DXBC digest (container bytes 4..20) identifies it. (Corrected after ivall/xcl#34: we first said these start inside the payload.) Enumerating every candidate offset gives 26,721 accepted records, 218 of them re-detections, leaving 26,503 records and 25,889 distinct digests. The one shape this enumeration cannot see is a 3-character name, whose length byte is not part of a printable run; the shortest name in this archive is 20 bytes.
Cache index: each stream starts on a 16-byte boundary — inflate one, then advance to the next 16-byte boundary. 4,205 streams concatenate to 275,540,780 B. Page 0 begins
PS\0\x09; the u32s at +80/+84/+88/+92 are 25,471 / 2,693 / 54,576 / 21,522. After a 0x80 header come 25,471 × 0x70, 2,693 × 0x18, 54,576 × 8, then 21,522 entries of 8 bytes each. We read an entry as a 4-byte offset followed by a 4-byte span, and the data pins that order down: read this way, 21,463 of the 21,522 first dwords land exactly on the 8-byte gate, matching the 21,463 gates in the code area exactly (the other 59 begin directly with the program body); the reversed reading matches nothing. Offsets are relative to a code-area base, blob length − max(offset + span) = 34,646,340, which independently equals the first record start we find. All 21,522 offsets are distinct and 16-byte aligned, and no two spans overlap. A span is an allocation size, not a program length: for the 16,559 entries that start exactly on a record we extract, it exceeds that record's span by 168–228 B (median 200).Update on the 478: resolved. Our scan-based 21,044 was the undercount. Of the 478 entries, 419 carry the standard 8-byte gate and a normal
S_ENDPGM— 407 of those end with a 20-byteS_CODE_ENDtail where we assumed 40 B, the other 12 carry noS_CODE_ENDfill at all; 58 have no gate and begin directly with the program body; 1 has no terminator. Separately, 4,485 of our records were bounded wrong at both ends. The index gives 21,522 programs and is the number to use.Checklist
Drafted with AI assistance; numbers independently re-checked.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T15:14:54Z.
Keep the existing profile coverage denominator at 26,503 accepted archive records, with the per-stage counts for per-stage percentages.
shader_profile_audit.pycounts those records and caches classification by full-container SHA-256. The 25,889 distinct DXBC header digests and the 21,522 cache-index entries measure different populations; report each with its own source and key. Describe 21,044 as the earlier extractor result and record why it was revised. A docs PR can clarify those distinctions now. For a tool change, please use a source-built fixture where record count, distinct digest count and cache-index count deliberately differ, and keep the archive audit’s existing output semantics.Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T16:12:39Z.
Thanks, that's clear: denominator stays at 26,503, each other count gets its own source and key, and 21,044 is described as the earlier extractor result together with the reason it was revised. We'll send the docs-only PR. One correction is going into it: the 218 re-detections are suffix aliases that start inside the previous record's name, not inside its payload (ivall/xcl#34), and the Details above now say so.
Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-22T16:20:55Z.
The docs-only PR is up as #625: three counts, each with its own source and key; the 26,503 denominator is unchanged; and 21,044 is shown as the earlier extractor result together with the reason it was revised.
Drafted with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T19:15:39Z.
The documentation portion (S1) is now on main in #625. The profile denominator remains 26,503 accepted archive records. The independent digest count and cache-index count have their own definitions. Leaving this issue open for the tool-side accounting and its source-built differential fixture.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T21:12:53Z.
S2 landed in #617. The source-built control distinguishes four accepted archive records, two DXBC header digests, three full-container SHA-256 keys and five cache-index entries. Both Windows jobs and the Linux checks passed. The repository work for S1 and S2 is complete; the separate upstream discussion follow-up remains open.
Imported from R0Y00/Xbox2Windows. Originally posted by MoonYueya on 2026-11-23T17:25:50Z.
Closing the loop from our end. S1 is on main in #625 (merged 2026-11-22T19:14Z): the three counts are named, each with its own source and de-duplication key, and the profile denominator stays at the 26,503 accepted archive records. S2 is on main in #617 (merged 2026-11-22T21:11Z), with the source-built control that separates four accepted archive records, two DXBC header digests, three full-container SHA-256 keys and five cache-index entries. So both repository stages are done, and the numbers this issue asked to keep apart are 26,503 accepted archive records, 21,522 cache-index entries and 21,044 records the extractor accepts.
The one piece still open is S3, carrying the third tier into drycheetah84/TomBox#5 as a comment. That is your upstream follow-up, so we are not posting there unless you ask us to.
If the tiers shift again, those three counts and the key behind each are what we would re-check.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by cobrajet302gt on 2026-11-24T03:23:17Z.
I'll take S1 + S2 from this Linux box: name the three counts in
docs/experiments.mdwith the de-dup key, and extend the tool soshader_profile_audit.py/the census path print all three plus the key. Environment: CachyOS x64, Python 3.14.9; the two acceptance registrations (shader_metadata_census,dxcontainer_part_offsets) wrap Python scripts, which I can run directly here; I'll cite the ctest form and let the CI job confirm it. Shared interfaces I expect to touch:docs/experiments.mdcoverage lines,tools/shader_profile_audit.py, andtools/shader_census.pyif the key printing belongs there — flagging so anyone already in those files can agree which lands first. Plan: read the census/audit paths, reproduce the three counts from the source-built fixtures first, then draft the convention paragraph for review before opening the PR.Imported from R0Y00/Xbox2Windows. Originally posted by cobrajet302gt on 2026-11-24T03:38:22Z.
Follow-up from the claim here: S1 and S2 merged ahead of our work landing, so the contribution we can make on this issue is the thing drycheetah84/TomBox#5 originally raised — a second-corpus census. Ran it; the archive tier reproduces digit-for-digit.
Independently supplied second local installation (Scarlett-format package), Linux x64 (CachyOS, Python 3.14.9), commit
a7539075:unequal_stored_lengths, 1deflate_error.Reading for the denominator question: the coverage denominator (26,503 accepted archive records) and its digest pairing are stable across independently obtained copies of the retail shader set, and at this tier the SHA-256 key never splits where the digest collides. So the chosen convention means the same thing on a second corpus.
Cache-index tier not reproduced here: it needs a decoded PS/9 cache blob from this installation, and the decode-from-package path doesn't currently ship as a standalone tool. Say the word if the sub-thread wants that second 21,522-side number and I'll chase the decode.
No game files, dumps, or distribution links. Method is the census tool unchanged on this host. AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by cobrajet302gt on 2026-11-25T11:33:35Z.
Follow-up from the second-corpus claim above: we have published the row-level dataset behind our census-side numbers, so the scene can query it instead of taking headline counts on faith — cobrajet302gt/gta6-shader-census (public domain).
Scope, stated up front so nobody over-reads it: these are program-property labels with no control-flow bits — they bound refusal classes (the 746 group-shape and 1,151 wave64-compute ceilings) but do not enumerate control-flow or addressing classes; that needs DXIL parsing. Coverage of the non-FSSM (DXBC-payload) fallback path is disclosed in #578 and not claimed complete. Only digests/sizes/labels are published — no game files.
Written with an AI assistant.