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

Closed
github-bot wants to merge 2 commits from gh-pr/1516/head into gh-pr/1516/base
Owner

@⁠hajduzsolt on GitHub · 2026-11-24 17:10 UTC · original
hajduzsolt:fix/stream-pso-tracked → main · +100 −12 · 2 files · 2 commits · closed without merging

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.
**@⁠hajduzsolt** on GitHub · 2026-11-24 17:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516) `hajduzsolt:fix/stream-pso-tracked` → `main` · +100 −12 · 2 files · 2 commits · closed without merging 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:56:08 +00:00
github-bot closed this pull request 2026-11-26 04:56:08 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7141306102) 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!
Author
Owner

@⁠hajduzsolt on GitHub · 2026-11-24 19:13 UTC · original

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** on GitHub · 2026-11-24 19:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7141785648) 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.
Author
Owner

@⁠hajduzsolt on GitHub · 2026-11-24 19:25 UTC · original

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.

**@⁠hajduzsolt** on GitHub · 2026-11-24 19:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7142067960) 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.
Author
Owner

@⁠throny on GitHub · 2026-11-24 20:29 UTC · original

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.

**@⁠throny** on GitHub · 2026-11-24 20:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7143636996) <!-- 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.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 20:44 UTC · original

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.

**@⁠ivall** on GitHub · 2026-11-24 20:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7143999219) 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.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:40 UTC · original

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.

**@⁠DavidM1911** on GitHub · 2026-11-26 05:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1516#issuecomment-7183702102) 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

This discussion has been locked. Commenting is limited to contributors.
No description provided.