[integration] DDS preview formats: R8/RG8, RGBA16 UNORM/SNORM, R9G9B9E5, B5 packed, R10G10B10A2 UINT/TYPELESS (INTEGRATION-ZRO-DRAFTS) #2394
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2394
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2394/head"
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?
@aslan2142 on GitHub · 2026-11-26 18:28 UTC · original
aslan2142:integration/dds-preview-formats→main· +356 −24 · 6 files · 24 commits · merged 2026-11-26 18:28 UTCOne 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: #1608 (
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)
@aslan2142 on GitHub · 2026-11-26 18:28 UTC · original
Merging. This is a self-merge of an integration batch.
tex_export --pngpath for R9G9B9E5 that @ecox982745 pointed out, and a fix for two existing tests that used a format as undecodable which #2320 makes decodable.mainbdbc7e923+ this branch (a28d96796), Linux, Python 3.13:test_ci_registration.pyandtest_text_write_line_endings.pypass.main's tools: 16 fail, so every new test fails onmain.compileall,make_game.py --helpandcheck_no_game_data.pyon the changed files are clean.dds_png.pybuttex_export --pngcannot reach them yet; the description says which.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
@ecox982745 on GitHub · 2026-11-26 18:49 UTC · original
On native Windows 11 x64 with Python 3.13.18, the ten texture test files listed above gave 500 passed, 6 skipped, with all 515 subtests passing on merged main
e57bc63bc5. The R9G9B9E5 test exercised the synthetic index → DDS → PNG export and checked the actual pixels. The skips were two symlink cases, one POSIX file-mode case, and three cases requiring optional native tools.I also checked three decoders through
dds_to_png_bytes, reading the emitted PNG with Pillow. Every synthetic DDS row had seven padding bytes between it and the next row.The two B5 checks use the DDS decoder directly. All results here are CPU-only synthetic texture checks.