A GPU that cannot sample ASTC gets the textures decoded to RGBA8, four times the video memory of the ASTC blocks. With astc_bc = 1 (default 0, GPU decoder only) a second compute pass, bc3_encode.comp, encodes the decoded texels to BC3 and the image is BC3_UNORM or BC3_SRGB: 8 bits per texel instead of 32. The encoder is the usual bounding-box method with the box diagonal turned to the sign of the colour covariance, and the eight-value alpha mode.
A region of a WriteTexels that does not start on a 4x4 block corner is left as it was and logged. The setting is in totk.ini and the Advanced tab. The SPIR-V header was built with glslang 16.6 (build_shaders.py uses glslc) with the same source hash.
On a GTX 1650 (4 GiB) in the Fire Temple the GPU time per frame went from 10-23 ms to 3-12 ms and the frame rate held at 59-60 fps.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comments named the agent task (T1-T7, M2-M5, Task 2.x) that once owned each file or block, and pointed at local
notes the repository does not carry (backlog items, milestone plans, research notes). They now say what the code
does. gfx_stubs.c held weak stand-ins for functions that every build has defined for a long time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A1B5G5R5 needs VK_KHR_maintenance5, so RGB5A1 stands in as A1R5G5B5 with R and B swapped by the view swizzle (TexVkFormat.chan); RGBA4 and RGB565 fall back the same way to mandatory formats on devices that lack A4B4G4R4 or B5G6R5. RGB5 and BGR5 now sample alpha as 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A guest WriteTexels of a small region deswizzled and reswizzled the whole level while its thread held a virtual core
and the texture lock: 80 ms preemption delays and 50-160 ms frames in the monsters2 replay (frames 765-790,
1225-1235), with the render thread waiting on the texture lock. nvn_texels_box copies the box alone; probe-vkmem
compares it with the whole-level path on random boxes of five block sizes, mip levels, array layers and 3D slices.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>