Preserve static view instancing in VS/PS pipeline streams #2032

Closed
github-bot wants to merge 1 commit from gh-pr/2032/head into gh-pr/2032/base
Owner

@⁠DoubleD17 on GitHub · 2026-11-25 03:45 UTC · original
DoubleD17:port/fxceless-604 → main · +641 −27 · 3 files · 1 commits · closed without merging

The graphics pipeline stream parser advances past VIEW_INSTANCING without retaining the static view locations. Copy supported VS/PS viewport and render-target slice pairs into pipeline state, preserve their order in the library key, and use the D3D12 pipeline stream for creation and loading. On Windows 11 with D3D12 WARP (DXGI 1414:008C, View Instancing Tier 1), the same synthetic create_stream fixture changed the viewport case from 16/0 to 16/16 pixels and verified the two-slice case, distinct library keys, creation and reload, and the existing masked-descriptor fallback. Four pipeline tests also passed. Validation covers the synthetic WARP scenario.

Adapted from fxceless/victory-fork #604.

AI-assisted.

**@⁠DoubleD17** on GitHub · 2026-11-25 03:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/2032) `DoubleD17:port/fxceless-604` → `main` · +641 −27 · 3 files · 1 commits · closed without merging The graphics pipeline stream parser advances past VIEW_INSTANCING without retaining the static view locations. Copy supported VS/PS viewport and render-target slice pairs into pipeline state, preserve their order in the library key, and use the D3D12 pipeline stream for creation and loading. On Windows 11 with D3D12 WARP (DXGI 1414:008C, View Instancing Tier 1), the same synthetic create_stream fixture changed the viewport case from 16/0 to 16/16 pixels and verified the two-slice case, distinct library keys, creation and reload, and the existing masked-descriptor fallback. Four pipeline tests also passed. Validation covers the synthetic WARP scenario. Adapted from [fxceless/victory-fork #604](https://github.com/fxceless/victory-fork/pull/604). AI-assisted.
Adapt the static view handling and synthetic fixture from fxceless/victory-fork#604.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:52:11 +00:00
github-bot closed this pull request 2026-11-26 04:52:11 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:50 UTC · original

Triage verdict — Keep, add an adapter fallback before merge (ce61651)

Evidence

  • @⁠DoubleD17's patch preserves the ordered viewport and render-target slice pairs that the upstream VS/PS stream parser currently drops. The related depth-bounds PR #158 preserves a different subobject, and both changes touch the host stream builder.
  • The production branch uses the stream PSO for any nonempty view list. It does not check D3D12_OPTIONS3.ViewInstancingTier. Tier 0 does not support multiple views, so a pipeline that currently gets a single-view approximation can instead fail creation. The WARP fixture requires a supported tier and cannot exercise that fallback. PSO selection · WARP fixture · D3D12 capability tiers

Checks and limits

  • Independently ran the opt-in synthetic WARP regression on this head. Both viewport and array-slice readbacks matched, two pipeline-library reloads succeeded, and the masked-descriptor control passed. The regular pipeline group passed 16 tests, with the opt-in test run separately. Tier 0 and physical GPU behavior remain untested.

Next step

  • Keep the plain pipeline path for unsupported multiview requests or a failed capability query and add a regression for that selection. When integrating with #158, preserve both the ordered view locations and its depth-bounds state. The combined fixture in the source fork PR is a useful control for that integration.

This verification was AI-assisted.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2032#issuecomment-7152292874) **Triage verdict — Keep, add an adapter fallback before merge** (`ce61651`) **Evidence** - @⁠DoubleD17's patch preserves the ordered viewport and render-target slice pairs that the upstream VS/PS stream parser currently drops. The related depth-bounds PR #158 preserves a different subobject, and both changes touch the host stream builder. - The production branch uses the stream PSO for any nonempty view list. It does not check `D3D12_OPTIONS3.ViewInstancingTier`. Tier 0 does not support multiple views, so a pipeline that currently gets a single-view approximation can instead fail creation. The WARP fixture requires a supported tier and cannot exercise that fallback. [PSO selection](https://github.com/Marvisak/VIctory/blob/ce61651475023221c268ee84df5efacdc95d62ea/crates/victory-gpu/src/pipeline/host.rs#L673-L691) · [WARP fixture](https://github.com/Marvisak/VIctory/blob/ce61651475023221c268ee84df5efacdc95d62ea/crates/victory-gpu/src/pipeline/view_instancing_test.rs#L333-L359) · [D3D12 capability tiers](https://microsoft.github.io/DirectX-Specs/d3d/ViewInstancing.html#capability-exposure) **Checks and limits** - Independently ran the opt-in synthetic WARP regression on this head. Both viewport and array-slice readbacks matched, two pipeline-library reloads succeeded, and the masked-descriptor control passed. The regular pipeline group passed 16 tests, with the opt-in test run separately. Tier 0 and physical GPU behavior remain untested. **Next step** - Keep the plain pipeline path for unsupported multiview requests or a failed capability query and add a regression for that selection. When integrating with #158, preserve both the ordered view locations and its depth-bounds state. The combined fixture in [the source fork PR](https://github.com/fxceless/victory-fork/pull/604) is a useful control for that integration. This verification was AI-assisted.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 04:30 UTC · original

Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at ee3a7dc.

  • cargo test -p victory-gpu --locked: 141 passed, 2 failed, 2 ignored. The 2 are #1744's heap-cap failures on main. The new tests aren't in this run: view_instancing_test is cfg(all(test, feature = "diagnostics")).
  • With --features diagnostics: graphics_view_selection_uses_effective_library_state passes.
  • With --features diagnostics, VICTORY_D3D12_WARP=1 and --ignored: static_views_through_create_stream passes.

Since the default cargo test skips both, a reviewer who runs only that doesn't exercise this PR's tests. Same as main on this hardware. Not run: a title.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 04:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2032#issuecomment-7152906693) Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `ee3a7dc`. - `cargo test -p victory-gpu --locked`: 141 passed, 2 failed, 2 ignored. The 2 are #1744's heap-cap failures on `main`. The new tests aren't in this run: `view_instancing_test` is `cfg(all(test, feature = "diagnostics"))`. - With `--features diagnostics`: `graphics_view_selection_uses_effective_library_state` passes. - With `--features diagnostics`, `VICTORY_D3D12_WARP=1` and `--ignored`: `static_views_through_create_stream` passes. Since the default `cargo test` skips both, a reviewer who runs only that doesn't exercise this PR's tests. Same as `main` on this hardware. Not run: a title. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:18 UTC · original

Automated triage for the maintainers.
Needs work.

pipeline.rs read_stream now keeps the view-instancing subobject (type 22). pipeline/host.rs GraphicsState::read_views copies its static view locations, and HostPipeline builds a stream PSO (graphics_view_pipeline) when views are present. The code reads cleanly. The tier fallback that an earlier comment asked for is already in this head (effective_views falls back to no views below tier 1 when more than one view is requested). Still, this changes GPU state handling with only a synthetic WARP fixture behind it:

  • GraphicsState::read_views reads the console subobject's payload at +8 as a PC D3D12_VIEW_INSTANCING_DESC (count, pointer to locations, flags). Nothing shows that the console's type 22 has this layout and this meaning; main only knows its size. Please give the evidence, e.g. the title's own pipeline streams that carry this subobject with view locations, or documentation of the layout. A title pipeline that needs it would also show that the change matters.
  • read_stream keeps views only for VS/PS pipelines, so the geometry-shader branch in graphics_view_pipeline (StreamWithGeometry) is never reached. Remove it or allow GS.
  • The new tests are under cfg(all(test, feature = "diagnostics")), and the main one is #[ignore] and needs WARP. A plain cargo test and CI do not run them.

What would change the verdict: evidence for the console subobject layout and a title pipeline that uses it.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 09:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/2032#issuecomment-7158145637) <!-- victory-triage v1 head=ee3a7dca451a5a47e10dc9fa5a2e9627f3791ffb verdict=needs-work at=2026-11-25T09:17:57Z --> Automated triage for the maintainers. **Needs work.** `pipeline.rs` `read_stream` now keeps the view-instancing subobject (type 22). `pipeline/host.rs` `GraphicsState::read_views` copies its static view locations, and `HostPipeline` builds a stream PSO (`graphics_view_pipeline`) when views are present. The code reads cleanly. The tier fallback that an earlier comment asked for is already in this head (`effective_views` falls back to no views below tier 1 when more than one view is requested). Still, this changes GPU state handling with only a synthetic WARP fixture behind it: - `GraphicsState::read_views` reads the console subobject's payload at +8 as a PC `D3D12_VIEW_INSTANCING_DESC` (count, pointer to locations, flags). Nothing shows that the console's type 22 has this layout and this meaning; `main` only knows its size. Please give the evidence, e.g. the title's own pipeline streams that carry this subobject with view locations, or documentation of the layout. A title pipeline that needs it would also show that the change matters. - `read_stream` keeps views only for VS/PS pipelines, so the geometry-shader branch in `graphics_view_pipeline` (`StreamWithGeometry`) is never reached. Remove it or allow GS. - The new tests are under `cfg(all(test, feature = "diagnostics"))`, and the main one is `#[ignore]` and needs WARP. A plain `cargo test` and CI do not run them. What would change the verdict: evidence for the console subobject layout and a title pipeline that uses it. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

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!2032
No description provided.