Repository navigation
Conversation
…pped The two-pass record buffer and argument scratch are refused once the buffers alive reach the headroom cap (25 % of local budget headroom, clamped), and the draw that asked is skipped. A title whose later queue waits depend on that draw then never wakes: a retail title on a 12 GB RTX 3060 (16 heap windows) skipped its first two-pass ExecuteIndirect at a 340 MiB cap and, a second later, five queues sat in Wait64BitValueX on a value the skipped work would have written, with 0 draws for the remaining 13 minutes. With XCL_TWO_PASS_MB=2048 the same run played on with 794 MiB of two-pass buffers alive and lit its G-buffer. Those two paths now make the buffer up to the budget ceiling the cap is clamped to (min(local budget / 4, 2048 MiB), 1024 MiB with no budget) and skip the draw only past that. An XCL_TWO_PASS_MB cap is kept as it is. Pools, batches and the other callers still stop at the headroom cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On head I ran a deterministic CPU fixture using this head's cap arithmetic, atomic reservation, bucket rounding and
Could the record-buffer path reuse the existing bucket walk at the automatic ceiling with zero additional fence wait? The explicit AI use: OpenAI Codex prepared and ran the CPU fixture, checked the production callers and wrote this report. |
…ets at the ceiling Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@andrewDoing thanks, you're right. Pushed Tested on an RTX 3060 12 GB: AI use: Claude Code (Claude Opus 5.5) wrote the change, the test and this reply, and ran the tests. |
|
Retested the four admission boundaries at AI use: OpenAI Codex ran the controls and prepared this follow-up. |
When the two-pass buffers alive reach the headroom cap (25 % of local budget headroom, clamped), the record buffer and the argument scratch are refused and the draw that asked is skipped. A title whose later queue waits depend on that draw never wakes. On a 12 GB RTX 3060 (16 heap windows,
XCL_PREPARE=0), a retail title skipped its first two-pass ExecuteIndirect at a 340 MiB cap. A second later five queues sat inWait64BitValueX >= 0x713(wait-before-signal, producer queue 1) with 0 draws for the remaining 13 minutes and no device removal. WithXCL_TWO_PASS_MB=2048the same run played on, with 794 MiB of two-pass buffers alive, and lit its G-buffer (#1989).Those two paths now make the buffer up to the budget ceiling the cap is already clamped to (
min(local budget / 4, 2048 MiB), 1024 MiB with no budget), and skip the draw only past that. A setXCL_TWO_PASS_MBis kept as a hard cap. Pools, batches and the other callers still stop at the headroom cap: they have their own fallbacks.Builds on #2817's headroom cap (its wait and shrink run first). No open or merged PR changes the refusal: the open
nvidia-devPRs that touch two-pass code (#2999, #3052, #3056, #3105, #3116, #3131, #3012, #2987) leave it as it is, andmain/amd-devhave no such cap.What is in it
crates/xcl/src/hle/d3d12x/bind.rs:env_two_pass_cap(the existingXCL_TWO_PASS_MBread, moved out oftwo_pass_cap),draw_two_pass_ceiling,make_two_pass_past_cap; the record-buffer (ensure_res_buffer_with_cap) and argument-scratch refusals go through it. Two tests: the ceiling arithmetic, and a buffer the headroom cap refuses being made past it (WARP device).Tested
XCL_ADAPTER=3060(the machine also has a GTX 960).cargo test -p xcl --lib two_pass: 38 passed, 0 failed (1 SKIPPED:two_pass_binds_set_the_shared_view_heap, no heap windows);cargo test -p xcl --lib headroom_cap: 1 passed.cargo test --workspace -- --test-threads=4aborts on this card withCreateCommandQueue ... 0x8007000Eafter 4title_texturesfailures, identically on the base54225f58without this change;cargo test -p xcl --lib title_texturespasses 35/35 on both. So the whole-suite counts are not available from this machine.nvidia-devtree with D3D12.X: XCL_TEXTURE_SYSMEM puts streamed texture levels in system memory #3039 + D3D12.X: empty shader slots keep a two-pass mesh pipeline's cache key #2975 merged (16 heap windows,XCL_PREPARE=0, noXCL_TWO_PASS_MB): at 91 s the record buffer (32 MiB) and argument scratch went past the 351 MiB headroom cap ("goes past the ... headroom cap" lines), 0 draws skipped, in play at 718 s with ~10 000 draws per 2 s; in-play G-buffer targets 0/1/3 at 52 / 59 / 43 % non-black (frame 1762). The 900 s run ended cleanly: exit 0x0, 2 471 frames, 0 device removals, 0 crashes, peak commit 40.1 GB. Without the change the same setup froze at ~102 s (see D3D12.X: add depth+UAV color twins, format-aliased placed texture copies, and dual-twin UAV barriers #1989).Regression run
(plain settings; this title does not reach the cap without 16 windows)
Not tested
XCL_UMA_DRIVER=mixeddevice-hangs (0x887a0006) in the menus in about half the runs here, before any two-pass buffers; that is separate from this change.AI use
🤖 Generated with Claude Code