Commit Graph

15 Commits

Author SHA1 Message Date
540e522b36 batch_glb: exit 2 for a bad input or output folder (BATCH-GLB-USAGE-EXIT-STATUS)
A missing input folder or an output path that cannot be created raised
ValueError/OSError in batch_convert and main returned 1, the code the
docstring reserves for a failed model. Those errors now return 2, like
argparse usage errors. Per-model errors are caught in convert_single and
still return 1.
2026-11-24 16:11:13 +01:00
b66e184ebe batch_glb: --textures must name a directory (#6747)
Squash-merged after diff review of PR #6747 - batch_glb: --textures must name a directory
2026-11-23 10:00:20 -06:00
26788df470 batch_glb: report matched textures left out for lack of UVs (#6874)
Squash-merged after diff review of PR #6874 - batch_glb: report matched textures left out for lack of UVs
2026-11-23 09:48:05 -06:00
8d88450ee2 Merge pull request #3960 from Wasler
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:56 -05:00
2feedae696 Merge pull request #3852 from bbareth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:55 -05:00
33905dc9dd Fix what the round-43 merges broke (pytest)
Merges that each passed alone but clash together:
- v_cmp_class_f64: the earlier cmp_class_f64 (685d16ed9) (operand-form checks, test_cmp_class_f64) and the later f64 branch
  in cmp_class both handled the opcode; f64 goes to cmp_class_f64 again, f16 stays in cmp_class.
- rdna2spirv CLI tests: spirv-as/spirv-val now run in the output folder with the staging file's bare name, so
  the test doubles resolve it against cwd; assemble_spirv decodes the output only when it is bytes. (The doubles
  had been writing .spirv-*.tmp files into the repository root.)
- ps_w64 fixtures (TEST-722): an 18th fixture (ps_w64_a_discard) landed; its killed lanes export nothing and
  keep the clear value.
- first_light: a run without an OBJ removes mesh.bin, and harness_env reads manifest["files"]; batch_glb's stats
  name failures and dropped textures; run_gpu_tests reports a frame never written as a missing readback
  (TEST-837).
- make_game TRANSLATION_SOURCES and runtime.yml's paths include spirv_opt.py and report_paths.py (and
  wave64_emulate_opt.py), which the translator imports.
Repo rules: stdout guard on six tools; encoding on two opens (gen_gdk_runtime_classes' helper is read_utf8);
newline on one write; anim_skeleton_match's joaat encodes like hashdict.joaat; test_feature_scan's new test is
listed with the others its globals() runner reaches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:07:41 -05:00
b23779d6a9 tests: pass errors=replace to subprocess pipes capturing python -I tools 2026-11-23 00:42:37 +02:00
4799d88d75 Reject invalid batch_glb CLI limits before conversion 2026-11-22 23:04:19 +01:00
6030a08930 Merge pull request #3337 from bobcatchris 2026-11-22 17:01:30 -05:00
c31de8d599 batch_glb: the texture cache is exclusive, an empty PNG is a failure, one drop line per texture
Review corrections (kacper-serewis, #3337):

- The (bytes, reason) cache is a TextureCache with its own lock: the pool
  runs one model per thread, so two workers reaching the same broken DDS
  both entered the decoder and the once-per-batch guarantee only held for
  sequential primitives. The new two-model test releases a Barrier of 2
  when a second thread gets in, so it fails on the unlocked shape.
- An empty PNG read returned (b'', ''): falsy, so not embedded, and with
  no reason, so not reported either. It is now 'the PNG file is empty'
  (and the same guard for a DDS decode that produced nothing).
- Two primitives of one model referencing the same broken DDS produced two
  identical dropped lines and counted twice; dropped is deduplicated per
  model by texture path.
2026-11-22 14:38:27 -06:00
d728b80c3e Merge pull request #3146 from airp1ane 2026-11-22 15:15:09 -05:00
d876da115a batch_glb: name dropped textures and failed models instead of passing silently
_load_png_bytes swallowed every DDS decode error and returned None, so a
model was written without its texture yet counted in converted N/N with
exit 0, while a PNG that could not be read failed the whole model; a failed
decode was not cached either, so every primitive retried it. batch_convert
also discarded convert_single's error string, counting a failed model
without naming it or saying why.

_load_png_bytes now returns (bytes, reason) and both the PNG read and the
DDS decode take the same path: the texture is left out of that model,
listed per model with its reason, counted in the summary (cached, so a
broken DDS is decoded once) and the exit code stays 1 only when a model
failed -- the fssm_unpack tolerance, made visible. main prints one line
per failed model and per unembedded texture.
2026-11-22 14:09:27 -06:00
23d231b8c6 batch_glb: report directory setup errors cleanly 2026-11-22 14:30:51 -05:00
adc064770a fix(assets): keep unnamed GLB material textures separate
A dotted OBJ filename and a named material can select different PNGs even when the clean filename stem matches the material name. Keeping the original empty key prevents either texture from replacing the other.
2026-11-22 19:20:11 +01:00
5394b8d548 tools: add multi-threaded batch glb converter with texture linking and bcpack inspector 2026-11-22 19:03:31 +03:00