[PR #19] [MERGED] Add slot-67 pipeline-library shader build and runtime loading #73

Closed
opened 2026-11-26 20:16:42 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/19
Author: @moffington
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: contrib/pipeline-library-upstream


📝 Commits (3)

  • 41478fc runtime: load pipeline-library shader index for slot 67
  • ee2b087 shaders: add library_shaders build stage and guard NONE compute states
  • 642880a shaders: translate pipeline library in parallel and align clash/doc details

📊 Changes

9 files changed (+695 additions, -15 deletions)

View changed files

📝 docs/fspx.md (+12 -3)
📝 docs/shader_library.md (+17 -2)
📝 make_game.py (+76 -4)
📝 runtime/src/shader_library.h (+9 -5)
📝 runtime/test/shader_library_test.cpp (+62 -0)
📝 tests/test_fspx_shaders_stage.py (+23 -0)
➕ tests/test_library_shaders_stage.py (+456 -0)
📝 tests/test_shader_library.py (+38 -0)
📝 tools/shader_library.py (+2 -1)

📄 Description

Add slot-67 pipeline-library shader build and runtime loading

Summary

Completes the pipeline-library shader path by connecting build-time extraction and translation with runtime shader lookup.

  • Load optional library/index.json alongside existing FSPX/BVH indexes.
  • Add library_shaders() to the game build pipeline, including caching, invalidation, and stale-artifact cleanup.
  • Fix a TypeError when compute pipeline records contain a NONE state index.
  • Add regression coverage for state-specific shader selection, index ordering, missing states, and cache cleanup.
  • Document the pipeline-library build and lookup behavior.

Validation

  • Python shader/build-stage regression suites: pass.
  • C++ shader_library CTest: pass.
  • Shader index verification: 16/16 checks pass.
  • Synthetic build-to-runtime round-trip: pass.
  • RTX 3060 Vulkan validation fixture: 8/8 cases pass.
  • Targeted mutation tests confirm regression coverage for index ordering and stale-state cleanup.

Limitations

Validation used synthetic shader inputs and a bounded Vulkan runtime fixture. Retail shaders.rpf processing and live Windows D3D12 slot-67 execution have not been verified.

One unrelated BVH test failure (ShadersStageWithTheDlls) also reproduces on the original baseline.


🔄 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/19 **Author:** [@moffington](https://github.com/moffington) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `contrib/pipeline-library-upstream` --- ### 📝 Commits (3) - [`41478fc`](https://github.com/ubiquitarianism/leonida/commit/41478fc0cadfd1972f4a8d274d6219d25765e67e) runtime: load pipeline-library shader index for slot 67 - [`ee2b087`](https://github.com/ubiquitarianism/leonida/commit/ee2b087b66867dbca03462f716c3ba37c48def51) shaders: add library_shaders build stage and guard NONE compute states - [`642880a`](https://github.com/ubiquitarianism/leonida/commit/642880a217f4fbed23b4de2746e27ab9834e3a0b) shaders: translate pipeline library in parallel and align clash/doc details ### 📊 Changes **9 files changed** (+695 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/fspx.md` (+12 -3) 📝 `docs/shader_library.md` (+17 -2) 📝 `make_game.py` (+76 -4) 📝 `runtime/src/shader_library.h` (+9 -5) 📝 `runtime/test/shader_library_test.cpp` (+62 -0) 📝 `tests/test_fspx_shaders_stage.py` (+23 -0) ➕ `tests/test_library_shaders_stage.py` (+456 -0) 📝 `tests/test_shader_library.py` (+38 -0) 📝 `tools/shader_library.py` (+2 -1) </details> ### 📄 Description ## Add slot-67 pipeline-library shader build and runtime loading ### Summary Completes the pipeline-library shader path by connecting build-time extraction and translation with runtime shader lookup. - Load optional `library/index.json` alongside existing FSPX/BVH indexes. - Add `library_shaders()` to the game build pipeline, including caching, invalidation, and stale-artifact cleanup. - Fix a `TypeError` when compute pipeline records contain a `NONE` state index. - Add regression coverage for state-specific shader selection, index ordering, missing states, and cache cleanup. - Document the pipeline-library build and lookup behavior. ### Validation - Python shader/build-stage regression suites: pass. - C++ `shader_library` CTest: pass. - Shader index verification: 16/16 checks pass. - Synthetic build-to-runtime round-trip: pass. - RTX 3060 Vulkan validation fixture: 8/8 cases pass. - Targeted mutation tests confirm regression coverage for index ordering and stale-state cleanup. ### Limitations Validation used synthetic shader inputs and a bounded Vulkan runtime fixture. Retail `shaders.rpf` processing and live Windows D3D12 slot-67 execution have not been verified. One unrelated BVH test failure (`ShadersStageWithTheDlls`) also reproduces on the original baseline. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:16:42 +01:00
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#73
No description provided.