Commit Graph

2 Commits

Author SHA1 Message Date
635bab171f tools/scripts: the eight remaining __main__ blocks set errors=replace on stdout
test_tool_stdout_encoding fails on main: leonida_launcher, ps_prompt_glyphs,
victory_saves, volume_stats, world_hotspots, fetch_vkd3d_proton, port_ctl and
sync_victory still print paths a Windows ANSI code page cannot encode, and die
with UnicodeEncodeError when stdout is redirected under python -I. Add the
same one-line guard the other programs already have (exe_sha.py, #605).

Tested: test_tool_stdout_encoding (4 tests), test_tool_startup,
test_victory_saves, compileall, run_semantic_tests (6397 tests, 0 failed).
AI-assisted: yes (Qwen Code).
2026-11-28 03:49:04 +03:00
526c8080c7 leonida-gpu: LEONIDA_DUMP_VOLUMES saves the 33^3 and 64^3 colour tables and their statistics
Cause: not found. Since the renderer merge the composite pass shows bands
spaced like a 33-entry log shaper; whether the tables the title loads are
themselves stepped, or the host copy is, was not visible.

Evidence: the merge changed no detiling (leonida-formats untouched) and in
texture.rs only the one-shot bake refresh ("exact"), a movie-plane upload
path and staging admission (residency); nothing 3D-specific.

Change: with LEONIDA_CAPTURE=<folder> and LEONIDA_DUMP_VOLUMES=1
(diagnostics builds), the first time a list samples a 33^3 or 64^3
R16G16B16A16_FLOAT Texture3D, and 600 frames later, it is read back at the
present and written as volume-<w>x<h>x<d>-<frame>-<n>.bin (raw half floats,
RGBA, x fastest), with a log line: distinct and all-zero texels and the share
of equal neighbour pairs per axis. tools/volume_stats.py prints the same.

Checked: unit test of the statistics (cargo test -p leonida-gpu --features
diagnostics volume_stats) and of the script on synthetic tables; not run
against the game. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:22:32 -05:00