Skip to content

Decode tiled ASTC 4x4 in AAPL snapshots - #353

Merged
abrignoni merged 2 commits into
mainfrom
fix/aapl-tiled-astc
Nov 26, 2026
Merged

abrignoni merged 2 commits into
mainfrom
fix/aapl-tiled-astc

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Tiled iOS snapshots no longer show up scrambled in GLEAPP.

  • iOS 26 and 27 SplashBoard snapshots hold ASTC 4x4 blocks in 32x32-block Morton tiles. They are now untiled before decoding, ported from iLEAPP's KTX_reader (Decode tiled ASTC snapshots seen on iOS 26 and 27 iLEAPP#2887, #2893, #2895).
  • An @2x snapshot gets the swapped bit order, read from the evidence path, since a cached or extracted copy can carry another name. That order comes from one 2x device.
  • Only the linear and tiled lengths are accepted, so a cut-short texture is refused.
  • Corpus run on 32 real snapshots from three images: 24 tiled thumbnails were scrambled on main and match the correct decode here; 8 linear ones are unchanged.

🤖 Generated with Claude Code

iOS 26 and 27 snapshots (and other AAPL textures from iOS 16 on) hold
their ASTC 4x4 blocks in 32x32-block Morton tiles on a padded surface
plus one block, so GLEAPP showed them scrambled. Tiled data is now put
back in raster order, with the x and y bits swapped for an @2x snapshot
name, read from the evidence path the pipeline and the viewer pass down.
Only the linear and tiled lengths are accepted, so a cut-short texture
is refused instead of decoded. Ported from iLEAPP's KTX_reader.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@abrignoni abrignoni left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated GLEAPP review.

Comment thread gleapp/imaging.py Resolved
Comment thread gleapp/imaging.py Resolved
Comment thread gleapp/web/app.py Resolved
A case reopened after this change kept serving the scrambled preview
the old decoder had cached under views/. Texture previews now use a
versioned name, in the viewer and in the report. Word 12 is read only
from inside a HEAD long enough to hold it, and a texture flagged as
tiled is no longer accepted at the linear length.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@abrignoni abrignoni left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated GLEAPP review.

Comment thread gleapp/imaging.py Resolved
Comment thread gleapp/pipeline.py Resolved
@abrignoni
abrignoni merged commit 52feb20 into main Nov 26, 2026
7 checks passed
@abrignoni
abrignoni deleted the fix/aapl-tiled-astc branch November 26, 2026 06:33
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.

1 participant