mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
nvn_tex.c multiplied a level's width by its samples and its blocks by their bytes in 32 bits, and nvn_tex_linear_stride did the same: a descriptor with a width past 2^30 (garbled, or not set up yet) wrapped to a small size, and the texture got a small allocation for a large image. Block counts, row bytes and GOB counts are now 64-bit (mip, blk, pick_tile and adj_tile take 64-bit sizes), and the linear stride saturates at 2^32 - 1 instead of wrapping. Real textures lay out as before. Checked: --probe-nvn-tex gains two cases (an RGBA8 texture 2^30 + 64 texels wide, and its linear stride). Before, the first failed: 2,048 bytes against 2^35 + 2,048. After, all 135 cases pass, the 40 layout goldens of the original SDK among them; --probe-nvn shows the same four failures as the baseline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 KiB
10 KiB