Repository navigation
docs(shader): say that the whole packed ancillary word carries the layer field too - #8425
Merged
adriadam10 merged 3 commits intoOct 24, 2026
Conversation
…yer field too Co-Authored-By: Claude <noreply@anthropic.com>
… index at bits 16-28 Co-Authored-By: Claude <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
harisibrar1
approved these changes
Oct 21, 2026
harisibrar1
left a comment
Contributor
There was a problem hiding this comment.
Checked against main:
ConstantFolder.cpp:1388-1393(ComposePackedAncillary) builds the whole word asprimitive | (sample << 8) | ((Layer * LayerExported) << 16). "Plus the two fields" is accurate, and the layer is 0 whenLayerExportedis 0.- The field extract path uses the same
Layer * LayerExportedproduct (ConstantFolder.cpp:835), so "the whole word has the same render target index at bits 16-28" is accurate, and the old "restore the Layer read in both places" caveat no longer applies. check_conventions.py --base main: 0 errors. The onedebt-lengthwarning is for an entry that was already over 1000 characters, and this change makes it shorter.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
…e a source Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
Checked the three edited clauses against |
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.
What
The
Packed pixel ancillary wordentry indocs/dev/debt/shader.mdsays a read that gets the whole word gets the primitive class "plus the sample field, with every other bit zero". Since #5097 (7015c0443) the rebuilt word also carries the render target index:ComposePackedAncillaryinConstantFolder.cpp(lines 1391-1396 onmain) replaces it withprimitive | (sample << 8) | ((Layer * LayerExported) << 16), so on a layered draw bits 16-28 hold the Layer. The clause now reads "plus the two fields", the name the entry already uses for the sample and render target index fields.The entry's last sentences say "The whole word has the same 0 at bits 16-28. A change that makes draws export a layer must restore the Layer read in both places". That change has happened: the field path (
ConstantFolder.cpp:839) and the whole word both readLayer * LayerExported, and draws setLayerExportedwhen they export a layer. The sentence now reads "The whole word has the same render target index at bits 16-28".With that, the entry's "In the whole word only bits 0-1 and 8-11 have a source" also has to count the render target index, so it now reads "In the whole word only bits 0-1, 8-11 and 16-28 have a source"; the bits it calls assumed zero (2-7, 12-15 and 29-31) are unchanged.
Tested
Docs only; nothing was built or run. Checked on
main11d6efa06cby readingcore/shader/recompiler/Optimization/src/ConstantFolder.cpp:1380-1398(ComposePackedAncillary) and:839(the field path).python tools/check_conventions.py --base origin/mainwith this title and body: 0 errors and onedebt-lengthwarning, because the entry was already over 1000 characters (3053 before, 2991 after this change).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code