Repository navigation
Conversation
…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>
…triaged SKIP, probe past xcl-dev#2864)
luckyteagirl
left a comment
There was a problem hiding this comment.
Can the PC CreateCommandList path preserve the requested initial PSO when a caller records work without rebinding it? pInitialState is already a bind. A legal caller can supply a PSO there and issue its first draw or dispatch without ever calling SetPipelineState. If the build is still pending at creation, the new wrapper forwards the shared dummy to the driver. Completing the build afterward updates the stand-in's lookup entry, but nothing in this path updates the PSO on the native list. The first work can therefore still use the dummy. The fake driver in the new test returns failure immediately, so it checks pointer safety but does not exercise a list that successfully records with the initial state.
The PC Reset override already uses resolve_for_bind, which waits for compute PSOs. Can creation use at least the same handling for pending compute PSOs and define how graphics work recorded with a pending initial PSO gets rebound before it executes?
Creation wrapper · PC Reset · D3D12 initial pipeline state
AI-assisted review (GPT-6.2 Sol).
pInitialState is a bind: a list may draw or dispatch with it without ever calling SetPipelineState, and nothing rebinds a pipeline that finishes building after the list was created. With a build still pending the native list recorded with the stand-in's shared dummy pipeline. The creation path now resolves the initial state with resolve_wait, graphics pipelines too (the first draw on a title list waits for its tracked pipeline anyway, bind::graphics_bound). A failed build, or XCL_PSO_WAIT_MS running out, still gives the driver the shared pipeline as before. Tests: the fake driver now also succeeds and hands out an adoptable list, so a list really records with the initial state; compute and graphics stand-ins pending at creation, and a failed build. The two pending-state tests fail without the change. Assisted-by: Claude Code (Claude Sonnet 5.5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, this is right for the creation path. Fixed in e235f13. Behaviour chosen: wait. Tests (
Tested on the PR branch (CPU only, AI-assisted (Claude Sonnet 5.5). |
|
RX 9070 / Wine check of the initial-PSO behavior at Tested RX 9070 16 GB, RADV GFX1201 / Mesa 26.3.1, Ryzen 7 7700, CachyOS 7.3.0-5, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton
The GPU fixture covers the raw-PC helper and adopted-device PC wrapper, each with compute and graphics initial PSOs. It uses a native PSO as an async lookup key for paired controls: pending lazy success, already completed success, failed job with shared fallback, and an ordinary PSO. A pending job returns an already constructed target PSO after a controlled 30 ms delay. Main's job is completed after list creation but before recording work. No Results: 219 GPU work cases, including 111 physical-wave64 compute dispatches and 108 draws. Head and integration select the expected driver PSO and produce the expected data throughout. On main, 24 full-matrix cases plus the pilot retain the earlier PSO instead of the requested completed one: compute lane 0 writes A separate Python oracle checked all 126,576 readback words, including compute guards, every lane's wave width and every 16×16 RGBA32F pixel, plus 237 captured native creation arguments. Fresh repeats and head/integration outputs match. No device removal occurred. Not tested Retail workload, smoke run, full suite, native Windows, actual pending shader translation/driver compilation, wait-budget expiration or hitch/performance impact. Recording uses the native PC list after test-only removal of its adoption hooks, so implicit rebinding cannot mask the initial state. This does not exercise the console AI use OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the public source, wrote the synthetic fixture and independent verifier, ran the tests and drafted this report. Publication authorized by the account owner. |
|
Linux (Wine) dual-lane run at All of
Head Side note from our amd-dev thread (#2764): the shader stand-in build path is where our Wine deadlock repro lives ( Suite: AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting. |
Part of #2455 (the PC
CreateCommandListitem; MakeResident/Evict are #2523, StorePipeline is #2853).A title that calls the PC
ID3D12Device::CreateCommandListwith a stand-in pipeline (standin::Shell) aspInitialStatehad that pointer forwarded toD3D12Core.dllunchanged, but the shell is not a driver object. The override now passespInitialStatethroughpso_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_listdoes the same on its direct-to-driver path.Judgement call:
resolve, notresolve_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 indevice_x.rs. The list's first bind of the stand-in goes throughbindas before, so lazy / async compile behaviour is unchanged. #2548 does not touchreal.rs, so there is no overlap.What is in it
crates/xcl/src/hle/d3d12x/real.rs:dev_create_command_listbecomes a wrapper that resolvesa4before thecreator!forwarder;create_raw_pc_command_listresolvesinit_psoreal.rscreate_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
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 ignoredresolvecalls removed: 1 passed, 3 failed (the driver got the stand-in's address)cargo check --workspace --tests -j 4: finished, no errorsRegression run
scripts/smoke.ps1onmainand on this head needs the RX 7800 XT, which is in use by another job. Draft until bothxcl-smokeblocks are pasted here.Not tested
cargo test --workspaceand any GPU test (SKIPPED / GPU counts unknown)scripts/smoke.ps1or any retail title; AMD and NVIDIAAI use
🤖 Generated with Claude Code