dds_png: preview signed and unsigned BC6H textures #2248

Open
github-bot wants to merge 1 commit from github-bot/gh-2248 into main AGit
Owner

@⁠kirigayakazima on GitHub · 2026-11-26 10:23 UTC · original
kirigayakazima:codex/dds-png-bc6h-preview → main · +37 −14 · 3 files · 1 commits · open

Claimed in the coordination issue as: DDS-PNG-BC6H-PREVIEW

Depends on: #140 (overlapping changes in the existing BC7 decoder). #2247 (adjacent format-dispatch cases; keep both handlers when merging). Each branch builds directly on main. These references flag textual merge conflicts.

What and why

Decode signed and unsigned BC6H subresources using the repository’s BC6H block decoder. Reuse the BC7 block traversal and cache, clip blocks at texture edges and map linear RGB to the eight-bit preview range. The synthetic fixtures cover both signedness variants and an incomplete block.

Tested

Windows, Python 3.14.7. The regression failed on the parent commit and passed with this change.

  • python -I tests/test_dds_subresources.py
  • python -I tests/test_dds_png.py
  • python -I tests/test_ttpf_mips.py
  • git diff --check and the changed-path no-game-data scan passed.
  • Shared main baseline: 498 semantic test files, 6,351 tests passed.

GPUs tested: N/A (synthetic CPU tests).

AI-assisted: Yes.

Checklist

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.
**@⁠kirigayakazima** on GitHub · 2026-11-26 10:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2248) `kirigayakazima:codex/dds-png-bc6h-preview` → `main` · +37 −14 · 3 files · 1 commits · open Claimed in the coordination issue as: [DDS-PNG-BC6H-PREVIEW](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) Depends on: #140 (overlapping changes in the existing BC7 decoder). #2247 (adjacent format-dispatch cases; keep both handlers when merging). Each branch builds directly on main. These references flag textual merge conflicts. ### What and why Decode signed and unsigned BC6H subresources using the repository’s BC6H block decoder. Reuse the BC7 block traversal and cache, clip blocks at texture edges and map linear RGB to the eight-bit preview range. The synthetic fixtures cover both signedness variants and an incomplete block. ### Tested Windows, Python 3.14.7. The regression failed on the parent commit and passed with this change. - `python -I tests/test_dds_subresources.py` - `python -I tests/test_dds_png.py` - `python -I tests/test_ttpf_mips.py` - `git diff --check` and the changed-path no-game-data scan passed. - Shared main baseline: 498 semantic test files, 6,351 tests passed. GPUs tested: N/A (synthetic CPU tests). AI-assisted: Yes. ### Checklist - [x] Based on current main and merges cleanly with the tested base. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract table: N/A.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:24:26 +00:00
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:42 UTC · original

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_dds_png.py + tests/test_dds_subresources.py: 114 passed, 173 subtests passed (main: 113 passed, 172 subtests).

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2248#issuecomment-7189728430) Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_dds_png.py` + `tests/test_dds_subresources.py`: 114 passed, 173 subtests passed (main: 113 passed, 172 subtests). (AI-assisted test run; output checked by hand.)
Author
Owner

@⁠lixonik on GitHub · 2026-11-26 11:08 UTC · original · reviewed

Windows 11: 100 DDS/PNG tests and 14 subresource tests passed. I also ran the isolated CLI on authored BC6H UF16 and SF16 blocks, verified metadata plus the exact 4×4 PNG pixels, and checked rejection of typeless BC6H. No findings from these checks.

AI-assisted.

**@⁠lixonik** on GitHub · 2026-11-26 11:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2248#pullrequestreview-6073066089) · **reviewed** Windows 11: 100 DDS/PNG tests and 14 subresource tests passed. I also ran the isolated CLI on authored BC6H UF16 and SF16 blocks, verified metadata plus the exact 4×4 PNG pixels, and checked rejection of typeless BC6H. No findings from these checks. AI-assisted.
This pull request has changes conflicting with the target branch.
  • tools/dds_png.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2248/head:github-bot/gh-2248'
git switch 'github-bot/gh-2248'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2248'
git switch 'github-bot/gh-2248'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2248'
git switch 'github-bot/gh-2248'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2248'
git switch 'main'
git merge --squash 'github-bot/gh-2248'
git switch 'main'
git merge --ff-only 'github-bot/gh-2248'
git switch 'main'
git merge 'github-bot/gh-2248'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.