perf(gpu): skip stale cross-build pipeline libraries via translator-version guard (Wave 7A) #421

Merged
Androtim merged 1 commit from upstream-pr/421 into main 2026-12-04 05:21:25 +00:00
Androtim commented 2026-12-04 04:11:36 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T04:11:36Z.


Summary

Ported the Darner 34b0ba7 (#188, GPL-3.0) pipeline library translator-version guard:

  • Expose shader_cache::translator_id() (env!(VICTORY_TRANSLATOR)) in crates/victory-gpu/src/shader_cache.rs.
  • Write host-pipelines.translator alongside host-pipelines.bin/.next on every replace_library() and supersede any existing pending host-pipelines.next in crates/victory-gpu/src/pipeline/library.rs.
  • Skip loading a pipeline library written by a different translator build (starting an empty one instead to avoid multi-hour stale-library preload hangs), while keeping VICTORY_LIBRARY_KEEP_OLD=1 as an explicit opt-in.

Scope Update

  • Rebased cleanly onto origin/main (d34843d, preserving SHADER_CACHE_VERSION = 5 from #381).
  • Dropped the Agility SDK D3D12SDKVersion = 0 change (apps/victory/src/main.rs and apps/victory/build.rs) following Gate 2 audit 19099679, as MiniVI already uses the strictly superior os_runtime() + /DELAYLOAD:d3d12.dll implementation.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib pipeline::library — 17 passed, 0 failed
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib shader_cache — 11 passed, 0 failed
  • cargo +1.98.1-x86_64-pc-windows-gnu xtask policy — asset policy: 365 files ok
  • cargo +1.98.1-x86_64-pc-windows-gnu check --workspace — passed
<!-- greyfinch-sync:Androtim/MiniVI:issue:5640051531 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/421). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T04:11:36Z. --- ## Summary Ported the **Darner `34b0ba7` (#188, GPL-3.0)** pipeline library translator-version guard: - Expose `shader_cache::translator_id()` (`env!(VICTORY_TRANSLATOR)`) in `crates/victory-gpu/src/shader_cache.rs`. - Write `host-pipelines.translator` alongside `host-pipelines.bin`/`.next` on every `replace_library()` and supersede any existing pending `host-pipelines.next` in `crates/victory-gpu/src/pipeline/library.rs`. - Skip loading a pipeline library written by a different translator build (starting an empty one instead to avoid multi-hour stale-library preload hangs), while keeping `VICTORY_LIBRARY_KEEP_OLD=1` as an explicit opt-in. ## Scope Update - Rebased cleanly onto `origin/main` (`d34843d`, preserving `SHADER_CACHE_VERSION = 5` from #381). - Dropped the Agility SDK `D3D12SDKVersion = 0` change (`apps/victory/src/main.rs` and `apps/victory/build.rs`) following Gate 2 audit `19099679`, as MiniVI already uses the strictly superior `os_runtime()` + `/DELAYLOAD:d3d12.dll` implementation. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib pipeline::library` — 17 passed, 0 failed - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib shader_cache` — 11 passed, 0 failed - `cargo +1.98.1-x86_64-pc-windows-gnu xtask policy` — `asset policy: 365 files ok` - `cargo +1.98.1-x86_64-pc-windows-gnu check --workspace` — passed
Androtim commented 2026-12-04 04:31:57 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T04:31:57Z.


Triage (105c4bd6, CI IN_PROGRESS):

  • Clean, tightly scoped Wave 7A port (+100/-2 across pipeline/library.rs + shader_cache.rs, default-on guard with VICTORY_LIBRARY_KEEP_OLD=1 kill-switch): writes host-pipelines.translator alongside host-pipelines.bin/.next and skips stale cross-build pipeline libraries (great pairing with #381's SHADER_CACHE_VERSION = 5 bump before cutting v2026.12.04.05!).
  • Holding auto-merge for green CI + Gate 2 re-signoff (#282) / quick Gate 3 cross-build upgrade smoke test.
<!-- greyfinch-sync:Androtim/MiniVI:comment:7401336828 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/421#issuecomment-7401336828). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T04:31:57Z. --- Triage (`105c4bd6`, CI `IN_PROGRESS`): - Clean, tightly scoped Wave 7A port (`+100/-2` across `pipeline/library.rs` + `shader_cache.rs`, default-on guard with `VICTORY_LIBRARY_KEEP_OLD=1` kill-switch): writes `host-pipelines.translator` alongside `host-pipelines.bin`/`.next` and skips stale cross-build pipeline libraries (great pairing with `#381`'s `SHADER_CACHE_VERSION = 5` bump before cutting `v2026.12.04.05`!). - Holding auto-merge for green CI + Gate 2 re-signoff (`#282`) / quick Gate 3 cross-build upgrade smoke test.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
Androtim/MiniVI!421
No description provided.