D3D12.X: route stream graphics PSOs through create_graphics_pso_tracked #1661

Open
github-bot wants to merge 1 commit from github-bot/gh-1661 into main AGit
Owner

@⁠fixgep on GitHub · 2026-11-24 18:53 UTC · original
fixgep:fix/stream-graphics-pso-tracking → main · +294 −10 · 4 files · 1 commits · open

Part of #1489 (XCL-BT-023).

When dev_create_pipeline_state unpacks a graphics pipeline state stream via stream_pipeline, it previously called graphics_pso directly, bypassing device_x::create_graphics_pso_tracked. As a result, stream-created graphics PSOs never received D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS on supported adapters and were never recorded by device_x::note_base, causing subsequent CreateDerivedPipelineStateX and RSSetDepthBiasX calls to fail.

What is in it

  • Parameterize device_x::create_graphics_pso_tracked over its PSO creation callback in crates/xcl/src/hle/d3d12x/device_x.rs.
  • Route StreamPipeline::Graphics in dev_create_pipeline_state through device_x::create_graphics_pso_tracked with graphics_pso(..., true) in crates/xcl/src/hle/d3d12x/real.rs, leaving compute, mesh, and Unknown stream paths unchanged.
  • Add synthetic unit test stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias in crates/xcl/src/hle/d3d12x/real.rs and title check gpu::stream_graphics_pso_tracking in tests/testtitle/src/gpu.rs and tests/testtitle/src/main.rs.

Tested

  • Hardware & OS: NVIDIA GeForce RTX 3060 (driver 32.0.15.9144), AMD Ryzen 5 7500F, Windows 10 Pro 25H2 (build 26200), rustc 1.100.0, debug build
  • cargo test -p xcl --lib stream_graphics_pso_is_tracked_for_derived_and_depth_bias -- --nocapture: 1 passed, 0 failed
  • cargo test -p xcl --test e2e -- --test-threads=1: 3 passed, 0 failed
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 776 passed, 1 failed (pre-existing gpu::recomp::tests::gpu_clamp_and_omod_per_instruction), 41 ignored
  • SKIPPED GPU tests on this adapter: 2 (no wave64: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware), 1 (no heap windows: heap_window_out_of_memory_falls_back_to_the_switch_form)

Regression run
Baseline (main):

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1026 (PresentX 1027)
presents per 2 s (last 3): 58 60 60
device removals: 0
crashes: 0
peak commit: 15544 MB

This branch (fix/stream-graphics-pso-tracking):

xcl-smoke v1
commit: f70293d56a46ea2b2d6cbcd7afac241dd777cfeb
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1016 (PresentX 1017)
presents per 2 s (last 3): 59 60 60
device removals: 0
crashes: 0
peak commit: 15596 MB

Not tested

  • AMD / Intel GPUs and wave64-native adapters
  • XCL_SAMPLE_* tests (no sample variables set)

AI use

  • Antigravity with Gemini 4 Hydrogen: wrote the fix, synthetic unit/title tests, and PR description, and ran the workspace tests and smoke runs.
**@⁠fixgep** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1661) `fixgep:fix/stream-graphics-pso-tracking` → `main` · +294 −10 · 4 files · 1 commits · open Part of #1489 (`XCL-BT-023`). When `dev_create_pipeline_state` unpacks a graphics pipeline state stream via `stream_pipeline`, it previously called `graphics_pso` directly, bypassing `device_x::create_graphics_pso_tracked`. As a result, stream-created graphics PSOs never received `D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS` on supported adapters and were never recorded by `device_x::note_base`, causing subsequent `CreateDerivedPipelineStateX` and `RSSetDepthBiasX` calls to fail. **What is in it** - Parameterize `device_x::create_graphics_pso_tracked` over its PSO creation callback in `crates/xcl/src/hle/d3d12x/device_x.rs`. - Route `StreamPipeline::Graphics` in `dev_create_pipeline_state` through `device_x::create_graphics_pso_tracked` with `graphics_pso(..., true)` in `crates/xcl/src/hle/d3d12x/real.rs`, leaving compute, mesh, and `Unknown` stream paths unchanged. - Add synthetic unit test `stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias` in `crates/xcl/src/hle/d3d12x/real.rs` and title check `gpu::stream_graphics_pso_tracking` in `tests/testtitle/src/gpu.rs` and `tests/testtitle/src/main.rs`. **Tested** - Hardware & OS: NVIDIA GeForce RTX 3060 (driver `32.0.15.9144`), AMD Ryzen 5 7500F, Windows 10 Pro 25H2 (build 26200), `rustc 1.100.0`, debug build - `cargo test -p xcl --lib stream_graphics_pso_is_tracked_for_derived_and_depth_bias -- --nocapture`: 1 passed, 0 failed - `cargo test -p xcl --test e2e -- --test-threads=1`: 3 passed, 0 failed - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 776 passed, 1 failed (pre-existing `gpu::recomp::tests::gpu_clamp_and_omod_per_instruction`), 41 ignored - `SKIPPED` GPU tests on this adapter: 2 (`no wave64`: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`), 1 (`no heap windows`: `heap_window_out_of_memory_falls_back_to_the_switch_form`) **Regression run** Baseline (`main`): ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1026 (PresentX 1027) presents per 2 s (last 3): 58 60 60 device removals: 0 crashes: 0 peak commit: 15544 MB ``` This branch (`fix/stream-graphics-pso-tracking`): ``` xcl-smoke v1 commit: f70293d56a46ea2b2d6cbcd7afac241dd777cfeb gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1016 (PresentX 1017) presents per 2 s (last 3): 59 60 60 device removals: 0 crashes: 0 peak commit: 15596 MB ``` **Not tested** - AMD / Intel GPUs and wave64-native adapters - `XCL_SAMPLE_*` tests (no sample variables set) **AI use** - Antigravity with Gemini 4 Hydrogen: wrote the fix, synthetic unit/title tests, and PR description, and ran the workspace tests and smoke runs.
Part of #1489 (XCL-BT-023).

Assisted-by: Antigravity (Gemini 4 Hydrogen)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:00:49 +00:00
Author
Owner

@⁠eizispark on GitHub · 2026-11-24 19:21 UTC · original

Hardware test report — commit f70293d

Verified f70293d56a46ea2b2d6cbcd7afac241dd777cfeb (clean merge with main c160d86ef2efe3a07e4dfb473e4fa72eafb413c0): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, native wave32 + wave64, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64, rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 777 passed, 0 failed, 41 ignored (1 skipped: heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)
  • hle::d3d12x::real::stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias and test_title_runs_and_game_folder_is_untouched (testtitle e2e gpu::stream_graphics_pso_tracking) passed
  • gpu::recomp::tests::gpu_clamp_and_omod_per_instruction and both wave64 GPU tests skipped on NVIDIA (gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware, plus console_wave64_compute_through_the_pso_hook_dispatch_and_read_back) ran natively and passed on RDNA4

Regression run
main (c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14861 MB

PR (f70293d56a46ea2b2d6cbcd7afac241dd777cfeb):

xcl-smoke v1
commit: f70293d56a46ea2b2d6cbcd7afac241dd777cfeb
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1677 (PresentX 1677)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14919 MB

Not tested

  • adapters without native OPTIONS16 dynamic depth bias (Intel Arc fallback path) except through unit/e2e coverage, Wine/vkd3d-proton, gameplay past the menus

AI use

  • Verified and formatted with Antigravity (Google DeepMind, Gemini 4 Carbon).
**@⁠eizispark** on GitHub · 2026-11-24 19:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/1661#issuecomment-7141967575) ### Hardware test report — commit `f70293d` Verified `f70293d56a46ea2b2d6cbcd7afac241dd777cfeb` (clean merge with `main` `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`): **pass**. **Tested** - Hardware: AMD Radeon RX 9070 XT (RDNA4, native wave32 + wave64, driver `32.0.32015.16001`), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug tests + release smoke - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `777 passed, 0 failed, 41 ignored` (`1 skipped`: `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`) - `hle::d3d12x::real::stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias` and `test_title_runs_and_game_folder_is_untouched` (`testtitle` e2e `gpu::stream_graphics_pso_tracking`) passed - `gpu::recomp::tests::gpu_clamp_and_omod_per_instruction` and both wave64 GPU tests skipped on NVIDIA (`gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`, plus `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`) ran natively and passed on RDNA4 **Regression run** `main` (`c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`): ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14861 MB ``` PR (`f70293d56a46ea2b2d6cbcd7afac241dd777cfeb`): ``` xcl-smoke v1 commit: f70293d56a46ea2b2d6cbcd7afac241dd777cfeb gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1677 (PresentX 1677) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14919 MB ``` **Not tested** - adapters without native `OPTIONS16` dynamic depth bias (Intel Arc fallback path) except through unit/e2e coverage, Wine/vkd3d-proton, gameplay past the menus **AI use** - Verified and formatted with Antigravity (Google DeepMind, Gemini 4 Carbon).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 21:16 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 21:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1661#issuecomment-7144718251) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:47 UTC · original

XCL PR #1661 — Windows / Arc A770 verification

Clean detached head f70293d56a46ea2b2d6cbcd7afac241dd777cfeb on STOR-WINLAB. Windows 11 Enterprise Evaluation 10.0.26200, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc).

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc mutex. The test build produced 19 executables.
  • The following test commands ran inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1.
    • cargo test -p xcl --lib hle::d3d12x::real::stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias -- --exact — 1 passed, 0 failed, 0 ignored, 0 skipped. Verified base registration and static bias metadata, derived PSO creation, patched bias PSO creation, native RSSetDepthBias without fallback-cache growth, and tracking cleanup on release.
    • cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact — 0 passed, 1 failed, 0 ignored, 0 skipped. The new title check printed [PASS] after stream creation via slot #86, derivation via #55, and a depth-biased draw via #94 with queue fence completion. A separate title check failed as described below.
    • cargo test --workspace --no-fail-fast -- --test-threads=4 — exit 101. The 20 test result: lines (19 binaries and one doctest target) sum to 761 passed, 16 failed, 41 ignored. Both new stream-PSO checks passed again.

Workspace failures and skips

  • 15 GPU recompiler tests failed. The e2e title harness also failed because RSSetDepthBiasX(-1000.5) produced a blue top-right pixel where the test expected green.
  • Six SKIPPED lines were counted. Two cited wave64, two cited debug-layer availability, one cited tiled-resource tier, and one cited heap windows. These skips provide no coverage.

Not tested

Matched main baseline, retail-title smoke, other adapters, forced command-list fallback, and optional sample data.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1661-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1661#issuecomment-7153171328) # XCL PR #1661 — Windows / Arc A770 verification Clean detached head `f70293d56a46ea2b2d6cbcd7afac241dd777cfeb` on STOR-WINLAB. Windows 11 Enterprise Evaluation 10.0.26200, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc mutex. The test build produced 19 executables. - The following test commands ran inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. - `cargo test -p xcl --lib hle::d3d12x::real::stream_pso_tests::stream_graphics_pso_is_tracked_for_derived_and_depth_bias -- --exact` — 1 passed, 0 failed, 0 ignored, 0 skipped. Verified base registration and static bias metadata, derived PSO creation, patched bias PSO creation, native `RSSetDepthBias` without fallback-cache growth, and tracking cleanup on release. - `cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact` — 0 passed, 1 failed, 0 ignored, 0 skipped. The new title check printed `[PASS]` after stream creation via slot #86, derivation via #55, and a depth-biased draw via #94 with queue fence completion. A separate title check failed as described below. - `cargo test --workspace --no-fail-fast -- --test-threads=4` — exit 101. The 20 `test result:` lines (19 binaries and one doctest target) sum to 761 passed, 16 failed, 41 ignored. Both new stream-PSO checks passed again. **Workspace failures and skips** - 15 GPU recompiler tests failed. The e2e title harness also failed because `RSSetDepthBiasX(-1000.5)` produced a blue top-right pixel where the test expected green. - Six `SKIPPED ` lines were counted. Two cited wave64, two cited debug-layer availability, one cited tiled-resource tier, and one cited heap windows. These skips provide no coverage. **Not tested** Matched `main` baseline, retail-title smoke, other adapters, forced command-list fallback, and optional sample data. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1661-suite.log` and published.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/real.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1661/head:github-bot/gh-1661'
git switch 'github-bot/gh-1661'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1661'
git switch 'github-bot/gh-1661'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1661'
git switch 'github-bot/gh-1661'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1661'
git switch 'main'
git merge --squash 'github-bot/gh-1661'
git switch 'main'
git merge --ff-only 'github-bot/gh-1661'
git switch 'main'
git merge 'github-bot/gh-1661'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.