Commit Graph

15 Commits

Author SHA1 Message Date
993dff588f Merge pull request #3176 from Marco Luzzaro 2026-11-22 15:15:27 -05:00
f847748cc7 Merge origin/main (7 pull requests merged on GitHub)
# Conflicts:
#	docs/design.md
#	tools/psin_data.py
2026-11-22 14:46:26 -05:00
7768de3ce2 Report texture index output directory errors 2026-11-22 20:36:01 +01:00
ac44474cac fix(tools): retain small textures in the descriptor index
The minimum-size heuristic discarded small textures before the exporter could read their descriptors.
2026-11-22 19:10:57 +01:00
d041ba4664 fix(tools): encode DDS pitch and top mip size correctly
The DDS header describes a single uncompressed row or the top compressed level. Recording the complete payload misstates those layouts when lower mips or multiple slices follow.
2026-11-22 18:22:49 +01:00
15326e84f4 tex_headers: refuse report destinations that overwrite input manifests 2026-11-22 16:59:53 +05:30
0848764046 tex_headers: a malformed carve index.json is one ERROR line, not a traceback
scan_archive() read index.json's "files" rows unchecked, so an index of
the wrong shape ({}, {"files": "oops"}, rows without off/head) ended in
a KeyError or TypeError traceback after the carve had finished. main()
now reports it as 'ERROR: cannot read <path>: <reason>' with exit 2, as
gamedata_index.main() does, before writing anything.

Found by @ray3242.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:47:59 -06:00
638c407735 tex_headers: R11G11B10 and R10G10B10A2 map to GFX10 36/50/54, not 43/44/48
GFX10 format names list channel widths from the top bit, so R11G11B10_FLOAT
(red in bits 10:0) is 10_11_11_FLOAT (36) and R10G10B10A2 is 2_10_10_10 (50,
54), as runtime/src/gfx10_descriptors.h already uses. 11_11_10_FLOAT (43) and
10_10_10_2 (44, 48) have no DXGI twin.
2026-11-22 12:07:10 +05:30
8915480d17 tex_headers: create the --out folder instead of losing a finished scan
main() opened the output path directly after walking every carved archive, so
naming a file in a folder that does not exist ended the run in a
FileNotFoundError traceback with the results already computed. Create the
parent folder first, as #941/#966 and navmesh_index (#1009) do.

Tests: CliInputTest runs the tool with --out under missing nested folders and
requires exit 0 plus the JSON on disk. Negative control on main: that case
fails; with the change 56/56 pass.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-21 23:45:20 -06:00
fee6c26fa4 Fix DDS cubemap array size 2026-11-21 21:19:09 -05:00
569d4aa33a Textures: decode all 697 TTPF 2D arrays, streaming cubemaps and 3D volumes (ASSET-36) 2026-11-21 21:31:04 -03:00
ba977f5a71 tex_headers.py: check the carve folder and --archives names before scanning
A missing carve folder ended in a FileNotFoundError traceback from os.listdir, and an --archives name without
an index.json in a traceback from scan_archive, after earlier archives had already been scanned. A folder with
no carved archive at all wrote an empty textures_index.json. All three are now usage errors (exit 2) and
nothing is written.

Tests: CliInputTest in tests/test_tex_headers.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:36:38 +03:00
0589fb5a37 Textures: share the compact layout and record the after split 2026-11-21 21:23:48 +00:00
ab5e88950e tools, tests: add stdlib paths for tex_headers and rtti_scan and un-skip CI tests 2026-11-21 17:18:04 -03:00
9755e72780 test(tools): add DDS synthesis, mip calculations, and GFX10 format mapping tests for tex_headers 2026-11-21 19:08:22 +01:00