dds_png: decode R8G8_SNORM previews #2317

Manually merged
github merged 1 commit from github-bot/gh-2317 into main 2026-11-26 18:35:45 +00:00 AGit
Owner

@⁠ZroIsHere on GitHub · 2026-11-26 13:46 UTC · original
ZroIsHere:fix/dds-png-rg8-snorm → main · +32 −2 · 2 files · 1 commits · merged 2026-11-26 18:28 UTC

Summary

Add DDS preview decoding for DXGI R8G8_SNORM (format 51). Map its signed red and green channels from [-1, 1] to 8-bit values, with blue set to zero and alpha set to 255. The minimum encoded value maps to -1 as required for signed normalized formats.

The decoder validates row pitch and truncated payloads. Update the tex_export.py help text to include the format.

Validation

  • git diff --check
  • Python AST parse
  • Tests not run.
**@⁠ZroIsHere** on GitHub · 2026-11-26 13:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2317) `ZroIsHere:fix/dds-png-rg8-snorm` → `main` · +32 −2 · 2 files · 1 commits · merged 2026-11-26 18:28 UTC ## Summary Add DDS preview decoding for DXGI R8G8_SNORM (format 51). Map its signed red and green channels from [-1, 1] to 8-bit values, with blue set to zero and alpha set to 255. The minimum encoded value maps to -1 as required for signed normalized formats. The decoder validates row pitch and truncated payloads. Update the tex_export.py help text to include the format. ## Validation - git diff --check - Python AST parse - Tests not run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:50:08 +00:00
github manually merged commit 5b94bbc966 into main 2026-11-26 18:35:45 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-26 18:29 UTC · original

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

  • Test added: a synthetic R8G8_SNORM test (-128, -127, 0, 127, ±64, ±1; padded rows; truncation).
  • Decoder: unchanged.

Thanks @⁠ZroIsHere.

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

**@⁠aslan2142** on GitHub · 2026-11-26 18:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2317#issuecomment-7200513184) Merged through the integration PR #2394 (DDS preview formats batch), as head `893f1a0f4`, with a merge commit, so your commits stay yours. - **Test added:** a synthetic R8G8_SNORM test (-128, -127, 0, 127, ±64, ±1; padded rows; truncation). - **Decoder:** unchanged. Thanks @⁠ZroIsHere. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
This discussion has been locked. Commenting is limited to contributors.
No description provided.