diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 03:57:05 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 08:29:34 -0300 |
| commit | 02f84b4e0292019e092b85128391309e99137d4a (patch) | |
| tree | 19469e3b6931aa163f8cbe58bcd37a81d121c483 /runtime/test/loader_test.cpp | |
| parent | bb2e18421dac527374eb837c88b5063c5d96f81f (diff) | |
amd_swizzle: detile each pattern table with its own block size
The CLI built every equation with 16 address bits and laid blocks out 64 KB apart, whatever table
--modes picked, so a 4K (or 256-byte) table was detiled as if it were 64 KB. --modes also matched
by substring, so "4K" or "4K_S" picked every 64K table as well, and those won. Each table now
gets its block size from its name (256 -> 8 bits, 4K -> 12, 64K -> 16, the values
tex_mode_probe.py already uses), detile() takes block_bytes, and --modes matches whole name parts.
The default (64K) behaves as before.
Real data (counts and scores only, samples deleted afterwards): three 512x512 BC1 textures that
tex_export.py exports as SW_4K_S. With --modes 4K_S, main's best candidates are SW_64K_S_T /
SW_64K_S (scores 15.04 / 14.10 / 53.32); with this change SW_4K_S (14.13 / 12.26 / 52.55), and its
detiled blocks are byte-identical to tex_export.detile_offsets on all three.
Tests: test_cli_detiles_4k_tables_with_4k_blocks tiles a gradient in 4 KB blocks under a synthetic
header with the same entry in a 4K and a 64K table (main: both tables listed, score 3.81 instead
of the gradient's own).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/loader_test.cpp')
0 files changed, 0 insertions, 0 deletions