Repository navigation
rdna2spirv: decode scalar, image and buffer tuples that run into vcc from blob (OLD-10062) - #744
Closed
abnalstlll-byte wants to merge 1 commit into
Closed
abnalstlll-byte wants to merge 1 commit into
abnalstlll-byte wants to merge 1 commit into
Conversation
… vcc from the blob when llvm-mc rejects them llvm-mc skips the first word of s_buffer_load_dwordx8 into s[100:107], an image resource in s[100:107] or a buffer resource in s[104:107] and leaves the second word as junk, so translate() refused those shaders (reachable instruction with normalized encoding) or translated them without the load. restore_vcc_tuples reads the uncovered words of the code range with rdna2_decode and keeps only instructions whose operands hold a VCCTuple list, the form the translator already takes. Other undecodable words are unchanged.
Contributor
|
Tested
No GPU leg: this is a decode-level fallback for tuples llvm-mc truncates; no |
Collaborator
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.
Summary
Restores and updates work from draft PR #327 (
old-pr/10062/ itemOLD-10062).Original commit by @tedin7 (
063f14dcd9).llvm-mcskips the first word ofs_buffer_load_dwordx8intos[100:107], an image resource ins[100:107]or a buffer resource ins[104:107]and leaves the second word as junk, sotranslate()refused those shaders ("reachable instruction with normalized encoding" or "fall-through into undecodable words") or translated them without the load.restore_vcc_tuplesreads the uncovered words of the code range withrdna2_decodeand keeps only instructions whose operands hold aVCCTuplelist, the form the translator already takes. Other undecodable words remain unchanged and properly rejected.Verification
python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_vcc_tuple_fallback.py docs/shader_library.md-> Clean (no game data)python -m unittest discover -s tests/semantic -p test_vcc_tuple_fallback.py-> 4/4 PASS in 0.22subi/main(21625bca8).AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).