mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #2394] [MERGED] [integration] DDS preview formats: R8/RG8, RGBA16 UNORM/SNORM, R9G9B9E5, B5 packed, R10G10B10A2 UINT/TYPELESS (INTEGRATION-ZRO-DRAFTS) #2396
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2396
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2394
Author: @aslan2142
Created: 11/26/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:integration/dds-preview-formats📝 Commits (10+)
26fd8ffdds_png: decode DXGI RGBA16 UNORM previews7286d78docs: list RGBA16 UNORM PNG previewsc4439f5dds_png: decode DXGI RGBA16 SNORM previewsd36c961dds_png: decode R9G9B9E5 shared exponent previews3e8c273dds_png: decode packed B5 color previews893f1a0dds_png: decode R8G8_SNORM previews81df9f5dds_png: decode R8G8 integer previewsc5efad4dds_png: preview R10G10B10A2 typeless943bba2Add R10G10B10A2_UINT PNG preview support4ba0afcAdd R8 integer PNG preview support📊 Changes
6 files changed (+356 additions, -24 deletions)
View changed files
📝
tests/test_dds_png_dx10.py(+109 -0)📝
tests/test_tex_export.py(+23 -7)📝
tests/test_tex_headers.py(+6 -0)📝
tools/dds_png.py(+211 -13)📝
tools/tex_export.py(+5 -3)📝
tools/tex_headers.py(+2 -1)📄 Description
One tested batch of DDS preview formats for
tools/dds_png.pyandtools/tex_export.py --png: 11 pull requests, merged one by one with a merge commit each, so the authors' commits stay theirs. Then one maintainer commit adds the missing tests and thetex_export --pngfix for R9G9B9E5.Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7200103121 (
INTEGRATION-ZRO-DRAFTS)Base:
mainatbdbc7e923.Included
f833599c87286d7823c4439f583d36c961c33e8c273d6893f1a0f481df9f5ed943bba2ddc5efad48c1c78f0fee4ba0afc2dWe checked each decoder against the format's definition:
mantissa * 2^(e - 24);The merges conflicted in the same format tables. Every format is kept, and each PR's new decoder function is byte-identical to its head.
Added by the maintainers (commit
a28d96796)tex_export --pngfor R9G9B9E5 (ecox982745's finding on #2218):tools/tex_headers.pynow lists DXGI 67 inDXGIandFMT_INFO. New tests:test_shared_exponent_r9g9b9e5_writes_a_pngfollows the texture from the index through the DDS to the PNG;test_shared_exponent_format_is_indexed_and_sizedchecks the indexer's table.test_tex_export.pycases used DXGI 25 as an undecodable format, and #2320 makes it decodable. They now use R8G8B8A8_UINT (30).len(T.FMT)is now 57.dds_png.pyandtex_export.py, instead of a line per PR.Left out
Tests
Linux, Python 3.13, CPU only, no GPU needed:
test_tex_export.py,test_dds_png.py,test_dds_png_dx10.py,test_dds_subresources.py,test_tex_headers.py,test_tex_headers_report_paths.py,test_ttpf_mips.py,test_ttpf_assets.py,test_calibrated_texture.py,test_calibrated_texture_extra.py.python3 -I, all OK:test_dds_png_dx10.py: 16 teststest_dds_png.py: 100test_dds_subresources.py: 13test_tex_headers.py: 78test_tex_headers_report_paths.py: 8test_ci_registration.py: 16test_text_write_line_endings.py: 3main: we ran the branch's three changed test files againstmain's tools. 16 tests fail: every new format test, the R9G9B9E5 export test, the indexer table test and theFMTcount.compileallis clean,make_game.py --helpruns, andcheck_no_game_data.pypasses on all six changed files.Not tested
restofworld_index.py: its own format table (commented "kept in step with tools/tex_headers.py") is unchanged.dds_png.py, but the indexer does not list them, sotex_export --pngcannot reach them. Thetex_exportdocstring no longer claims them.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.