GPU: list only pipelines retained by the host library as prebuilt #2336

Open
github-bot wants to merge 4 commits from github-bot/gh-2336 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 10:56 UTC · original
andrewpozdnakov7-jpg:codex2/prebuilt-requires-library-entry → main · +187 −22 · 3 files · 4 commits · open

Prebuild::make used to record every successfully created host PSO in prebuilt-pipelines.txt, even when D3D12 refused StorePipeline. A later prebuild would skip that key although the library could not load the PSO. StorePipeline can refuse an existing name or fail to allocate storage. D3D12 API

The library now reports whether it loaded or stored the PSO. Prebuild adds the title key only in those cases. A PSO that was successfully created remains usable after a refused store.

The same synthetic Windows/WARP test on 940d32f and this patch seeded a conflicting library name. The incoming compute PSO was created and StorePipeline returned E_INVALIDARG. On 940d32f, prebuild listed that key. With the change, the refused key stayed pending and the successfully stored control was the only key in the saved list. The focused pipeline suite passed 17 tests. The full GPU suite on app-local WARP passed 147 project tests with 2 ignored. Strict GPU Clippy with and without diagnostics and the staged asset policy passed.

Coordination claim

Please retain the Git author when reapplying this change. If you fold it into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 10:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/2336) `andrewpozdnakov7-jpg:codex2/prebuilt-requires-library-entry` → `main` · +187 −22 · 3 files · 4 commits · open `Prebuild::make` used to record every successfully created host PSO in `prebuilt-pipelines.txt`, even when D3D12 refused `StorePipeline`. A later prebuild would skip that key although the library could not load the PSO. `StorePipeline` can refuse an existing name or fail to allocate storage. [D3D12 API](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12pipelinelibrary-storepipeline) The library now reports whether it loaded or stored the PSO. Prebuild adds the title key only in those cases. A PSO that was successfully created remains usable after a refused store. The same synthetic Windows/WARP test on `940d32f` and this patch seeded a conflicting library name. The incoming compute PSO was created and `StorePipeline` returned `E_INVALIDARG`. On `940d32f`, prebuild listed that key. With the change, the refused key stayed pending and the successfully stored control was the only key in the saved list. The focused pipeline suite passed 17 tests. The full GPU suite on app-local WARP passed 147 project tests with 2 ignored. Strict GPU Clippy with and without diagnostics and the staged asset policy passed. [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) Please retain the Git author when reapplying this change. If you fold it into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:40 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 13:11 UTC · original

@⁠DenRakEiw thanks for the failure report. bc52643 switches the fixture from FXC cs_5_1 to the same synthetic SM 6.6 DXIL emission path prebuild uses. The child now reports its last phase and Windows exit status if it stops early.

The original ac424bf ran on local app-local WARP. Inbox WARP on this machine skipped at the directly indexed root signature. The updated fixture reaches the real duplicate-name StorePipeline refusal on 940d32f, where it fails because the refused key is marked prebuilt. On bc52643 the same fixture persists only the successfully stored key. The full app-local WARP suite passed 147 project tests (0 failures, 2 ignored). Strict Clippy passed with and without diagnostics, and the asset policy passed.

Could you rerun this test on the RTX 5090 at the new head? If it still stops early, the phase and exit status will narrow it down. For a forced software run, victory-gpu reads VICTORY_D3D12_WARP=1 when built with --features diagnostics.

AI-assisted with Codex. Synthetic shaders only.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 13:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/2336#issuecomment-7163411243) @⁠DenRakEiw thanks for the failure report. [bc52643](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/bc526438ca25b521fd81b548c2a314f5ca44ce52) switches the fixture from FXC `cs_5_1` to the same synthetic SM 6.6 DXIL emission path prebuild uses. The child now reports its last phase and Windows exit status if it stops early. The original `ac424bf` ran on local app-local WARP. Inbox WARP on this machine skipped at the directly indexed root signature. The updated fixture reaches the real duplicate-name `StorePipeline` refusal on `940d32f`, where it fails because the refused key is marked prebuilt. On `bc52643` the same fixture persists only the successfully stored key. The full app-local WARP suite passed 147 project tests (0 failures, 2 ignored). Strict Clippy passed with and without diagnostics, and the asset policy passed. Could you rerun this test on the RTX 5090 at the new head? If it still stops early, the phase and exit status will narrow it down. For a forced software run, `victory-gpu` reads `VICTORY_D3D12_WARP=1` when built with `--features diagnostics`. AI-assisted with Codex. Synthetic shaders only.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 15:23 UTC · original · edited 2026-11-26 00:20 UTC

Automated triage for the maintainers.

Merge candidate. library::pipeline (crates/victory-gpu/src/pipeline/library.rs) now returns a PipelineState that says whether the PSO was loaded from the library or stored in it, and Prebuild::make (pipeline.rs) lists a key as prebuilt only in that case. A PSO whose StorePipeline was refused stays pending and is still used. The merge with the depth-bounds stream builders in pipeline/host.rs passes the result through stream_pipeline and every HostPipeline constructor.

On your reply: the conflict resolution looks right. The new test re-runs its own test binary as a child process for the device's process-wide cache, which is the same pattern existing tests on main use. CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 15:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2336#issuecomment-7166778707) · edited 2026-11-26 00:20 UTC <!-- victory-triage v1 head=daa944a7b659104ab61f23375cbeabef936a9cf0 verdict=merge-candidate at=2026-11-26T00:20:26Z --> Automated triage for the maintainers. **Merge candidate.** `library::pipeline` (`crates/victory-gpu/src/pipeline/library.rs`) now returns a `PipelineState` that says whether the PSO was loaded from the library or stored in it, and `Prebuild::make` (`pipeline.rs`) lists a key as prebuilt only in that case. A PSO whose `StorePipeline` was refused stays pending and is still used. The merge with the depth-bounds stream builders in `pipeline/host.rs` passes the result through `stream_pipeline` and every `HostPipeline` constructor. On your reply: the conflict resolution looks right. The new test re-runs its own test binary as a child process for the device's process-wide cache, which is the same pattern existing tests on `main` use. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 22:55 UTC · original

The #158 depth-bounds merge conflicted with the pipeline-library result in pipeline/host.rs. I resolved it in daa944a on 842b0cb. The new vertex and mesh stream builders still choose the depth-stencil state based on host support and now carry through the library result.

On app-local WARP, the existing cache fixture confirmed that the stored key was persisted and the refused PSO remained pending. Both upstream depth-bounds tests passed in the same GPU suite, which finished with 247 passed and one ignored. Strict GPU Clippy in both configurations and the staged asset policy passed.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 22:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2336#issuecomment-7176948433) The #158 depth-bounds merge conflicted with the pipeline-library result in `pipeline/host.rs`. I resolved it in [`daa944a`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/daa944a7b659104ab61f23375cbeabef936a9cf0) on `842b0cb`. The new vertex and mesh stream builders still choose the depth-stencil state based on host support and now carry through the library result. On app-local WARP, the existing cache fixture confirmed that the stored key was persisted and the refused PSO remained pending. Both upstream depth-bounds tests passed in the same GPU suite, which finished with 247 passed and one ignored. Strict GPU Clippy in both configurations and the staged asset policy passed.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 00:46 UTC · original

Code review and RTX 5090 + WARP verification at head daa944a7b659 merged cleanly onto main (63bcca43c6a0):

  • Code review (library.rs:258-300, pipeline/host.rs, pipeline.rs:672-674):
    • PipelineState { pso, in_library } accurately threads library retention across all three pipeline paths (compute, mesh, graphics): false when no library exists, true on load hit, and StorePipeline(...).is_ok() on fresh compile (without incrementing l.added on failure such as E_INVALIDARG).
    • Prebuild::make() calls library::note_prebuilt(key) only when pipeline.in_library is true, keeping prebuilt-pipelines.txt consistent with the saved ID3D12PipelineLibrary1 blob across cold and incremental warm runs so refused pipelines are not falsely skipped later.
  • Verified (Windows 11, NVIDIA RTX 5090 + WARP, VICTORY_D3D12_DEBUG=1, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy --locked -p victory-gpu --tests -- -D warnings (default + --features diagnostics): 0 warnings
    • pipeline::: 24/24 passed default on RTX 5090; 27/27 passed (--features diagnostics) on both RTX 5090 and WARP
    • Confirmed a_host_pipeline_refused_by_the_library_is_not_listed_as_prebuilt executed end-to-end (unskipped) on both RTX 5090 and WARP through SM 6.6 DXIL compilation, StorePipeline E_INVALIDARG refusal, save, and prebuilt-pipelines.txt check.

LGTM.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 00:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2336#issuecomment-7179101537) Code review and RTX 5090 + WARP verification at head `daa944a7b659` merged cleanly onto `main` (`63bcca43c6a0`): - **Code review (`library.rs:258-300`, `pipeline/host.rs`, `pipeline.rs:672-674`)**: - `PipelineState { pso, in_library }` accurately threads library retention across all three pipeline paths (compute, mesh, graphics): `false` when no library exists, `true` on `load` hit, and `StorePipeline(...).is_ok()` on fresh compile (without incrementing `l.added` on failure such as `E_INVALIDARG`). - `Prebuild::make()` calls `library::note_prebuilt(key)` only when `pipeline.in_library` is `true`, keeping `prebuilt-pipelines.txt` consistent with the saved `ID3D12PipelineLibrary1` blob across cold and incremental warm runs so refused pipelines are not falsely skipped later. - **Verified (Windows 11, NVIDIA RTX 5090 + WARP, `VICTORY_D3D12_DEBUG=1`, Rust 1.98.1)**: - `cargo xtask policy`: `191 files ok`; `cargo clippy --locked -p victory-gpu --tests -- -D warnings` (default + `--features diagnostics`): 0 warnings - `pipeline::`: **24/24 passed** default on RTX 5090; **27/27 passed** (`--features diagnostics`) on both RTX 5090 and WARP - Confirmed `a_host_pipeline_refused_by_the_library_is_not_listed_as_prebuilt` executed end-to-end (unskipped) on both RTX 5090 and WARP through SM 6.6 DXIL compilation, `StorePipeline` `E_INVALIDARG` refusal, save, and `prebuilt-pipelines.txt` check. LGTM.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2336/head:github-bot/gh-2336'
git switch 'github-bot/gh-2336'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2336'
git switch 'github-bot/gh-2336'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2336'
git switch 'github-bot/gh-2336'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2336'
git switch 'main'
git merge --squash 'github-bot/gh-2336'
git switch 'main'
git merge --ff-only 'github-bot/gh-2336'
git switch 'main'
git merge 'github-bot/gh-2336'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2336
No description provided.