Repository navigation
D3D12.X: cache per-list ABI bindings and lock-free UMA VAs - #667
RandomGithub12309 wants to merge 1 commit into
Conversation
|
AMD / wave64 data point (the "Not tested" axis): the console-list tests pass on an AMD Raphael iGPU (RDNA2, native wave64) and on NVIDIA wave32 at this PR's head. Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB; AMD Radeon(TM) Graphics (Raphael iGPU, 485 MiB, wave64, no mesh shaders) and RTX 3080 Ti 12 GB (driver 621.01, wave32). PR head Runs (
Not tested: long sessions, other titles, the perf claim itself (no retail timing measured here). AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from their logs; a human reviews it before posting. No code changes. |
|
Tested
The cached values after the PC setters still compare equal to the ABI root in Not tested
AI use
|
|
Code audit + NVIDIA RTX 5080 test run on One real bug found in
|
|
Tested I extended the stale-root observation through the next translated compute dispatch on a native D3D12 list. A scratch fixture recorded a translated dispatch, called native
Each variant passed its expected assertions. Not tested GPU execution or readback, graphics root switching, and retail behavior. The fixture recorded and closed the lists without submitting them. AI use Codex with GPT-6.2 Sol wrote the scratch fixture, ran the tests, and drafted this report. GPU readback on the updated head On
AI use for this update: Codex (GPT-6, exact variant unavailable) wrote the scratch fixture, ran the test and drafted this update. |
|
Update: rerun on the new head
Still no regression. The draw totals vary with how far the title gets in 60 s (one PR run did 42428 draws / 2313 dispatches, the other 12006 / 330), so they don't compare the two builds. Test report: #667 under Wine (Linux, NVIDIA): GTA VI regression runA retail-title run of this PR under Wine / vkd3d-proton, base Setup
The second PR run did more work in total (984 dispatches against 300–350 in the other three), so the runs did different amounts of work and I don't read a speed difference into the draw totals. The title presents about 60 per 2 s in the steady parts on both builds, so a lower CPU cost per draw wouldn't show in the frame count here. (The first pair. Not tested
AI use: Claude Code (Claude Opus 5.5) built both commits, ran every run above on the machine above and wrote this report. The blocks and counts are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one. |
Share the title signature bind between direct and indirect draws. Invalidate the affected cache after native graphics and compute signature setters, and clear native binding caches after ExecuteBundle. Publish UMA windows once during device initialization and cover mixed bindings and SGPR packing. Thanks to @ethandepstein-del for identifying the ExecuteIndirect bug and flagging the UMA publication assumption, @CryingLaughing for demonstrating stale caches after native setters, and @thehollowedone for tracing the next dispatch's debug-layer errors. @MonkeyPython supplied AMD and NVIDIA list test results on 487cc5b. Those measurements apply to the original revision. xcl-dev#667 (comment) xcl-dev#667 (comment) xcl-dev#667 (comment) xcl-dev#667 (comment) Assisted-by: OpenAI Codex (GPT-6)
|
Hardware check of Tested
Regression run PR ( Not tested
AI use
|
|
The red PR description check on Fix: rerun AI use: GPT-6.2 Astra (API model selector) in DSH read the check annotations and |
|
Regression run of Tested
main (e50836b): this PR (f84935a): What this does and does not say
Not tested
AI use
|
Cache the bound ABI root signature, u2..u5 UMA window UAVs, and PSO per command list, invalidating on Reset, ClearState, ExecuteBundle, native root-signature setters, and untranslated title draws/indirects. Publish UMA window VAs lock-free once initialized.
f84935a to
3d60ee9
Compare
|
Updated at
|
Empirical test report (3d60ee9)Hardware / environment
Commands and results
Observed behavior The CPU counts come from the rerun after filtering a texture-mirroring test that initialized the real backend through adapter fallback. Both new CPU tests passed, covering binding invalidation and padded SGPR payloads. The Arc tests checked dispatch bind counts, draw rebinding and UMA window VA agreement. D3D12.X opened three sparse windows and logged a successful UMA import check. Not tested Full GPU workspace suite and game smoke runs. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr667-focused.log and published. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Focused The fixture calls the ordinary slot 27 thunk and observes the arguments at a mock native method. All four wrapped/raw caller and wrapped/raw bundle combinations passed the underlying parent and bundle pointers. Both wrapper references balanced. The fixture used mock COM and did not issue a native GPU bundle. An automatic merge of this head into current |
Cache per-command-list PC ABI root-signature (
u2..u5) and PSO bindings inbind_abiand publish UMA window VAs lock-free to reduce per-draw / per-dispatch CPU overhead on translated pipelines.What is in it
crates/xcl/src/hle/d3d12x/bind.rs:bound_rs_gfx,bound_rs_compute, andbound_psoper command list so consecutive translated draws/dispatches reuse the bound ABI root signature,u2..u5UMA window UAVs, and PSO while updatingu0/u1per draw.bind_abi(preservingIO_UMA_BASE_HI).Reset,ClearState,ExecuteBundle, mid-list splits (inherit_for_split), nativeSetGraphicsRootSignature/SetComputeRootSignature(external_root_signature), and untranslated title draws /ExecuteIndirect(bind_title_graphics_signature).ClearState/ native setters /ExecuteIndirect/ExecuteBundle, and stack SGPR packing.crates/xcl/src/hle/d3d12x/console_list.rs: stack-allocatedwrite_user_data_gfx/write_user_data_forhelpers avoiding per-drawVecallocations.crates/xcl/src/hle/d3d12x/list_x.rs: invalidate cached PC bindings and recordinit_psoafterKickoffXreset ontarget.crates/xcl/src/hle/d3d12x/real.rs: publish UMA window VAs lock-free once initialized (uma_window_vas_fast,uma_va_of_in) while keepingheap_windows()descriptor-heap setup intact.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)stable-x86_64-pc-windows-msvc(debug for unit tests, release forsmoke.ps1).cargo test -p xcl --lib hle::d3d12x::bind -- --test-threads=1 --nocaptureat3d60ee9: 9 passed, 0 failed, 0 ignored (0 skipped).cargo test --workspace -- --test-threads=4 --skip fuzz_validate_and_gpuat3d60ee9:xcllib 941 passed, 0 failed, 25 ignored (SKIPPEDon this adapter: wave64-only GPU tests andpso_measurement_compiles_an_exact_synthetic_recordbecause Windows Developer Mode is off;gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0..3}excluded due to pre-existing0x8007000ECreateComputePipelineStateOOM on this adapter).scripts/smoke.ps1release build at3d60ee9vsmain(8e87fc7).Regression run
Not tested
ID3D12GraphicsCommandList9, Wine / Linux, and multi-hour gameplay beyond the 60 s smoke window.AI use
main, ran the tests andscripts/smoke.ps1on the hardware above, and updated this description. OpenAI Codex (GPT-6) contributed the native root-signature /ExecuteIndirect/ExecuteBundleinvalidation fixes in the earlier revision.