Skip to content

fix(agc): size CMASK by whole 1024x512 metablocks - #1447

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/cmask-metablock-size
Oct 8, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/cmask-metablock-size

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

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

Checklist

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>
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
#1346 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp L104
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp L633

@oneandonlydean
oneandonlydean merged commit 58a1bd6 into boykopovar:main Oct 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants