Repository navigation
shader_ir: preserve disassembly offsets and validation with a UTF-8 BOM - #8405
Open
AGInformatique81 wants to merge 1 commit into
Open
AGInformatique81 wants to merge 1 commit into
AGInformatique81 wants to merge 1 commit into
Conversation
|
Tested 98166db on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check. test_shader_ir 40/40 + printed_encoding 8/8 + parse 3/3 OK. Negative control: base tool → 2+1 BOM failures; restored, green again. No game files. AI-assisted. |
|
Tested 98166db on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check. test_shader_ir 40/40 + printed_encoding 8/8 + parse 3/3 OK. Negative control: base tool → BOM tests fail; restored, green again. No game files. AI-assisted. |
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.
Change
Accept an optional UTF-8 BOM at the start of a disassembly listing. The parser preserves the header's start and end offsets, and keeps the first instruction in a headerless file. The shared header matcher also accepts the BOM, so the translator still checks the printed instruction bytes against the blob at the correct offsets.
Coordination claim: #8344 (comment)
This overlaps #5827's read-once optimization in the reader. If that change lands first, the raw listing can still be hashed verbatim and decoded as utf-8-sig for parsing.
Testing
Synthetic inputs, CPU only. No game files or GPU needed. AI-assisted (Codex).
Integration check
Tested the combined reader with #5827 on main dfe4e4a. All 130 selected tests passed on Windows and WSL2, and a source hash check includes the BOM in the raw digest while preserving assembly and other metadata. Details: #5827 (comment)