Skip to content

D3D12.X: PC CreateCommandList gives the driver the pipeline behind a stand-in - #2861

Draft
oni-swr wants to merge 1 commit into
xcl-dev:mainfrom
oni-swr:t3/xcl-2455-pc-ccl-1126t
Draft

oni-swr wants to merge 1 commit into
xcl-dev:mainfrom
oni-swr:t3/xcl-2455-pc-ccl-1126t

Conversation

@oni-swr

@oni-swr oni-swr commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Part of #2455 (the PC CreateCommandList item; MakeResident/Evict are #2523, StorePipeline is #2853).

A title that calls the PC ID3D12Device::CreateCommandList with a stand-in pipeline (standin::Shell) as pInitialState had that pointer forwarded to D3D12Core.dll unchanged, but the shell is not a driver object. The override now passes pInitialState through pso_async::resolve: the built pipeline if there is one, else the driver pipeline the stand-in shares, else the pointer as it is (null, ordinary pipelines). create_raw_pc_command_list does the same on its direct-to-driver path.

Judgement call: resolve, not resolve_for_bind. It never waits for a build still running (the caller is the title's thread), the same choice #2548 makes for Reset/KickoffX/the console-device CreateCommandList in device_x.rs. The list's first bind of the stand-in goes through bind as before, so lazy / async compile behaviour is unchanged. #2548 does not touch real.rs, so there is no overlap.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: dev_create_command_list becomes a wrapper that resolves a4 before the creator! forwarder; create_raw_pc_command_list resolves init_pso
  • real.rs create_command_list_standin_tests: 4 CPU tests with a fake driver table (pending stand-in gives the shared driver pipeline without waiting; built stand-in gives the built pipeline; null / driver pipeline unchanged; raw path)

Tested

  • CPU only (XCL_ADAPTER=NONE_CPU_ONLY), no GPU test run. Windows 11, stable MSVC, debug.
  • cargo test -p xcl --lib -j 4 create_command_list_standin: 4 passed, 0 failed, 0 ignored
  • Same tests with the two resolve calls removed: 1 passed, 3 failed (the driver got the stand-in's address)
  • cargo check --workspace --tests -j 4: finished, no errors
  • The full suite was not run (see Not tested)

Regression run

  • Pending: scripts/smoke.ps1 on main and on this head needs the RX 7800 XT, which is in use by another job. Draft until both xcl-smoke blocks are pasted here.

Not tested

  • Full cargo test --workspace and any GPU test (SKIPPED / GPU counts unknown)
  • scripts/smoke.ps1 or any retail title; AMD and NVIDIA
  • Whether a real title passes a stand-in here (the fix follows the code path; it was not observed)

AI use

  • Claude Code (Claude Sonnet 5.5): read the code, wrote the change, the tests and this description.

🤖 Generated with Claude Code

…stand-in

A title that calls the PC ID3D12Device::CreateCommandList with a stand-in
pipeline (standin::Shell) as pInitialState had that pointer forwarded to
D3D12Core.dll unchanged: the shell is no driver object. The override now
passes pInitialState through pso_async::resolve, as Reset and KickoffX do
(the built pipeline, else the driver pipeline the stand-in shares; no
wait for a build still running). create_raw_pc_command_list does the same
on its direct driver path.

Part of xcl-dev#2455.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 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.

1 participant