tooling: decode past s_endpgm with after_endpgm field #1062
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1062
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1062/head"
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?
@KelboLive on GitHub · 2026-11-23 23:59 UTC · original
KelboLive:hardware/rtx4070tisuper→main· +45 −3 · 2 files · 3 commits · merged 2026-11-24 00:51 UTCSummary
Disassembler now matches LLVM 15 behavior: instructions after s_endpgm are decoded instead of being silently dropped. An after_endpgm boolean field marks which decoded instructions came after the terminator, so callers that still need to stop can use that signal.
Changes
Tests
[*] Opening archive: collisions.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 4
Total Shaders Extracted: 4
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmpk8059kee\extracted_collisions
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmpk8059kee\extracted_collisions\manifest.json
[*] Opening archive: dups.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 2
Total Shaders Extracted: 2
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmp96nwj35c\extracted_dups
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmp96nwj35c\extracted_dups\manifest.json
[*] Opening archive: empty.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 0
Total Shaders Extracted: 0
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmpwvij50z1\extracted_empty
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmpwvij50z1\extracted_empty\manifest.json
[*] Opening archive: synthetic_shaders.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 1
Total Shaders Extracted: 1
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmpfm7afowf\extracted
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmpfm7afowf\extracted\manifest.json
[*] Opening archive: source_built.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 7
Total Shaders Extracted: 7
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmpl0r8rfxe\shaders
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmpl0r8rfxe\shaders\manifest.json
[*] Opening archive: false_positive.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 1
Total Shaders Extracted: 1
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmp9opfkqt5\extracted_fp
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmp9opfkqt5\extracted_fp\manifest.json
[*] Opening archive: long.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 2
Total Shaders Extracted: 2
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmp1rs9rwns\extracted_long
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmp1rs9rwns\extracted_long\manifest.json
[*] Opening archive: oversized_span.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 2
Total Shaders Extracted: 2
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmpzzqax22p\extracted_oversized
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmpzzqax22p\extracted_oversized\manifest.json
[*] Opening archive: test.rpf (0.0 MB)...
============================================================
EXTRACTION COMPLETED
Total Shaders Found: 1
Total Shaders Extracted: 0
Time Elapsed: 0.00 seconds
Extracted by Stage:
[+] Shaders directory: C:\Users\Administrator\AppData\Local\Temp\tmptqhsf5k0\extracted_compute
[+] Manifest file: C:\Users\Administrator\AppData\Local\Temp\tmptqhsf5k0\extracted_compute\manifest.json
[] Scanned 1/1 files (1 valid shaders)...
[] Scanned 2/2 files (2 valid shaders)...
[] Scanned 3/3 files (3 valid shaders)...
[] Scanned 2/2 files (2 valid shaders)...
[*] Scanned 2/2 files (2 valid shaders)...
All 91 tests pass (5 skipped — LLVM-dependent checks).
Related
Refs #938
Refs #1055
@R0Y00 on GitHub · 2026-11-24 00:02 UTC · original
The decode-through-end behavior is under review in #1055, including LLVM 15 offsets and the unknown trailing word. The after_endpgm field is a distinct API addition. Please drop the unrelated MSVC preset, README and hardware-report changes from this PR. Once #1055 settles, a metadata-only diff can show the caller that needs the flag and cover records before, at and after the first terminator.
@R0Y00 on GitHub · 2026-11-24 00:25 UTC · original
Thanks for narrowing the branch to the decoder and its tests. The complete span was already decoded by #1055. The additive field now marks offsets strictly after the first endpgm, including when a second endpgm is present. A span with no terminator gets false for every row. The field reports byte order and does not establish reachability. I pushed 39b710ff and ran all 98 decoder and scanner tests with LLVM 15.