batch_glb: allow independent texture decodes to overlap #1752
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1752
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/batch-glb-per-texture-decode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: BATCH-GLB-PER-TEXTURE-DECODE
What and why
TextureCache held its single registry lock while reading PNGs and decoding DDS files. Workers handling unrelated textures had to wait for each other. Each path and requested size now has its own lock and result. Callers sharing a key reuse the decode, including an ordinary decode failure. If the loader raises an unexpected exception, the next request can retry.
Tested
A two-worker barrier timed out on the baseline and completed on the branch. A second regression verified retries and two decode sizes for one path. The existing test still verifies exactly one DDS decode when two workers request the same broken texture.
python -I tests/test_batch_glb.pypassed all 18 tests on this branch (Windows, Python 3.14.7).git diff --checkand the repository game-data scan of all changed paths passed.bcaa13dapassed 6,287 semantic tests across 488 files.GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.
Checklist
#1752 | head 417b78bb6272afdcf3ca3a78e52edb827e201566 (merged cleanly with main 4a54aedcb) |
python -I tests/test_batch_glb.py| red on main:FAILED (failures=1, errors=1)(BrokenBarrierErrorunder single-lockTextureCacheand cached decode ignoringmax_size) | green on PR+main:18 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_TextureEntryandTextureCache.get_or_loadintools/batch_glb.py(keying cache entries by(path, max_size)with per-entry locking so distinct texture decodes overlap across worker threads, concurrent loads of the same key deduplicate, and unhandled exceptions leaveentry.resultunset for retry). Also verified clean merges (0conflicts) and combined execution with both #1750 (20 tests OK) and #1751 (19 tests OK), plustests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Tested
417b78bb6merged (no commit) withmainaa918e5d9: Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean.tests/test_batch_glb.py, 19 tests pass.tools/batch_glb.pyback tomain, 1 failure and 1 error ((b'full', '') != (b'small', '')).git merge-tree). I did not run the two together.No blocker from my side.
AI-assisted (Claude Code).
Merged after TheGeogeo's red/green check (check) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto
mainff9948f65 without conflict, and its test file(s) (tests/test_batch_glb.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.