diff options
| author | simonbronk <275178677+simonbronk@users.noreply.github.com> | 2026-11-21 22:07:09 +0100 |
|---|---|---|
| committer | simonbronk <275178677+simonbronk@users.noreply.github.com> | 2026-11-21 22:07:09 +0100 |
| commit | 30267d09b5cb830cfc461384a2ed4d51c551f236 (patch) | |
| tree | 5348d04548572163fab79eed93ea6d6eee1733b0 /runtime/src/tls_host.cpp | |
| parent | aae4d99e10784eb21b4f14d08470c79613b9e7fe (diff) | |
tex_export: read the addrlib patterns on first use; add tests
tex_export.py called amd_swizzle.load() at import, so the module could not
be imported (or tested) without Mesa's gfx10SwizzlePattern.h. The patterns
are now read once, on the first eq4k call; behaviour is otherwise unchanged.
tests/test_tex_export.py (pytest, skipped without numpy) covers, on
synthetic swizzle equations and textures, with no game data or header:
eq4k picking the entry per bpe and reading the patterns once; detile
offsets (row-major for a linear equation, a permutation of whole tiles,
partial tiles padded); the DX10 DDS header; export_one choosing the top mip
at the data offset or at the end of the mip chain on both scoring paths
(Pillow and raw bytes), gpu_chain reassembly, the blob cache, unsupported
formats and data outside the blob; and main()'s log, ordering and --limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions