Skip to content

GPU: keep the initial pipeline of new command lists - #461

Closed
fuzeofficlal wants to merge 1 commit into
Marvisak:mainfrom
fuzeofficlal:fix/initial-command-list-pso
Closed

fuzeofficlal wants to merge 1 commit into
Marvisak:mainfrom
fuzeofficlal:fix/initial-command-list-pso

Conversation

@fuzeofficlal

Copy link
Copy Markdown
Contributor

Both command-list creation entry points accept an initial pipeline state. Forward it into the list's draw state so the first draw or dispatch can use it when the caller sets the PSO at creation. Host pipeline creation stays lazy.

The synthetic regression creates a shim pipeline and passes it to the regular and X command-list entry points. Both calls returned success on main but stored a null pipeline. With this change both retain the supplied pipeline, and ResetX and Reset still clear and restore the pipeline as requested.

The GPU test suite passed on Windows with 46 tests in diagnostics and 44 in the default build, with one ignored benchmark in each configuration. The focused regression also passed with WARP. The staged asset policy check passed.

@DaviTostes

Copy link
Copy Markdown

Verified bf84506 on Arch Linux x86_64, Windows MSVC release build under Wine 11.22 (victory-gpu, --test-threads=1): 44 passed, 0 failed, 1 ignored.

Not covered: title command lists that are opened, submitted and reused in the world (no game data here).

@LocranKing

Copy link
Copy Markdown

Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, MSVC 1.98.1).

Tested

  • Commit: bf84506 (pr-461, clean tree)
  • Environment: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (driver 32.0.16.2101), Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo xtask policy: asset policy: 151 files ok
  • cargo test --workspace: 265 passed, 0 failed, 4 ignored
  • diag build (VICTORY_D3D12_DRED=1) live boot/first-screen run (45 s) on RTX 3060 Ti:
    • 30.0–30.1 fps, 33.3–33.4 ms/frame (0.2 ms preparing, 0.1 ms copies, 1.2–4.8 ms on the GPU, 0.0 ms copying back), 13 draws/frame, 0 dropped (frame=1024: 6656/6656 draws, 512/512 dispatches).
    • copystat (steady state): 14.9–15.4 submissions, 70–72 title copies (0.1 MB), 75–77 refreshes (62.9–65.0 MB), 10 watches (0.14–0.16 ms), 0–1 page faults. crashes.log empty.

Not tested: World streaming past the first screens, D3D12 debug layer (VICTORY_D3D12_DEBUG=1), AMD GPUs.

AI use: Antigravity (Gemini 4 Hydrogen) ran the checks and diagnostics run and drafted this report from the logs.

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested bf84506 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed), including command_list_creation_keeps_the_initial_pipeline.

  • new_list now stores the creation PSO through State::set_pipeline, which Reset already uses, so creating a list and resetting it now treat the initial pipeline the same way. Like D3D12, no reference is taken. The title keeps the PSO alive.
  • Nit: #[cfg(not(windows))] let _ = pipeline; looks unnecessary, since pipeline is used unconditionally in the state initializer above it.

No issues found.

AI-assisted (Claude Code).

@mercuryVM

Copy link
Copy Markdown

Correction to my review: the #[cfg(not(windows))] let _ = pipeline; is needed, since the state field is #[cfg(windows)]. Please ignore that nit; the approval stands.

AI-assisted (Claude Code).

mercuryVM added a commit to mercuryVM/VIctory that referenced this pull request Nov 24, 2026
… command lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seed draw state with the optional pipeline from both list creation entry points. The regression covers creation and Reset using a synthetic pipeline object.
@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1446. Keeps the initial pipeline passed at list creation; #1446 does the same and merges clean.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

@Marvisak Marvisak closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants