Repository navigation
Conversation
… stand-in A shared stand-in (`standin::shell`) is a Rust object, not a D3D12Core pipeline. Device xcl-dev#34 MakeResident and xcl-dev#35 Evict keep the PC layout for console code and had no override, so a stand-in pipeline in the title's object array reached the driver as `*mut Shell`. Both are overridden now: each shell in the array goes to the driver as the pipeline behind it (the real one once built, else its shared driver pipeline), in a copy of the array; the title's array is left as it is. `pso_async::current` looks the pipeline up without building or waiting for it, so a residency call does not start a lazy build. The other entry points named in xcl-dev#2455 are not reachable by title code on main: device xcl-dev#46 SetResidencyPriority and xcl-dev#51 EnqueueMakeResident are console extensions there (a logged S_OK stub), xcl-dev#44 is the console's CreatePlacedResourceX (no native pipeline library for StorePipeline), and xcl-dev#12 CreateCommandList goes to `create_command_list_pc`, which resolves the initial pipeline. Fixes xcl-dev#2455 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Synthetic verification on Windows for head
Real-title smoke remains pending. The PR is still a draft. AI use: Codex (gpt-6.2-sol) ran the verification and prepared this report. |
A shared stand-in (
standin::shell) is a Rust object, not a D3D12Core pipeline. Device #34MakeResidentand #35Evictkeep the PC layout for console code and had no override, so a stand-in pipeline in the title'sppObjectsarray reached the driver as*mut Shell. Both are overridden now: each shell goes to the driver as the pipeline behind it (the real one once built, otherwise its shared driver pipeline) in a copy of the array. The title's array is not changed, and a residency call does not start or wait for a lazy build.Fixes #2455
I checked each entry point in #2455 against
main @ 6d12f58a. Title code cannot reach the others, so this PR leaves them alone:SetResidencyPriority, GPU tests that cannot run on the adapter say so: SKIPPED lines, a count in scripts/test.ps1, XCL_REQUIRE_GPU (#42) #51EnqueueMakeResident: device slots from Split wave32 geometry: refuse prefix counts over a mask #44 that are not inconsole_slotsare console extensions (console_extensions). A title call gets the logged S_OK stub and never reaches D3D12Core.ID3D12PipelineLibrary::StorePipeline: console device Split wave32 geometry: refuse prefix counts over a mask #44 isCreatePlacedResourceX, so a title never gets a native pipeline library. Only the runtime can reach the PCCreatePipelineLibrary, and it has no shells. (D3D12.X: offload PSO builds, defer lazy compile-on-draw, and wire mmap ID3D12PipelineLibrary1 #2001 would wire up a pipeline library. If it lands,StorePipelineneeds this treatment.)CreateCommandList(dev_create_command_list): title calls of Olympus: report implemented runtime features #12 are split todevice_x::create_command_list_pc, which resolvespInitialState. XCL's own callers pass resolved pipelines or 0 (create_list,create_raw_pc_command_listfromlist_x), and console-shaped lists turn shared stand-ins off.What is in it
crates/xcl/src/hle/d3d12x/real.rs:dev_make_resident/dev_evictoverrides viawith_driver_objects, plus CPU tests (residency_tests) with a fake adopted device and fake driver methodscrates/xcl/src/hle/d3d12x/standin.rs:driver_object(shell → driver pipeline, any other object unchanged). The shells' vtable moves to a module static so a non-shell is told apart without making the vtable.crates/xcl/src/hle/d3d12x/pso_async.rs:current, the pipeline behind a stand-in now, without building or waitingTested
XCL_ADAPTER=NONE_CPU_ONLY; the GPU was in use by another job), commit8b290bf2cargo build --workspace -j 4: OKcargo test -j 4 -p xcl --lib -- hle::d3d12x::standin:: hle::d3d12x::pso_async:: hle::d3d12x::real::residency_tests::: 19 passed, 0 failed, 0 ignored, no SKIPPEDdriver_objectbypassed inwith_driver_objects,residency_calls_give_the_driver_the_pipeline_behind_a_stand_infails because the driver gets the shell's address. The other two tests pass.cargo clippy -p xcl --lib --tests: no warnings on the changed lines. The crate fails clippy onmainalready (3approx_constanterrors ingpu/dxil/lower_valu.rs,lower_wide.rs,gpu/recomp/lower.rs).cargo fmt --check: no diffs on the changed lines. The tree is not rustfmt-clean, so only the new items were formatted.Regression run
scripts/smoke.ps1needs the GPU, which another job holds. This PR stays a draft until bothxcl-smokeblocks are added.Not tested
cargo test --workspace), and GPU tests in generalscripts/smoke.ps1) onmainand on this headMakeResident/Evict. The fix is only checked with fake objects.AI use
main, wrote the code, the tests and this description, and ran the commands above.🤖 Generated with Claude Code