D3D12.X: route stream graphics PSO creation through create_graphics_pso_tracked #1506

Closed
hajduzsolt wants to merge 2 commits from upstream-pr/1516 into main
hajduzsolt commented 2026-11-24 17:10:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T17:10:11Z.


Runtime fix verified with unit tests and RX 9070 XT smoke run.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: export dev_create_graphics_pso_stream and route StreamPipeline::Graphics through device_x::create_graphics_pso_tracked(..., stream = true).
  • crates/xcl/src/hle/d3d12x/device_x.rs: update create_graphics_pso_tracked to accept stream: bool and invoke dev_create_graphics_pso_stream for streams, registering the resulting PSO via note_base.
  • crates/xcl/src/hle/d3d12x/device_x.rs: add unit test stream_graphics_pso_is_tracked_as_base verifying base depth bias tracking and cleanup via forget_base.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: AMD Radeon RX 9070 XT (driver 24.12.1), AMD Ryzen 7 9800X3D, Windows 11 10.0.26100, Rust 1.85.0 (stable-x86_64-pc-windows-msvc), debug (cargo test)
  • cargo test --workspace -- --test-threads=2: 744 passed, 0 failed, 12 ignored
  • cargo test -p xcl --lib hle::d3d12x::device_x::tests: 9 passed, 0 failed

Regression run

main:

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1678 (PresentX 1678)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14840 MB

PR:

xcl-smoke v1
commit: dc3564e085df19ef06bdf46187684e96a649ab29
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1678 (PresentX 1679)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14901 MB

Not tested

  • Intel Arc dynamic depth bias fallback paths

AI use

  • Antigravity (Gemini 4 Hydrogen, low): static code audit, implementation of stream-created graphics PSO tracking in device_x.rs and real.rs, and unit test verification.
<!-- greyfinch-sync:ivall/xcl:issue:6587283974 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T17:10:11Z. --- Runtime fix verified with unit tests and RX 9070 XT smoke run. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: export `dev_create_graphics_pso_stream` and route `StreamPipeline::Graphics` through `device_x::create_graphics_pso_tracked(..., stream = true)`. - `crates/xcl/src/hle/d3d12x/device_x.rs`: update `create_graphics_pso_tracked` to accept `stream: bool` and invoke `dev_create_graphics_pso_stream` for streams, registering the resulting PSO via `note_base`. - `crates/xcl/src/hle/d3d12x/device_x.rs`: add unit test `stream_graphics_pso_is_tracked_as_base` verifying base depth bias tracking and cleanup via `forget_base`. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: AMD Radeon RX 9070 XT (driver 24.12.1), AMD Ryzen 7 9800X3D, Windows 11 10.0.26100, Rust 1.85.0 (stable-x86_64-pc-windows-msvc), debug (`cargo test`) - `cargo test --workspace -- --test-threads=2`: 744 passed, 0 failed, 12 ignored - `cargo test -p xcl --lib hle::d3d12x::device_x::tests`: 9 passed, 0 failed **Regression run** main: ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1678 (PresentX 1678) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14840 MB ``` PR: ``` xcl-smoke v1 commit: dc3564e085df19ef06bdf46187684e96a649ab29 gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1678 (PresentX 1679) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14901 MB ``` **Not tested** - Intel Arc dynamic depth bias fallback paths **AI use** - Antigravity (Gemini 4 Hydrogen, low): static code audit, implementation of stream-created graphics PSO tracking in `device_x.rs` and `real.rs`, and unit test verification.
GonZiin commented 2026-11-24 18:08:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GonZiin on 2026-11-24T17:32:01Z.

Review: COMMENTED


The new test passes with the stream dispatch change reverted. It calls note_base directly, so it verifies the existing registration and cleanup helpers without exercising dev_create_pipeline_state, where the regression occurs.

Tested

  • Windows 11 Pro build 26300, Ryzen 7 7800X3D, Rust 1.100.0 MSVC, debug. On head d3fe509ae10c907510ad3fab94727ab31d2370dc, cargo test -p xcl --lib stream_graphics_pso_is_tracked_as_base reported 1 passed, 0 failed, 0 ignored.
  • In an isolated checkout of that head, I changed only the StreamPipeline::Graphics arm back to calling graphics_pso directly. The same command still reported 1 passed, 0 failed, 0 ignored.

Please add a regression test that submits a graphics stream through dev_create_pipeline_state and checks the resulting PSO's base entry, or exercise the dispatch with a mocked creation function and assert that the tracking path was reached.

Not tested

GPU drawing and retail smoke runs for this revision.

AI use

Codex (gpt-6.2-sol) reviewed the call path, ran the test before and after reverting the dispatch arm locally, and drafted this review.

<!-- greyfinch-sync:ivall/xcl:review:6044239103 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#pullrequestreview-6044239103). Originally posted by [GonZiin](https://github.com/GonZiin) on 2026-11-24T17:32:01Z. **Review:** COMMENTED --- The new test passes with the stream dispatch change reverted. It calls `note_base` directly, so it verifies the existing registration and cleanup helpers without exercising `dev_create_pipeline_state`, where the regression occurs. **Tested** - Windows 11 Pro build 26300, Ryzen 7 7800X3D, Rust 1.100.0 MSVC, debug. On head `d3fe509ae10c907510ad3fab94727ab31d2370dc`, `cargo test -p xcl --lib stream_graphics_pso_is_tracked_as_base` reported 1 passed, 0 failed, 0 ignored. - In an isolated checkout of that head, I changed only the `StreamPipeline::Graphics` arm back to calling `graphics_pso` directly. The same command still reported 1 passed, 0 failed, 0 ignored. Please add a regression test that submits a graphics stream through `dev_create_pipeline_state` and checks the resulting PSO's base entry, or exercise the dispatch with a mocked creation function and assert that the tracking path was reached. **Not tested** GPU drawing and retail smoke runs for this revision. **AI use** Codex (`gpt-6.2-sol`) reviewed the call path, ran the test before and after reverting the dispatch arm locally, and drafted this review.
gut0to commented 2026-11-24 19:06:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:52:31Z.

Review: COMMENTED


The full suite and paired smoke reports are useful. One CONTRIBUTING.md detail remains: it asks for the names of skipped GPU tests on the adapter, but this Tested section gives only the skip count/categories. Could you list the exact skipped test names to make the run reproducible? AI-assisted review; I checked the section against the guide.

<!-- greyfinch-sync:ivall/xcl:review:6045376582 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#pullrequestreview-6045376582). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:52:31Z. **Review:** COMMENTED --- The full suite and paired smoke reports are useful. One CONTRIBUTING.md detail remains: it asks for the names of skipped GPU tests on the adapter, but this Tested section gives only the skip count/categories. Could you list the exact skipped test names to make the run reproducible? AI-assisted review; I checked the section against the guide.
DavidM1911 commented 2026-11-24 19:07:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:54Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141306102 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7141306102). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:54Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
upstream-sync closed this pull request 2026-11-24 21:06:20 +00:00
hajduzsolt commented 2026-11-24 21:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:13:38Z.


Thanks for the regression-test review. The stream dispatch now has a synthetic test that sends a graphics descriptor through the dispatch into the real tracking logic with mocked PSO creation, then checks the resulting base entry. cargo test --workspace -- --test-threads=2 passed; the library run had 724 passed and 21 ignored. Retail smoke verification is pending.

<!-- greyfinch-sync:ivall/xcl:comment:7141785648 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7141785648). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T19:13:38Z. --- Thanks for the regression-test review. The stream dispatch now has a synthetic test that sends a graphics descriptor through the dispatch into the real tracking logic with mocked PSO creation, then checks the resulting base entry. `cargo test --workspace -- --test-threads=2` passed; the library run had 724 passed and 21 ignored. Retail smoke verification is pending.
hajduzsolt commented 2026-11-24 21:08:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:25:10Z.


Follow-up on the skipped GPU checks: on head 8c60813, cargo test --workspace -- --test-threads=2 --nocapture passed with these two tests reporting skipped GPU work because the D3D12 debug layer was unavailable:

  • test_title_draws_with_a_root_signature_under_the_debug_layer
  • uploads_start_from_each_subresources_state

The library run reported 724 passed and 21 ignored. The smoke blocks in the description are left to the automated verifier.

<!-- greyfinch-sync:ivall/xcl:comment:7142067960 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7142067960). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T19:25:10Z. --- Follow-up on the skipped GPU checks: on head `8c60813`, `cargo test --workspace -- --test-threads=2 --nocapture` passed with these two tests reporting skipped GPU work because the D3D12 debug layer was unavailable: - `test_title_draws_with_a_root_signature_under_the_debug_layer` - `uploads_start_from_each_subresources_state` The library run reported 724 passed and 21 ignored. The smoke blocks in the description are left to the automated verifier.
throny commented 2026-11-24 21:09:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-24T20:29:54Z.


Two contributors checked independently and found that this PR makes the same change as #1661 (for #1489): #1607, group D34. They suggest keeping #1661. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps.

This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7143636996 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7143636996). Originally posted by [throny](https://github.com/throny) on 2026-11-24T20:29:54Z. --- <!-- xcl-1607-hint:D34 --> Two contributors checked independently and found that this PR makes the same change as #1661 (for #1489): #1607, group D34. They suggest keeping #1661. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
ivall commented 2026-11-24 21:09:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T20:44:43Z.


Closing this as a duplicate: the contributors who checked group D34 in #1607 agree that #1661 makes the same change (a graphics pipeline made from a stream goes through create_graphics_pso_tracked) and suggest keeping #1661, which also tests it with the test title. You were first with this one, so thank you in particular.

This says nothing about the quality of the code here. If this PR covers a case #1661 does not, or #1661 is closed without being merged, say so and I'll reopen it.

Thank you for the work.

AI use: Claude Code (Claude Opus 5.5) wrote this comment; the decision is the maintainer's.

<!-- greyfinch-sync:ivall/xcl:comment:7143999219 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7143999219). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T20:44:43Z. --- Closing this as a duplicate: the contributors who checked group D34 in #1607 agree that #1661 makes the same change (a graphics pipeline made from a stream goes through `create_graphics_pso_tracked`) and suggest keeping #1661, which also tests it with the test title. You were first with this one, so thank you in particular. This says nothing about the quality of the code here. If this PR covers a case #1661 does not, or #1661 is closed without being merged, say so and I'll reopen it. Thank you for the work. AI use: Claude Code (Claude Opus 5.5) wrote this comment; the decision is the maintainer's.
DavidM1911 commented 2026-11-26 06:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:40:31Z.


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7183702102 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7183702102). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:40:31Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!1506
No description provided.