[PR #1752] batch_glb: allow independent texture decodes to overlap #1768

Open
opened 2026-11-26 21:18:53 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1752
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/batch-glb-per-texture-decode


📝 Commits (1)

  • 417b78b batch_glb: allow independent texture decodes to overlap

📊 Changes

2 files changed (+44 additions, -4 deletions)

View changed files

📝 tests/test_batch_glb.py (+29 -0)
📝 tools/batch_glb.py (+15 -4)

📄 Description

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.py passed all 18 tests on this branch (Windows, Python 3.14.7).
  • git diff --check and the repository game-data scan of all changed paths passed.
  • The five independent changes were also merged locally. Both affected test files passed together (50 tests) and the three character-model consumer suites passed (28 tests). The shared base at bcaa13da passed 6,287 semantic tests across 488 files.

GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.

Checklist

  • Based on current upstream main.
  • One topic.
  • Only synthetic test fixtures. No game data, keys or decryption.
  • Translator contract table: N/A.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1752 **Author:** [@kirigayakazima](https://github.com/kirigayakazima) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/batch-glb-per-texture-decode` --- ### 📝 Commits (1) - [`417b78b`](https://github.com/ubiquitarianism/leonida/commit/417b78bb6272afdcf3ca3a78e52edb827e201566) batch_glb: allow independent texture decodes to overlap ### 📊 Changes **2 files changed** (+44 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_batch_glb.py` (+29 -0) 📝 `tools/batch_glb.py` (+15 -4) </details> ### 📄 Description Claimed in the coordination issue as: [BATCH-GLB-PER-TEXTURE-DECODE](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160621714) ### 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.py` passed all 18 tests on this branch (Windows, Python 3.14.7). - `git diff --check` and the repository game-data scan of all changed paths passed. - The five independent changes were also merged locally. Both affected test files passed together (50 tests) and the three character-model consumer suites passed (28 tests). The shared base at `bcaa13da` passed 6,287 semantic tests across 488 files. GPUs tested: N/A (CPU-only asset tooling). AI-assisted: Yes. ### Checklist - [x] Based on current upstream main. - [x] One topic. - [x] Only synthetic test fixtures. No game data, keys or decryption. - Translator contract table: N/A. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1768
No description provided.