Repository navigation
Ignore unaligned terminator bytes in shader fallback disassembly - #3024
Merged
ItsNotRexed merged 1 commit intoNov 22, 2026
Merged
Conversation
A terminator byte pattern spanning metadata words can look like a clean one-instruction shader. Search for a dword-aligned instruction before decoding the fallback range.
This was referenced Nov 22, 2026
Contributor
|
Tested 6f898a6 on Windows 11 (Python 3.13.7, CPU only, no game files): pass
Not run: a real |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: aligned fallback terminator
What and why
When the code offset is unavailable, the disassembler starts from the first
s_endpgmbyte pattern. A pattern straddling two dwords can give a clean-looking listing with the real shader missing. Restrict the fallback search to dword-aligned matches.Tested
s_endpgm. After the change it published 0x108–0x110 containings_nop 0ands_endpgm, with zero invalid words.python -I tests/test_shader_disasm.pypassed all 15 tests after it on Windows. No GPU or driver was used.AI-assisted (Codex).
Checklist
docs/design.md, with how it was confirmed. Inapplicable to the fallback scan.