upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/test_run_gpu_tests_python_assembler.py
diff options
context:
space:
mode:
authorsyfyra <258908070+syfyra@users.noreply.github.com>2026-11-26 12:28:44 +0100
committersyfyra <258908070+syfyra@users.noreply.github.com>2026-11-26 12:28:44 +0100
commita80bb68f75918ca3faf711b7da78030157ece700 (patch)
treefce9b7d946a2894c6024f7fb5854090207c2a855 /tests/test_run_gpu_tests_python_assembler.py
parenta73a57e1339be072baf5522351c8ec7f1482b56b (diff)
calibrated_texture: crop NPOT mips to the DDS grid (CALIBRATED-TEXTURE-NPOT-DDS)
LocalDecoder.dds wrote every block of a mip's stored grid under a DDS header. For NPOT chains the stored grid is wider or taller than the DDS mip: 17x13 BC1 stores its 8x6 mip 1 as 3x2 blocks where DDS holds 2x2, so the payload was 208 bytes instead of 192 and a DDS reader saw every later mip shifted. ASSET-568 switched the compact branch to the stored grid to get the offsets right but dropped the crop. The mode-1 array branch kept the DDS grid instead, and addresses() takes its tile pitch from that grid, so a 513x520 BC7 array read mip 1 rows 64 and on from the wrong tile. Read each mip on its stored grid (which also gives the tile pitch) and keep only the DDS rows and columns, as ttpf_mips._visible_rows does for the regular export. Both cases now give the same bytes as ttpf_mips.texture_dds. Tested: new test_dds_npot_mips_are_cropped_to_the_dds_grid (fails before the fix in both cases, passes after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_run_gpu_tests_python_assembler.py')
0 files changed, 0 insertions, 0 deletions