GPU list: bind initial pipeline state in create_list and create_list_x #1446

Manually merged
github merged 2 commits from gh-pr/1446/head into gh-pr/1446/base 2026-11-26 04:32:03 +00:00
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 18:04 UTC · original
geiyiliyabumo:fix/list-create-initial-pipeline → main · +119 −8 · 1 files · 2 commits · merged 2026-11-25 00:22 UTC

Summary

Fixes \VIC-BT-003\ (P0, tracked in #1242) in \crates/victory-gpu/src/list.rs:

  • \create_list\ and \create_list_x\ previously ignored their \pInitialState\ pipeline parameter, leaving newly created command lists unbound and dropping initial draws/dispatches recorded before an explicit \SetPipelineState\ call.
  • Forwards the initial pipeline to the shared constructor
    ew_list, initializing Windows draw state (\state.set_pipeline(pipeline)) and recording \crate::pipeline::bound(pipeline)\ on successful creation (while keeping null \pInitialState\ a clean no-op).
  • Adds a synthetic regression test (\lists_bind_the_initial_pipeline_on_creation) covering both \create_list\ and \create_list_x\ with null and non-null initial pipelines.

Verification

  • \cargo test -p victory-gpu --lib list: 2 passed, 0 failed
  • \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and --all-features): clean
  • \cargo xtask policy: 154 files ok

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 18:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/1446) `geiyiliyabumo:fix/list-create-initial-pipeline` → `main` · +119 −8 · 1 files · 2 commits · merged 2026-11-25 00:22 UTC ## Summary Fixes \VIC-BT-003\ (P0, tracked in #1242) in \crates/victory-gpu/src/list.rs\: - \create_list\ and \create_list_x\ previously ignored their \pInitialState\ pipeline parameter, leaving newly created command lists unbound and dropping initial draws/dispatches recorded before an explicit \SetPipelineState\ call. - Forwards the initial pipeline to the shared constructor \ ew_list\, initializing Windows draw state (\state.set_pipeline(pipeline)\) and recording \crate::pipeline::bound(pipeline)\ on successful creation (while keeping null \pInitialState\ a clean no-op). - Adds a synthetic regression test (\lists_bind_the_initial_pipeline_on_creation\) covering both \create_list\ and \create_list_x\ with null and non-null initial pipelines. ## Verification - \cargo test -p victory-gpu --lib list\: 2 passed, 0 failed - \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and \--all-features\): clean - \cargo xtask policy\: 154 files ok *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:32:01 +00:00
github manually merged commit 8d3a025df1 into gh-pr/1446/base 2026-11-26 04:32:03 +00:00
Author
Owner

@⁠wbkepler on GitHub · 2026-11-24 20:56 UTC · original

Ran lists_bind_the_initial_pipeline_on_creation on Windows 11 / RTX 5090 with this branch (e52777a): passed.

Interaction note: this is functionally the same as the VIC-BT-003 hunk in #1353. Both pass pipeline through new_list into State, for both create_list and create_list_x. This version is slightly tidier: it calls pipeline::bound only after hand_out succeeds. So the two only need one of them to land.

On the Reset(allocator, pso) path, reset/reset_x already pass the pipeline to state.reset(pipeline), so the draw state stays consistent with creation. The only gap is that reset doesn't call crate::pipeline::bound(pipeline) the way set_pipeline does, so a pipeline that is only ever bound through Reset never gets its "first bind" log. That's logging only and was already the case before this PR. It's a one-line addition if you want it here.

AI-assisted review (Claude Code); checked on Windows 11 / RTX 5090.

**@⁠wbkepler** on GitHub · 2026-11-24 20:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1446#issuecomment-7144256268) Ran `lists_bind_the_initial_pipeline_on_creation` on Windows 11 / RTX 5090 with this branch (`e52777a`): passed. Interaction note: this is functionally the same as the VIC-BT-003 hunk in #1353. Both pass `pipeline` through `new_list` into `State`, for both `create_list` and `create_list_x`. This version is slightly tidier: it calls `pipeline::bound` only after `hand_out` succeeds. So the two only need one of them to land. On the `Reset(allocator, pso)` path, `reset`/`reset_x` already pass the pipeline to `state.reset(pipeline)`, so the draw state stays consistent with creation. The only gap is that `reset` doesn't call `crate::pipeline::bound(pipeline)` the way `set_pipeline` does, so a pipeline that is only ever bound through `Reset` never gets its "first bind" log. That's logging only and was already the case before this PR. It's a one-line addition if you want it here. _AI-assisted review (Claude Code); checked on Windows 11 / RTX 5090._
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 21:07 UTC · original

Thanks @⁠wbkepler for verifying on RTX 5090 and pointing out the reset logging gap! Added crate::pipeline::bound(pipeline) in reset (covering both Reset and ResetX) in 8d3a025, verified with cargo test -p victory-gpu --lib list, strict clippy (default + --all-features), and cargo xtask policy.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 21:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/1446#issuecomment-7144496800) Thanks @⁠wbkepler for verifying on RTX 5090 and pointing out the `reset` logging gap! Added `crate::pipeline::bound(pipeline)` in `reset` (covering both `Reset` and `ResetX`) in `8d3a025`, verified with `cargo test -p victory-gpu --lib list`, strict clippy (default + `--all-features`), and `cargo xtask policy`. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠acetonahard-code on GitHub · 2026-11-24 21:14 UTC · original

Heads-up: #461 (opened earlier today) makes the same change. create_list and create_list_x forward pInitialState into new_list, with the same new parameter. The two conflict in list.rs.

Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current main (ffe310e):

cargo test -p victory-gpu passed failed ignored
main 50 0 1
main + this PR 51 0 1
main, --all-features 53 0 -
main + this PR, --all-features 54 0 -
  • The new test passes.
  • No GPU test skipped for lack of a device.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

**@⁠acetonahard-code** on GitHub · 2026-11-24 21:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1446#issuecomment-7144659336) Heads-up: #461 (opened earlier today) makes the same change. `create_list` and `create_list_x` forward `pInitialState` into `new_list`, with the same new parameter. The two conflict in `list.rs`. Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current `main` (ffe310e): | `cargo test -p victory-gpu` | passed | failed | ignored | |---|---|---|---| | `main` | 50 | 0 | 1 | | `main` + this PR | 51 | 0 | 1 | | `main`, `--all-features` | 53 | 0 | - | | `main` + this PR, `--all-features` | 54 | 0 | - | - The new test passes. - No GPU test skipped for lack of a device. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
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!1446
No description provided.