Repository navigation
D3D12.X: default XCL_INLINE_GUARD_BATCH off to avoid dead 64 KiB scratch allocations and AMD page faults - #2757
Conversation
…tch allocations and AMD page faults
|
Tested - retail title and the new guard-batch default on native Windows AMD RDNA2, PR head Tool: OpenCode with DeepSeek V4.1 Flash 1017
On the PR's base, the default (batching on) stopped on the loading screen at 82-107 s. With On the current So the default flip is not what removes the device: it is what lets the title get far enough to Not tested: the RDNA4 page fault from the description (this is RDNA2), NVIDIA/Intel GPUs, AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and the game runs, read the logs and wrote this comment; the counts and per-run figures were checked against the logs. |
|
Second RDNA2 report, adding what the report above does not have: the workspace suite in debug, the This change is already on Stale comment. On Tested
Regression run (release, a different retail title from the one in the description, warm caches. The first base run had cold caches and gave 452 frames; the base block below is the rerun.) The base is A/B on head, 300 s,
Both runs stall the same way, so the stall is not caused by this PR: presents fall to 0 at about 185 s and 205 s, commit grows to about 28-30 GB and local VRAM from about 8 to about 11 GB. The log shows Not tested: the RDNA4 page fault from the description; NVIDIA / Intel; the cutscene / world past the loading stall; AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and game runs, read the logs and wrote this comment. Every number comes from those runs on the hardware above. |
What is in it
crates/xcl/src/hle/d3d12x/bind.rs:inline_guard_batch_on()(XCL_INLINE_GUARD_BATCH) from opt-out (default = true) to opt-in (XCL_INLINE_GUARD_BATCH=1).execute_indirectclearss.inline_guard = Noneimmediately after everyExecuteIndirect, so the 256-slot inline guard batch never batches more than 1 dispatch. Leaving it enabled by default allocates 64 KiB scratch VRAM (INLINE_GUARD_DST_BYTES) + 8,208 B coherent UMA (INLINE_GUARD_JOBS_BYTES) +Dispatch(4,1,1)ofPRELUDE_GUARD_HEAP_HLSLper guarded indirect dispatch, and on AMD RDNA 4 (RX 9070 XT) triggers a deterministic DRED GPU page fault (0x887a0006) at0x1f0060000during deep 3D frames. A/B testing withXCL_INLINE_GUARD_BATCH=0eliminated the0x1f0060000page fault completely, falling back cleanly toguard_indirect_heap_pipeline(32-bit root constants + 256 B scratch).inline_guard_batch_defaults_off_and_opts_in.amd-dev(whereinline_guard_batch_onlives).Tested
32.0.32029.2010), 24-thread x86_64 CPU, 32 GB RAM, Windows;rustc 1.100.0 (0ef1bc386 2026-11-09); debug (tests) and release (xcl.exe).cargo test -p xcl --lib inline_guard_batch_defaults_off_and_opts_in: 1 passed, 0 failed (0.00s).XCL_DRED=1+XCL_GPU_CULPRIT=13D captures on RX 9070 XT: default (XCL_INLINE_GUARD_BATCH=1) hitDRED page fault at GPU VA 0x1f0060000(0x887a0006) aroundxcl prelude_guard_dispatch_args;XCL_INLINE_GUARD_BATCH=0eliminated that page fault completely.Regression run
Not tested
AI use
XCL_GPU_CULPRITfault isolation, writing the opt-in change and unit test, and running local tests and smoke verification. All diffs and measurements were verified locally on hardware.