Add R10G10B10A2_UINT PNG preview support #2320

Merged
ZroIsHere merged 1 commit from upstream-pr/2320 into main 2026-11-26 18:28:49 +00:00
ZroIsHere commented 2026-11-26 13:46:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ZroIsHere on 2026-11-26T13:46:15Z.


Adds PNG preview support for DXGI_FORMAT_R10G10B10A2_UINT. The decoder extracts the packed 10:10:10:2 channels and scales each integer channel to the PNG byte range using the existing bitmask conversion path. The texture exporter documentation now lists this format as supported.

DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format

Validation: Python AST parsing and git diff --check passed. No tests were run.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5511175948 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2320). Originally posted by [ZroIsHere](https://github.com/ZroIsHere) on 2026-11-26T13:46:15Z. --- Adds PNG preview support for DXGI_FORMAT_R10G10B10A2_UINT. The decoder extracts the packed 10:10:10:2 channels and scales each integer channel to the PNG byte range using the existing bitmask conversion path. The texture exporter documentation now lists this format as supported. DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format Validation: Python AST parsing and `git diff --check` passed. No tests were run.
aslan2142 commented 2026-11-26 18:29:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T18:29:02Z.


Merged through the integration PR #2394 (DDS preview formats batch), as head 943bba2dd, with a merge commit, so your commits stay yours.

Added on top:

  • Test: a synthetic R10G10B10A2_UINT test, checked against the UNORM decode of the same texels.
  • Test update: two test_tex_export.py cases had used DXGI 25 as an undecodable format, and your change made it decodable. They now use R8G8B8A8_UINT (30).

Thanks @ZroIsHere.

AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200513850 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2320#issuecomment-7200513850). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T18:29:02Z. --- Merged through the integration PR #2394 (DDS preview formats batch), as head `943bba2dd`, with a merge commit, so your commits stay yours. Added on top: - **Test:** a synthetic R10G10B10A2_UINT test, checked against the UNORM decode of the same texels. - **Test update:** two `test_tex_export.py` cases had used DXGI 25 as an undecodable format, and your change made it decodable. They now use R8G8B8A8_UINT (30). Thanks @ZroIsHere. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2320
No description provided.