6 Commits
Author SHA1 Message Date
arthurhfcardosoandClaude Sonnet 5.5 dd496bfd5d Encode decoded ASTC textures to BC3 on GPUs without ASTC (astc_bc)
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>
2026-10-31 07:27:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 97d3762ba1 Strip milestone and task labels from code comments and drop the dead gfx_stubs.c
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>
2026-10-27 13:12:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c4108c49a8 Map NVN's 16-bit packed formats with their components counted from the least significant bit, as NVN does for RGB10A2: RGB565 is B5G6R5, RGB5A1 is A1B5G5R5, and the old table, which took LAS Recomp's order, read the Depths terrain's normal and blend maps scrambled and stretched the ground textures along one axis
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>
2026-10-26 16:48:05 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9a859dfb2c Decode ASTC textures with a compute shader in the upload batch, or upload them natively where the device samples ASTC, behind TOTK_ASTC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 14:42:51 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f178be9eb2 Copy only the region of a ReadTexels or WriteTexels call instead of swizzling the whole texture level
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>
2026-10-25 14:12:43 +03:00
Valiantsin DzerakhandClaude Opus 5.5 19c9b648d1 Add the recompiler, Windows runtime, tools and docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:27:54 +03:00