Repository navigation
fix(agc): size CMASK by whole 1024x512 metablocks - #1447
Merged
oneandonlydean merged 1 commit intoOct 8, 2026
Merged
Conversation
A CMASK holds 4 KiB per 1024x512-pixel metablock, not one nibble per 8x8 tile of the target: 1920x1080 spans 0x6000 bytes, as titles clear it, not 16200. The swizzled nibbles of the lower-right tiles lie past the packed size, so the fast-clear check missed them and the expanded store left them cleared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
6 tasks done
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
Sizes a color target's CMASK in whole 4 KiB metablocks of 1024x512 pixels, instead of one packed nibble per 8x8 tile. This is commit 1c84890 from #1237 on its own, by its author; #1072 landed without it.
Why
#1072 checks and expands
cmaskBytes(State.cpp) bytes of CMASK, one nibble per 8x8 tile from the start of the target. The nibbles are swizzled inside 4 KiB metablocks of 1024x512 pixels, so the CMASK of a 1920x1080 target spans 0x6000 bytes (the size titles clear), not 16200. The lower-right tiles lie past the packed size, so the all-cleared check doesn't look at them and the expanded store leaves them fast-cleared.Tested
cmaskTestsintests/Graphics.cppchecksCmaskBytesfor 1920x1080 (0x6000), 960x544, 800x450, 1024x512 and 3840x2160, and runs the fast-clear passes over a whole 4 KiB CMASK.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)