Repository navigation
Shaders: keep spill loads when the mask clears address bits - #1
Open
MichaelSmithAI wants to merge 1 commit into
Open
MichaelSmithAI wants to merge 1 commit into
MichaelSmithAI wants to merge 1 commit into
Conversation
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.
Follow-up for Marvisak#302. The spill-table rewrite assumes a 40-bit address. It preserved the high-word tag after AND with every inline constant from 1 to 64 and every literal up to 0xffff. For example,
s1 & 0x7fclears address bit 39. Substituting root-register copies for a load through that address can change the program.Within the existing set of recognized masks, preserve the tag only when all eight address bits survive. The regression checks a literal mask and an inline constant. The existing positive case still checks the 0xff mask used in the reported world shaders.
Tested on x86-64 Linux, Rust 1.99.1. The new test failed against 815178d before the fix. With the fix,
cargo +stable test --offline --locked -p victory-shader --libpassed 59 tests with zero failures and zero ignored. This is a compiler-correctness result on synthetic inputs. Retail shader frequency and rendering impact are unmeasured.AI assistance: Codex identified the case, wrote the change and ran the tests.